From 0bc025aed0ba01a463dfdeb8e6e82737e4597f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jochen=20R=C3=B6hrig?= <54274238+jridfe@users.noreply.github.com> Date: Mon, 10 Feb 2020 22:04:31 +0100 Subject: [PATCH] Release 0.2.0 (#3) * Release 0.2.0 common parts. * Release 0.2.0 docs. * Release 0.2.0 platform specific parts. --- .abapgit.xml | 1 + MIGRATION-V0.2.0.md | 16 + README.md | 39 +- .../zibmc/classes/zcl_ibmc_assistant_v1.html | 186 +- .../zibmc/classes/zcl_ibmc_assistant_v2.html | 39 +- .../classes/zcl_ibmc_compare_comply_v1.html | 8 +- .../zibmc/classes/zcl_ibmc_discovery_v1.html | 97 +- .../classes/zcl_ibmc_lang_translator_v3.html | 16 +- .../classes/zcl_ibmc_nat_lang_class_v1.html | 12 +- .../zcl_ibmc_nat_lang_undrstnd_v1.html | 51 +- .../zcl_ibmc_personal_insights_v3.html | 29 +- .../zibmc/classes/zcl_ibmc_service.html | 110 +- .../zibmc/classes/zcl_ibmc_service_arch.html | 1 + .../zibmc/classes/zcl_ibmc_service_ext.html | 42 +- .../classes/zcl_ibmc_speech_to_text_v1.html | 303 +- .../classes/zcl_ibmc_text_to_speech_v1.html | 18 +- .../classes/zcl_ibmc_tone_analyzer_v3.html | 18 +- .../abapdoc/zibmc/classes/zcl_ibmc_util.html | 35 +- .../zcl_ibmc_visual_recognition_v3.html | 64 +- .../zcl_ibmc_visual_recognition_v4.html | 102 +- .../classes/zcx_ibmc_service_exception.html | 2 +- .../interfaces/zif_ibmc_service_arch.html | 1 + docs/index.html | 2 +- src/zcl_ibmc_assistant_v1.clas.abap | 3960 +++++++++++------ src/zcl_ibmc_assistant_v2.clas.abap | 589 ++- src/zcl_ibmc_compare_comply_v1.clas.abap | 908 ++-- src/zcl_ibmc_discovery_v1.clas.abap | 2910 ++++++++---- src/zcl_ibmc_discovery_v1.clas.xml | 2 +- src/zcl_ibmc_lang_translator_v3.clas.abap | 350 +- src/zcl_ibmc_nat_lang_class_v1.clas.abap | 163 +- src/zcl_ibmc_nat_lang_undrstnd_v1.clas.abap | 439 +- src/zcl_ibmc_personal_insights_v3.clas.abap | 306 +- src/zcl_ibmc_service.clas.abap | 444 +- src/zcl_ibmc_service.clas.xml | 128 +- src/zcl_ibmc_service_arch.clas.abap | 222 +- src/zcl_ibmc_service_arch.clas.xml | 68 +- src/zcl_ibmc_service_ext.clas.abap | 144 +- src/zcl_ibmc_speech_to_text_v1.clas.abap | 2051 ++++++--- src/zcl_ibmc_text_to_speech_v1.clas.abap | 389 +- src/zcl_ibmc_tone_analyzer_v3.clas.abap | 217 +- src/zcl_ibmc_util.clas.abap | 397 +- src/zcl_ibmc_util.clas.xml | 12 + src/zcl_ibmc_visual_recognition_v3.clas.abap | 451 +- src/zcl_ibmc_visual_recognition_v4.clas.abap | 986 +++- src/zibmc_config.tabl.xml | 23 +- src/zibmc_token.tabl.xml | 33 +- src/zif_ibmc_service_arch.intf.abap | 12 +- 47 files changed, 11498 insertions(+), 4898 deletions(-) create mode 100644 MIGRATION-V0.2.0.md create mode 100644 docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_arch.html create mode 100644 docs/ABAPDoc/abapdoc/zibmc/interfaces/zif_ibmc_service_arch.html diff --git a/.abapgit.xml b/.abapgit.xml index 9727f9c..db8bb57 100644 --- a/.abapgit.xml +++ b/.abapgit.xml @@ -13,6 +13,7 @@ /.travis.yml /.gitlab-ci.yml /abaplint.json + /MIGRATION-V0.2.0.md diff --git a/MIGRATION-V0.2.0.md b/MIGRATION-V0.2.0.md new file mode 100644 index 0000000..9aee169 --- /dev/null +++ b/MIGRATION-V0.2.0.md @@ -0,0 +1,16 @@ +# Upgrading to ABAP SDK version 0.2.0 + +## Breaking changes + +### Table conversion necessary after pull + +The ABAP SDK for IBM Watson is now enabled to separate configuration data by storing data into client-specific tables. To achieve this tables `ZIBMC_TOKEN` and `ZIBMC_CONFIG` were made client-specific by adding a column holding the SAP client number. + +This change may result in an error when trying to activate the tables. To fix the error please execute the following steps: +1. Call transaction SE14 (Data Dictionary Database Utility). +2. Enter `ZIBMC_TOKEN` for "Object name" and click "Edit". +3. Click "Activate and adjust database" (ensure that radio button "Persist data" is selected). +4. Confirm "adjust" request. +5. Repeat the steps above for table `ZIBMC_CONFIG`. + +After this fix, the table content is available only in the SAP client where these steps have been performed. If you want to use configuration data in table `ZIBMC_CONFIG` in another SAP client, you have to copy the records to that SAP client. diff --git a/README.md b/README.md index f36f4ee..74dac15 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Additionally, as the ABAP SDK is a community release it is not updated with the | **abap-sdk-nwas** | [abap-sdk-scp](https://github.com/watson-developer-cloud/abap-sdk-scp) | |---|---| -| for SAP NetWeaver AS ABAP 7.50+ | for SAP Cloud Platform ABAP Environment 1911+ | +| for SAP NetWeaver AS ABAP 7.50+ | for SAP Cloud Platform ABAP Environment 2002+ | | tested on SAP ECC and SAP S/4HANA | | | `this repository` | | @@ -19,6 +19,7 @@ Additionally, as the ABAP SDK is a community release it is not updated with the
Table of Contents + * [Announcements](#announcements) * [Before you begin](#before-you-begin) * [Installation](#installation) * [SAP System Configuration](#sap-system-configuration) @@ -27,7 +28,7 @@ Additionally, as the ABAP SDK is a community release it is not updated with the * [SSL Certificates](#ssl-certificates) * [Credentials](#credentials) * [Configuration table](#configuration-table) - * [IAM Authentication](#iam-reference) + * [IAM Authentication](#iam-authentication) * [Usage](#usage) * [API Reference](#api-reference) * [Questions](#questions) @@ -36,6 +37,10 @@ Additionally, as the ABAP SDK is a community release it is not updated with the * [Acknowledgements](#acknowledgements)
+## ANNOUNCEMENTS +### Minor version 0.2.0 released +Version v0.2.0 of the SDK has been released and includes two breaking changes - see what's changed in the [migration guide](MIGRATION-V0.2.0.md). + ## Before you begin * You need an [IBM Cloud][ibm_cloud_onboarding] account. @@ -133,7 +138,7 @@ It is recommended to restart the ICM after a new SSL certificate has been applie Before you can access a specific service from your SAP system, you must create a service instance in the IBM Cloud and obtain credentials. The credentials can be shared among multiple end users of the SAP system, but you must ensure that the selected plan is sufficient to support the expected number of calls or the expected data volume. Please note that some plans may have restrictions on the allowed methods, so make sure to select the right plan for your purpose. -All currently supported services support IAM authentication (see below). Service credentials consist of an API Key and a URL. Both the API Key and the URL are character values that can be viewed through the IBM dashboard and need to be provided as parameters `i_apikey` and `i_host` to method `zcl_ibmc_service_ext=>get_instance`. +All currently supported services support IAM authentication (see below). Service credentials consist of an API Key and a URL. Both the API Key and the URL are character values that can be viewed through the IBM Cloud dashboard and need to be provided as parameters `i_apikey` and `i_url` to method `zcl_ibmc_service_ext=>get_instance`. You can store the values with your application, but it is suggested to do that in an encrypted format. Using cloud services usually creates costs based on usage for the owner of the service instance, and anyone with the credentials can use the service instance at the owner's expenses. If you want to distribute the costs over multiple cost centers, you need to create a service instance and provide service credentials for each cost center separately. @@ -153,9 +158,7 @@ Service credentials and other parameters that must be specified at Watson servic | Parameter Name | Default Value | Description | |:----------------- |:----------------- |:--------------------------------------------------------------------------- | -| HOST | service-dependent | Watson service endpoint host, e.g. https://gateway-lon.watsonplatform.net | -| USERNAME | | Watson service user name | -| PASSWORD | | Watson service password | +| URL | service-dependent | Watson service url | | APIKEY | | Watson service API keys | | PROXY_HOST | | Proxy server | | PROXY_PORT | | Proxy server port | @@ -168,8 +171,8 @@ Service credentials and other parameters that must be specified at Watson servic ## IAM Authentication Identity and Access Management (IAM) is a bearer-token based authentication method. Token management is either performed by the ABAP SDK or must be implemented by the SDK user.
-If username / password or apikey are provided for method `zcl_ibmc_service_ext=>get_instance()`, the ABAP SDK under the cover generates a bearer-token when needed and refreshes it when it is about to expire.
-If neither username / password nor apikey are provided for method `zcl_ibmc_service_ext=>get_instance()`, the ABAP SDK user must implement an individual token management. Before a service method is called the first time, a valid bearer-token must be provided to the Watson service wrapper ABAP class instance as follows: +If a value for apikey is provided by the caller in method `zcl_ibmc_service_ext=>get_instance()`, the ABAP SDK generates a bearer-token under the cover when needed and refreshes it when it is about to expire.
+If apikey is not provided for method `zcl_ibmc_service_ext=>get_instance()`, the ABAP SDK user must implement an individual token management. Before a service method is called the first time, a valid bearer-token must be provided to the Watson service wrapper ABAP class instance as follows: ```abap lo_service_class->set_bearer_token( i_bearer_token = '...' ). ``` @@ -206,7 +209,7 @@ Using the client library requires two steps: zcl_ibmc_service_ext=>get_instance( exporting - i_host = + i_url = i_apikey = ... importing @@ -243,8 +246,8 @@ Using the client library requires two steps: " get Watson Text-to-Speech service instance zcl_ibmc_service_ext=>get_instance( exporting - i_host = 'https://gateway-lon.watsonplatform.net' - i_apikey = lv_apikey + i_url = 'https://api.kr-seo.text-to-speech.watson.cloud.ibm.com/instances/' + i_apikey = lv_apikey importing eo_instance = lo_text_to_speech ). @@ -258,9 +261,9 @@ Using the client library requires two steps: message lo_service_exception type 'E'. endtry. - " print voices + " evaluate voices loop at lt_voices-voices into ls_voice. - write: / ls_voice-name. + ... endloop. ``` @@ -283,9 +286,9 @@ Using the client library requires two steps: " get Watson Natural Language Understanding service instance zcl_ibmc_service_ext=>get_instance( exporting - i_host = 'https://gateway-lon.watsonplatform.net' - i_apikey = lv_apikey - i_version = '2019-07-12' + i_url = 'https://api.eu-de.natural-language-understanding.watson.cloud.ibm.com/instances/' + i_apikey = lv_apikey + i_version = '2019-07-12' importing eo_instance = lo_instance ). @@ -339,7 +342,7 @@ Using the client library requires two steps: " get Watson Personality Insights service instance zcl_ibmc_service_ext=>get_instance( exporting - i_host = 'https://gateway-lon.watsonplatform.net' + i_url = 'https://api.eu-gb.personality-insights.watson.cloud.ibm.com/instances/' i_apikey = lv_apikey i_version = '2018-05-01' importing @@ -390,7 +393,7 @@ Using the client library requires two steps: " get Watson Language Translator service instance zcl_ibmc_service_ext=>get_instance( exporting - i_host = 'https://gateway-lon.watsonplatform.net' + i_url = 'https://api.us-south.language-translator.watson.cloud.ibm.com/instances/' i_apikey = lv_apikey i_version = '2018-05-01' importing diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v1.html index b135b88..0d659ce 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v1.html @@ -1,50 +1,61 @@ Class ZCL_IBMC_ASSISTANT_V1

Class ZCL_IBMC_ASSISTANT_V1

public inheriting from ZCL_IBMC_SERVICE_EXT create public

Documentation

Watson Assistant v1

The IBM Watson™ Assistant service combines machine learning, natural language understanding, and an integrated dialog editor to create conversation - flows between your apps and your users. - + flows between your apps and your users.
+
The Assistant v1 API provides authoring methods your application can use to - create or update a workspace.

Types

Visibility and LevelNameDocumentation
publict_audit_properties (structured type) 
publict_base_counterexample (structured type) 
publict_base_dialog_node (structured type) 
publict_base_entity (structured type) 
publict_base_example (structured type) 
publict_base_intent (structured type) 
publict_base_message (structured type) 
publict_base_output (structured type) An output object that includes the response to the user, the dialog nodes that - were triggered, and messages from the log.
publict_base_synonym (structured type) 
publict_base_value (structured type) 
publict_base_workspace (structured type) 
publict_capture_group (structured type) A recognized capture group for a pattern-based entity.
publict_context (structured type) State information for the conversation. To maintain state, include the context - from the previous response.
publict_counterexample (structured type) 
publict_counterexample_collection (structured type) 
publict_create_entity (structured type) 
publict_create_intent (structured type) 
publict_create_value (structured type) 
publict_create_workspace (structured type) 
publict_dialog_node (structured type) 
publict_dialog_node_action (structured type) 
publict_dialog_node_collection (structured type) An array of dialog nodes.
publict_dialog_node_next_step (structured type) The next step to execute following this dialog node.
publict_dialog_node_output (structured type) The output of the dialog node. For more information about how to specify dialog + create or update a workspace.

Types

Visibility and LevelNameDocumentation
publict_audit_properties (structured type) No documentation available.
publict_base_counterexample (structured type) No documentation available.
publict_base_dialog_node (structured type) No documentation available.
publict_base_entity (structured type) No documentation available.
publict_base_example (structured type) No documentation available.
publict_base_intent (structured type) No documentation available.
publict_base_message (structured type) No documentation available.
publict_base_output (structured type) An output object that includes the response to the user, the dialog nodes that + were triggered, and messages from the log.
publict_base_synonym (structured type) No documentation available.
publict_base_value (structured type) No documentation available.
publict_base_workspace (structured type) No documentation available.
publict_capture_group (structured type) A recognized capture group for a pattern-based entity.
publict_context (structured type) State information for the conversation. To maintain state, include the context + from the previous response.
publict_counterexample (structured type) No documentation available.
publict_counterexample_collection (structured type) No documentation available.
publict_create_entity (structured type) No documentation available.
publict_create_intent (structured type) No documentation available.
publict_create_value (structured type) No documentation available.
publict_create_workspace (structured type) No documentation available.
publict_dialog_node (structured type) No documentation available.
publict_dialog_node_action (structured type) No documentation available.
publict_dialog_node_collection (structured type) An array of dialog nodes.
publict_dialog_node_next_step (structured type) The next step to execute following this dialog node.
publict_dialog_node_output (structured type) The output of the dialog node. For more information about how to specify dialog node output, see the - [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-d - ialog-overview#dialog-overview-responses).
publict_dialog_node_output_generic (structured type) 
publict_dialog_node_output_modifiers (structured type) Options that modify how specified output is handled.
publict_dialog_node_visited_details (structured type) 
publict_dialog_suggestion (structured type) 
publict_dialog_suggestion_output (structured type) The dialog output that will be returned from the Watson Assistant service if the + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-ove + rview#dialog-overview-responses).
publict_dialog_node_output_generic (structured type) No documentation available.
publict_dialog_node_output_modifiers (structured type) Options that modify how specified output is handled.
publict_dialog_node_visited_details (structured type) No documentation available.
publict_dialog_suggestion (structured type) No documentation available.
publict_dialog_suggestion_output (structured type) The dialog output that will be returned from the Watson Assistant service if the user selects the corresponding option.
publict_dialog_suggestion_value (structured type) An object defining the message input, intents, and entities to be sent to the Watson Assistant service if the user selects the corresponding disambiguation - option.
publict_dia_nd_otpt_resp_type_pause (structured type) 
publict_dia_nd_otpt_resp_typ_cnnct_1 (structured type) 
publict_dia_nd_otpt_resp_typ_srch_s1 (structured type) 
publict_dia_nd_otpt_text_values_elem (structured type) 
publict_dia_nd_output_opt_elem_value (structured type) An object defining the message input to be sent to the Watson Assistant service - if the user selects the corresponding option.
publict_dia_nd_output_resp_type_img (structured type) 
publict_dia_nd_output_resp_type_opt (structured type) 
publict_dia_nd_output_resp_type_text (structured type) 
publict_dia_node_output_opt_element (structured type) 
publict_dia_suggestion_resp_generic (structured type) 
publict_empty_response type JSONOBJECT 
publict_entity (structured type) 
publict_entity_collection (structured type) An array of objects describing the entities for the workspace.
publict_entity_mention (structured type) An object describing a contextual entity mention.
publict_entity_mention_collection (structured type) 
publict_error_detail (structured type) 
publict_error_response (structured type) 
publict_example (structured type) 
publict_example_collection (structured type) 
publict_intent (structured type) 
publict_intent_collection (structured type) 
publict_log (structured type) 
publict_log_collection (structured type) 
publict_log_message (structured type) Log message details.
publict_log_pagination (structured type) The pagination data for the returned objects.
publict_mention (structured type) A mention of a contextual entity.
publict_message_context_metadata (structured type) Metadata related to the message.
publict_message_input (structured type) An input object that includes the input text.
publict_message_request (structured type) A request sent to the workspace, including the user input and context.
publict_message_response (structured type) The response sent by the workspace, including the output text, detected intents + option.
publict_dia_nd_otpt_resp_type_pause (structured type) No documentation available.
publict_dia_nd_otpt_resp_typ_cnnct_1 (structured type) No documentation available.
publict_dia_nd_otpt_resp_typ_srch_s1 (structured type) No documentation available.
publict_dia_nd_otpt_text_values_elem (structured type) No documentation available.
publict_dia_nd_output_opt_elem_value (structured type) An object defining the message input to be sent to the Watson Assistant service + if the user selects the corresponding option.
publict_dia_nd_output_resp_type_img (structured type) No documentation available.
publict_dia_nd_output_resp_type_opt (structured type) No documentation available.
publict_dia_nd_output_resp_type_text (structured type) No documentation available.
publict_dia_node_output_opt_element (structured type) No documentation available.
publict_dia_suggestion_resp_generic (structured type) No documentation available.
publict_empty_response type JSONOBJECT No documentation available.
publict_entity (structured type) No documentation available.
publict_entity_collection (structured type) An array of objects describing the entities for the workspace.
publict_entity_mention (structured type) An object describing a contextual entity mention.
publict_entity_mention_collection (structured type) No documentation available.
publict_error_detail (structured type) No documentation available.
publict_error_response (structured type) No documentation available.
publict_example (structured type) No documentation available.
publict_example_collection (structured type) No documentation available.
publict_intent (structured type) No documentation available.
publict_intent_collection (structured type) No documentation available.
publict_log (structured type) No documentation available.
publict_log_collection (structured type) No documentation available.
publict_log_message (structured type) Log message details.
publict_log_pagination (structured type) The pagination data for the returned objects.
publict_mention (structured type) A mention of a contextual entity.
publict_message_context_metadata (structured type) Metadata related to the message.
publict_message_input (structured type) An input object that includes the input text.
publict_message_request (structured type) A request sent to the workspace, including the user input and context.
publict_message_response (structured type) The response sent by the workspace, including the output text, detected intents and entities, and context.
publict_output_data (structured type) An output object that includes the response to the user, the dialog nodes that - were triggered, and messages from the log.
publict_pagination (structured type) The pagination data for the returned objects.
publict_rt_entity_interpretation (structured type) 
publict_rt_entty_intrprttn_sys_date (structured type) 
publict_rt_entty_intrprttn_sys_num (structured type) 
publict_rt_entty_intrprttn_sys_time (structured type) 
publict_rt_response_type_suggestion (structured type) 
publict_rt_resp_typ_connect_to_agent (structured type) 
publict_runtime_entity (structured type) A term from the request that was identified as an entity.
publict_runtime_entity_alternative (structured type) An alternative value for the recognized entity.
publict_runtime_entity_role (structured type) An object describing the role played by a system entity that is specifies the - beginning or end of a range recognized in the user input. - - This property is part of the new system entities, which are a beta feature.
publict_runtime_intent (structured type) An intent identified in the user input.
publict_runtime_response_generic (structured type) 
publict_runtime_response_type_image (structured type) 
publict_runtime_response_type_option (structured type) 
publict_runtime_response_type_pause (structured type) 
publict_runtime_response_type_text (structured type) 
publict_synonym (structured type) 
publict_synonym_collection (structured type) 
publict_system_response type MAP For internal use only.
publict_update_counterexample (structured type) 
publict_update_dialog_node (structured type) 
publict_update_entity (structured type) 
publict_update_example (structured type) 
publict_update_intent (structured type) 
publict_update_synonym (structured type) 
publict_update_value (structured type) 
publict_update_workspace (structured type) 
publict_value (structured type) 
publict_value_collection (structured type) 
publict_workspace (structured type) 
publict_workspace_collection (structured type) 
publict_workspace_system_settings (structured type) Global settings for the workspace.
publict_ws_system_settings_tooling (structured type) Workspace settings related to the Watson Assistant user interface.
publict_ws_systm_sttngs_dsmbgtn (structured type) Workspace settings related to the disambiguation feature. - - **Note:** This feature is available only to Premium users.
publict_ws_systm_sttngs_systm_entts (structured type) Workspace settings related to the behavior of system entities.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
create_counterexample
importingi_workspace_idtype STRING
i_bodytype T_COUNTEREXAMPLE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COUNTEREXAMPLE
raisingzcx_ibmc_service_exception
Create counterexample. + were triggered, and messages from the log.
publict_pagination (structured type) The pagination data for the returned objects.
publict_rt_entity_interpretation (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_date (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_num (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_time (structured type) No documentation available.
publict_rt_response_type_suggestion (structured type) No documentation available.
publict_rt_resp_typ_connect_to_agent (structured type) No documentation available.
publict_runtime_entity (structured type) A term from the request that was identified as an entity.
publict_runtime_entity_alternative (structured type) An alternative value for the recognized entity.
publict_runtime_entity_role (structured type) An object describing the role played by a system entity that is specifies the + beginning or end of a range recognized in the user input. This property is + included only if the new system entities are enabled for the workspace.
publict_runtime_intent (structured type) An intent identified in the user input.
publict_runtime_response_generic (structured type) No documentation available.
publict_runtime_response_type_image (structured type) No documentation available.
publict_runtime_response_type_option (structured type) No documentation available.
publict_runtime_response_type_pause (structured type) No documentation available.
publict_runtime_response_type_text (structured type) No documentation available.
publict_synonym (structured type) No documentation available.
publict_synonym_collection (structured type) No documentation available.
publict_system_response type MAP For internal use only.
publict_update_counterexample (structured type) No documentation available.
publict_update_dialog_node (structured type) No documentation available.
publict_update_entity (structured type) No documentation available.
publict_update_example (structured type) No documentation available.
publict_update_intent (structured type) No documentation available.
publict_update_synonym (structured type) No documentation available.
publict_update_value (structured type) No documentation available.
publict_update_workspace (structured type) No documentation available.
publict_value (structured type) No documentation available.
publict_value_collection (structured type) No documentation available.
publict_webhook (structured type) A webhook that can be used by dialog nodes to make programmatic calls to an + external function.
+
+ **Note:** Currently, only a single webhook named `main_webhook` is supported.
publict_webhook_header (structured type) A key/value pair defining an HTTP header and a value.
publict_workspace (structured type) No documentation available.
publict_workspace_collection (structured type) No documentation available.
publict_workspace_system_settings (structured type) Global settings for the workspace.
publict_ws_system_settings_off_topic (structured type) Workspace settings related to detection of irrelevant input.
publict_ws_system_settings_tooling (structured type) Workspace settings related to the Watson Assistant user interface.
publict_ws_systm_sttngs_dsmbgtn (structured type) Workspace settings related to the disambiguation feature.
+
+ **Note:** This feature is available only to Plus and Premium users.
publict_ws_systm_sttngs_systm_entts (structured type) Workspace settings related to the behavior of system entities.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
create_counterexample
importingi_workspace_idtype STRING
i_bodytype T_COUNTEREXAMPLE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COUNTEREXAMPLE
raisingzcx_ibmc_service_exception
Create counterexample.
Parameters
i_workspace_id Unique identifier of the workspace.
i_body The content of the new counterexample. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_COUNTEREXAMPLE -
public instance
create_dialog_node
importingi_workspace_idtype STRING
i_bodytype T_DIALOG_NODE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DIALOG_NODE
raisingzcx_ibmc_service_exception
Create dialog node. +
public instance
create_dialog_node
importingi_workspace_idtype STRING
i_bodytype T_DIALOG_NODE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DIALOG_NODE
raisingzcx_ibmc_service_exception
Create dialog node.
Parameters
i_workspace_id Unique identifier of the workspace.
i_body A CreateDialogNode object defining the content of the new dialog node. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_DIALOG_NODE -
public instance
create_entity
importingi_workspace_idtype STRING
i_bodytype T_CREATE_ENTITY
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_ENTITY
raisingzcx_ibmc_service_exception
Create entity. +
public instance
create_entity
importingi_workspace_idtype STRING
i_bodytype T_CREATE_ENTITY
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_ENTITY
raisingzcx_ibmc_service_exception
Create entity.
Parameters
i_workspace_id Unique identifier of the workspace.
i_body The content of the new entity. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_ENTITY -
public instance
create_example
importingi_workspace_idtype STRING
i_intenttype STRING
i_bodytype T_EXAMPLE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_EXAMPLE
raisingzcx_ibmc_service_exception
Create user input example. +public instance
create_example
importingi_workspace_idtype STRING
i_intenttype STRING
i_bodytype T_EXAMPLE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_EXAMPLE
raisingzcx_ibmc_service_exception
Create user input example.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -52,17 +63,23 @@ The intent name.
i_body The content of the new user input example. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_EXAMPLE -
public instance
create_intent
importingi_workspace_idtype STRING
i_bodytype T_CREATE_INTENT
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_INTENT
raisingzcx_ibmc_service_exception
Create intent. +public instance
create_intent
importingi_workspace_idtype STRING
i_bodytype T_CREATE_INTENT
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_INTENT
raisingzcx_ibmc_service_exception
Create intent.
Parameters
i_workspace_id Unique identifier of the workspace.
i_body The content of the new intent. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_INTENT -
public instance
create_synonym
importingi_workspace_idtype STRING
i_entitytype STRING
i_valuetype STRING
i_bodytype T_SYNONYM
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SYNONYM
raisingzcx_ibmc_service_exception
Create entity value synonym. +public instance
create_synonym
importingi_workspace_idtype STRING
i_entitytype STRING
i_valuetype STRING
i_bodytype T_SYNONYM
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SYNONYM
raisingzcx_ibmc_service_exception
Create entity value synonym.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -72,9 +89,12 @@ The text of the entity value.
i_body The new synonym. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_SYNONYM -
public instance
create_value
importingi_workspace_idtype STRING
i_entitytype STRING
i_bodytype T_CREATE_VALUE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_VALUE
raisingzcx_ibmc_service_exception
Create entity value. +public instance
create_value
importingi_workspace_idtype STRING
i_entitytype STRING
i_bodytype T_CREATE_VALUE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_VALUE
raisingzcx_ibmc_service_exception
Create entity value.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -82,16 +102,22 @@ The name of the entity.
i_body The new entity value. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_VALUE -
public instance
create_workspace
importingi_bodytype T_CREATE_WORKSPACE optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WORKSPACE
raisingzcx_ibmc_service_exception
Create workspace. +public instance
create_workspace
importingi_bodytype T_CREATE_WORKSPACE optional
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WORKSPACE
raisingzcx_ibmc_service_exception
Create workspace.
Parameters
i_body - The content of the new workspace. - + The content of the new workspace.
+
The maximum size for this data is 50MB. If you need to import a larger workspace, consider importing the workspace without intents and entities and then adding them separately. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_WORKSPACE
public instance
delete_counterexample
importingi_workspace_idtype STRING
i_texttype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception
Delete counterexample. @@ -275,10 +301,10 @@
Parameters
i_filter A cacheable parameter that limits the results to those matching the specified filter. You must specify a filter query that includes a value for `language`, - as well as a value for `workspace_id` or `request.context.metadata.deployment`. - For more information, see the - [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-f - ilter-reference#filter-reference). + as well as a value for `request.context.system.assistant_id`, `workspace_id`, + or `request.context.metadata.deployment`. For more information, see the + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-ref + erence#filter-reference).
i_sort How to sort the returned log events. You can sort by **request_timestamp**. To reverse the sort order, prefix the parameter value with a minus sign (`-`). @@ -390,8 +416,8 @@
i_filter A cacheable parameter that limits the results to those matching the specified filter. For more information, see the - [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-f - ilter-reference#filter-reference). + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-ref + erence#filter-reference).
i_page_limit The number of records to return in each page of results.
i_cursor @@ -483,7 +509,7 @@ were visited during processing of the message.
e_response Service return value of type T_MESSAGE_RESPONSE -
public instance
update_counterexample
importingi_workspace_idtype STRING
i_texttype STRING
i_bodytype T_UPDATE_COUNTEREXAMPLE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COUNTEREXAMPLE
raisingzcx_ibmc_service_exception
Update counterexample. +public instance
update_counterexample
importingi_workspace_idtype STRING
i_texttype STRING
i_bodytype T_UPDATE_COUNTEREXAMPLE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COUNTEREXAMPLE
raisingzcx_ibmc_service_exception
Update counterexample.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -491,25 +517,31 @@ The text of a user input counterexample (for example, `What are you wearing?`).
i_body The text of the counterexample. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_COUNTEREXAMPLE -
public instance
update_dialog_node
importingi_workspace_idtype STRING
i_dialog_nodetype STRING
i_bodytype T_UPDATE_DIALOG_NODE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DIALOG_NODE
raisingzcx_ibmc_service_exception
Update dialog node. +public instance
update_dialog_node
importingi_workspace_idtype STRING
i_dialog_nodetype STRING
i_bodytype T_UPDATE_DIALOG_NODE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DIALOG_NODE
raisingzcx_ibmc_service_exception
Update dialog node.
Parameters
i_workspace_id Unique identifier of the workspace.
i_dialog_node The dialog node ID (for example, `get_order`).
i_body - The updated content of the dialog node. - + The updated content of the dialog node.
+
Any elements included in the new data will completely replace the equivalent existing elements, including all subelements. (Previously existing subelements are not retained unless they are also included in the new data.) For example, if you update the actions for a dialog node, the previously existing actions are discarded and replaced with the new actions specified in the update. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_DIALOG_NODE -
public instance
update_entity
importingi_workspace_idtype STRING
i_entitytype STRING
i_bodytype T_UPDATE_ENTITY
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_ENTITY
raisingzcx_ibmc_service_exception
Update entity. +public instance
update_entity
importingi_workspace_idtype STRING
i_entitytype STRING
i_bodytype T_UPDATE_ENTITY
i_appendtype BOOLEAN default C_BOOLEAN_FALSE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_ENTITY
raisingzcx_ibmc_service_exception
Update entity.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -522,9 +554,23 @@ in the new data.) For example, if you update the values for an entity, the previously existing values are discarded and replaced with the new values specified in the update. +
i_append + Whether the new data is to be appended to the existing data in the entity. If + **append**=`false`, elements included in the new data completely replace the + corresponding existing elements, including all subelements. For example, if the + new data for the entity includes **values** and **append**=`false`, all + existing values for the entity are discarded and replaced with the new + values.
+
+ If **append**=`true`, existing elements are preserved, and the new elements are + added. If any elements in the new data collide with existing elements, the + update request fails. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_ENTITY -
public instance
update_example
importingi_workspace_idtype STRING
i_intenttype STRING
i_texttype STRING
i_bodytype T_UPDATE_EXAMPLE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_EXAMPLE
raisingzcx_ibmc_service_exception
Update user input example. +public instance
update_example
importingi_workspace_idtype STRING
i_intenttype STRING
i_texttype STRING
i_bodytype T_UPDATE_EXAMPLE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_EXAMPLE
raisingzcx_ibmc_service_exception
Update user input example.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -534,26 +580,43 @@ The text of the user input example.
i_body The new text of the user input example. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_EXAMPLE -
public instance
update_intent
importingi_workspace_idtype STRING
i_intenttype STRING
i_bodytype T_UPDATE_INTENT
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_INTENT
raisingzcx_ibmc_service_exception
Update intent. +public instance
update_intent
importingi_workspace_idtype STRING
i_intenttype STRING
i_bodytype T_UPDATE_INTENT
i_appendtype BOOLEAN default C_BOOLEAN_FALSE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_INTENT
raisingzcx_ibmc_service_exception
Update intent.
Parameters
i_workspace_id Unique identifier of the workspace.
i_intent The intent name.
i_body - The updated content of the intent. - + The updated content of the intent.
+
Any elements included in the new data will completely replace the equivalent existing elements, including all subelements. (Previously existing subelements are not retained unless they are also included in the new data.) For example, if you update the user input examples for an intent, the previously existing examples are discarded and replaced with the new examples specified in the update. +
i_append + Whether the new data is to be appended to the existing data in the object. If + **append**=`false`, elements included in the new data completely replace the + corresponding existing elements, including all subelements. For example, if the + new data for the intent includes **examples** and **append**=`false`, all + existing examples for the intent are discarded and replaced with the new + examples.
+
+ If **append**=`true`, existing elements are preserved, and the new elements are + added. If any elements in the new data collide with existing elements, the + update request fails. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_INTENT -
public instance
update_synonym
importingi_workspace_idtype STRING
i_entitytype STRING
i_valuetype STRING
i_synonymtype STRING
i_bodytype T_UPDATE_SYNONYM
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SYNONYM
raisingzcx_ibmc_service_exception
Update entity value synonym. +public instance
update_synonym
importingi_workspace_idtype STRING
i_entitytype STRING
i_valuetype STRING
i_synonymtype STRING
i_bodytype T_UPDATE_SYNONYM
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SYNONYM
raisingzcx_ibmc_service_exception
Update entity value synonym.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -565,9 +628,12 @@ The text of the synonym.
i_body The updated entity value synonym. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_SYNONYM -
public instance
update_value
importingi_workspace_idtype STRING
i_entitytype STRING
i_valuetype STRING
i_bodytype T_UPDATE_VALUE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_VALUE
raisingzcx_ibmc_service_exception
Update entity value. +public instance
update_value
importingi_workspace_idtype STRING
i_entitytype STRING
i_valuetype STRING
i_bodytype T_UPDATE_VALUE
i_appendtype BOOLEAN default C_BOOLEAN_FALSE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_VALUE
raisingzcx_ibmc_service_exception
Update entity value.
Parameters
i_workspace_id Unique identifier of the workspace. @@ -576,36 +642,54 @@
i_value The text of the entity value.
i_body - The updated content of the entity value. - + The updated content of the entity value.
+
Any elements included in the new data will completely replace the equivalent existing elements, including all subelements. (Previously existing subelements are not retained unless they are also included in the new data.) For example, if you update the synonyms for an entity value, the previously existing synonyms are discarded and replaced with the new synonyms specified in the update. +
i_append + Whether the new data is to be appended to the existing data in the entity value. + If **append**=`false`, elements included in the new data completely replace the + corresponding existing elements, including all subelements. For example, if the + new data for the entity value includes **synonyms** and **append**=`false`, all + existing synonyms for the entity value are discarded and replaced with the new + synonyms.
+
+ If **append**=`true`, existing elements are preserved, and the new elements are + added. If any elements in the new data collide with existing elements, the + update request fails. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_VALUE -
public instance
update_workspace
importingi_workspace_idtype STRING
i_bodytype T_UPDATE_WORKSPACE optional
i_appendtype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WORKSPACE
raisingzcx_ibmc_service_exception
Update workspace. +public instance
update_workspace
importingi_workspace_idtype STRING
i_bodytype T_UPDATE_WORKSPACE optional
i_appendtype BOOLEAN default C_BOOLEAN_FALSE
i_include_audittype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_WORKSPACE
raisingzcx_ibmc_service_exception
Update workspace.
Parameters
i_workspace_id Unique identifier of the workspace.
i_body - Valid data defining the new and updated workspace content. - + Valid data defining the new and updated workspace content.
+
The maximum size for this data is 50MB. If you need to import a larger amount of workspace data, consider importing components such as intents and entities using separate operations.
i_append - Whether the new data is to be appended to the existing data in the workspace. If + Whether the new data is to be appended to the existing data in the object. If **append**=`false`, elements included in the new data completely replace the corresponding existing elements, including all subelements. For example, if the - new data includes **entities** and **append**=`false`, all existing entities in - the workspace are discarded and replaced with the new entities. - + new data for a workspace includes **entities** and **append**=`false`, all + existing entities in the workspace are discarded and replaced with the new + entities.
+
If **append**=`true`, existing elements are preserved, and the new elements are added. If any elements in the new data collide with existing elements, the update request fails. +
i_include_audit + Whether to include the audit properties (`created` and `updated` timestamps) in + the response.
e_response Service return value of type T_WORKSPACE -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v2.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v2.html index 31492cb..bfe5c2b 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v2.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_assistant_v2.html @@ -1,29 +1,28 @@ Class ZCL_IBMC_ASSISTANT_V2

Class ZCL_IBMC_ASSISTANT_V2

public inheriting from ZCL_IBMC_SERVICE_EXT create public

Documentation

Watson Assistant v2

The IBM Watson™ Assistant service combines machine learning, natural language understanding, and an integrated dialog editor to create conversation - flows between your apps and your users. - + flows between your apps and your users.
+
The Assistant v2 API provides runtime methods your client application can use to - send user input to an assistant and receive a response.

Types

Visibility and LevelNameDocumentation
publict_capture_group (structured type) 
publict_dialog_log_message (structured type) Dialog log message details.
publict_dialog_nodes_visited (structured type) 
publict_dialog_node_action (structured type) 
publict_dialog_suggestion (structured type) 
publict_dialog_suggestion_value (structured type) An object defining the message input to be sent to the assistant if the user + send user input to an assistant and receive a response.

Types

Visibility and LevelNameDocumentation
publict_capture_group (structured type) No documentation available.
publict_dialog_log_message (structured type) Dialog log message details.
publict_dialog_nodes_visited (structured type) No documentation available.
publict_dialog_node_action (structured type) No documentation available.
publict_dialog_suggestion (structured type) No documentation available.
publict_dialog_suggestion_value (structured type) An object defining the message input to be sent to the assistant if the user selects the corresponding disambiguation option.
publict_dia_nd_output_opt_elem_value (structured type) An object defining the message input to be sent to the assistant if the user - selects the corresponding option.
publict_dia_node_output_opt_element (structured type) 
publict_empty_response type JSONOBJECT 
publict_error_detail (structured type) 
publict_error_response (structured type) 
publict_message_context (structured type) 
publict_message_context_global (structured type) Information that is shared by all skills used by the Assistant.
publict_message_context_skill (structured type) Contains information specific to a particular skill used by the Assistant.
publict_message_context_skills type MAP Information specific to particular skills used by the Assistant. - + selects the corresponding option.
publict_dia_node_output_opt_element (structured type) No documentation available.
publict_empty_response type JSONOBJECT No documentation available.
publict_error_detail (structured type) No documentation available.
publict_error_response (structured type) No documentation available.
publict_message_context (structured type) No documentation available.
publict_message_context_global (structured type) Information that is shared by all skills used by the Assistant.
publict_message_context_skill (structured type) Contains information specific to a particular skill used by the Assistant.
publict_message_context_skills type MAP Information specific to particular skills used by the Assistant.
+
**Note:** Currently, only a single property named `main skill` is supported. This object contains variables that apply to the dialog skill used by the assistant.
publict_message_input (structured type) An input object that includes the input text.
publict_message_input_options (structured type) Optional properties that control how the assistant responds.
publict_message_output (structured type) Assistant output to be rendered or processed by the client.
publict_message_output_debug (structured type) Additional detailed information about a message response and how it was - generated.
publict_message_request (structured type) A request formatted for the Watson Assistant service.
publict_message_response (structured type) A response from the Watson Assistant service.
publict_mssg_context_global_system (structured type) Built-in system properties that apply to all skills used by the assistant.
publict_rt_entity_interpretation (structured type) 
publict_rt_entty_intrprttn_sys_date (structured type) 
publict_rt_entty_intrprttn_sys_num (structured type) 
publict_rt_entty_intrprttn_sys_time (structured type) 
publict_rt_response_type_suggestion (structured type) 
publict_rt_resp_typ_connect_to_agent (structured type) 
publict_runtime_entity (structured type) The entity value that was recognized in the user input.
publict_runtime_entity_alternative (structured type) An alternative value for the recognized entity.
publict_runtime_entity_role (structured type) An object describing the role played by a system entity that is specifies the - beginning or end of a range recognized in the user input. - - This property is part of the new system entities, which are a beta feature.
publict_runtime_intent (structured type) An intent identified in the user input.
publict_runtime_response_generic (structured type) 
publict_runtime_response_type_image (structured type) 
publict_runtime_response_type_option (structured type) 
publict_runtime_response_type_pause (structured type) 
publict_runtime_response_type_search (structured type) 
publict_runtime_response_type_text (structured type) 
publict_search_result (structured type) 
publict_search_result_highlight (structured type) An object containing segments of text from search results with query-matching - text highlighted using HTML tags.
publict_search_result_metadata (structured type) An object containing search result metadata from the Discovery service.
publict_session_response (structured type) 

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
create_session
importingi_assistant_idtype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SESSION_RESPONSE
raisingzcx_ibmc_service_exception
Create a session. + generated.
publict_message_request (structured type) A request formatted for the Watson Assistant service.
publict_message_response (structured type) A response from the Watson Assistant service.
publict_mssg_context_global_system (structured type) Built-in system properties that apply to all skills used by the assistant.
publict_rt_entity_interpretation (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_date (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_num (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_time (structured type) No documentation available.
publict_rt_response_type_suggestion (structured type) No documentation available.
publict_rt_resp_typ_connect_to_agent (structured type) No documentation available.
publict_runtime_entity (structured type) The entity value that was recognized in the user input.
publict_runtime_entity_alternative (structured type) An alternative value for the recognized entity.
publict_runtime_entity_role (structured type) An object describing the role played by a system entity that is specifies the + beginning or end of a range recognized in the user input. This property is + included only if the new system entities are enabled for the skill.
publict_runtime_intent (structured type) An intent identified in the user input.
publict_runtime_response_generic (structured type) No documentation available.
publict_runtime_response_type_image (structured type) No documentation available.
publict_runtime_response_type_option (structured type) No documentation available.
publict_runtime_response_type_pause (structured type) No documentation available.
publict_runtime_response_type_search (structured type) No documentation available.
publict_runtime_response_type_text (structured type) No documentation available.
publict_search_result (structured type) No documentation available.
publict_search_result_highlight (structured type) An object containing segments of text from search results with query-matching + text highlighted using HTML <em> tags.
publict_search_result_metadata (structured type) An object containing search result metadata from the Discovery service.
publict_session_response (structured type) No documentation available.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
create_session
importingi_assistant_idtype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SESSION_RESPONSE
raisingzcx_ibmc_service_exception
Create a session.
Parameters
i_assistant_id Unique identifier of the assistant. To find the assistant ID in the Watson Assistant user interface, open the assistant settings and click **API Details**. For information about creating assistants, see the - [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-a - ssistant-add#assistant-add-task). - + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant- + add#assistant-add-task).
+
**Note:** Currently, the v2 API does not support creating assistants.
e_response Service return value of type T_SESSION_RESPONSE @@ -33,9 +32,9 @@ Unique identifier of the assistant. To find the assistant ID in the Watson Assistant user interface, open the assistant settings and click **API Details**. For information about creating assistants, see the - [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-a - ssistant-add#assistant-add-task). - + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant- + add#assistant-add-task).
+
**Note:** Currently, the v2 API does not support creating assistants.
i_session_id Unique identifier of the session. @@ -45,9 +44,9 @@ Unique identifier of the assistant. To find the assistant ID in the Watson Assistant user interface, open the assistant settings and click **API Details**. For information about creating assistants, see the - [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-a - ssistant-add#assistant-add-task). - + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant- + add#assistant-add-task).
+
**Note:** Currently, the v2 API does not support creating assistants.
i_session_id Unique identifier of the session. @@ -56,4 +55,4 @@ content such as intents and entities.
e_response Service return value of type T_MESSAGE_RESPONSE -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_compare_comply_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_compare_comply_v1.html index 8d493d5..76290f7 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_compare_comply_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_compare_comply_v1.html @@ -1,14 +1,14 @@ Class ZCL_IBMC_COMPARE_COMPLY_V1

Class ZCL_IBMC_COMPARE_COMPLY_V1

public inheriting from ZCL_IBMC_SERVICE_EXT create public

Documentation

Compare and Comply

IBM Watson™ Compare and Comply analyzes governing documents to provide - details about critical aspects of the documents.

Types

Visibility and LevelNameDocumentation
publict_address (structured type) A party's address.
publict_aligned_element (structured type) 
publict_attribute (structured type) List of document attributes.
publict_batches (structured type) The results of a successful **List Batches** request.
publict_batch_status (structured type) The batch-request status.
publict_body_cells (structured type) Cells that are not table header, column header, or row header cells.
publict_category (structured type) Information defining an element's subject matter.
publict_category_comparison (structured type) Information defining an element's subject matter.
publict_classify_return (structured type) The analysis of objects returned by the **Element classification** method.
publict_column_headers (structured type) Column-level cells, each applicable as a header to other cells in the same + details about critical aspects of the documents.

Types

Visibility and LevelNameDocumentation
publict_address (structured type) A party's address.
publict_aligned_element (structured type) No documentation available.
publict_attribute (structured type) List of document attributes.
publict_batches (structured type) The results of a successful **List Batches** request.
publict_batch_status (structured type) The batch-request status.
publict_body_cells (structured type) Cells that are not table header, column header, or row header cells.
publict_category (structured type) Information defining an element's subject matter.
publict_category_comparison (structured type) Information defining an element's subject matter.
publict_classify_return (structured type) The analysis of objects returned by the **Element classification** method.
publict_column_headers (structured type) Column-level cells, each applicable as a header to other cells in the same column as itself, of the current table.
publict_column_header_ids type TT_STRING An array that contains the `id` value of a column header that is applicable to the current cell.
publict_column_header_texts type TT_STRING An array that contains the `text` value of a column header that is applicable to the current cell.
publict_column_header_texts_norm type TT_STRING If you provide customization input, the normalized version of the column header texts according to the customization; otherwise, the same value as `column_header_texts`.
publict_compare_return (structured type) The comparison of the two submitted documents.
publict_contact (structured type) A contact.
publict_contexts (structured type) Text that is related to the contents of the table and that precedes or follows the current table.
publict_contract_amts (structured type) A monetary amount identified in the input document.
publict_contract_currencies (structured type) The contract currencies that are declared in the document.
publict_contract_terms (structured type) The duration or durations of the contract.
publict_contract_types (structured type) The contract type identified in the input document.
publict_document (structured type) Basic information about the input document.
publict_doc_counts (structured type) Document counts.
publict_doc_info (structured type) Information about the parsed input document.
publict_doc_structure (structured type) The structure of the input document.
publict_effective_dates (structured type) An effective date.
publict_element (structured type) A component part of the document.
publict_element_locations (structured type) A list of `begin` and `end` indexes that indicate the locations of the elements - in the input document.
publict_element_pair (structured type) Details of semantically aligned elements.
publict_error_response (structured type) 
publict_feedback_data_input (structured type) Feedback data for submission.
publict_feedback_data_output (structured type) Information returned from the **Add Feedback** method.
publict_feedback_deleted (structured type) The status and message of the deletion request.
publict_feedback_input (structured type) The feedback to be added to an element in the document.
publict_feedback_list (structured type) The results of a successful **List Feedback** request for all feedback.
publict_feedback_return (structured type) Information about the document and the submitted feedback.
publict_get_feedback (structured type) The results of a successful **Get Feedback** request for a single feedback - entry.
publict_htmlreturn (structured type) The HTML converted from an input document.
publict_inline_object (structured type) 
publict_inline_object1 (structured type) 
publict_inline_object2 (structured type) 
publict_inline_object3 (structured type) 
publict_inline_object4 (structured type) 
publict_interpretation (structured type) The details of the normalized text, if applicable. This element is optional; it + in the input document.
publict_element_pair (structured type) Details of semantically aligned elements.
publict_error_response (structured type) No documentation available.
publict_feedback_data_input (structured type) Feedback data for submission.
publict_feedback_data_output (structured type) Information returned from the **Add Feedback** method.
publict_feedback_deleted (structured type) The status and message of the deletion request.
publict_feedback_input (structured type) The feedback to be added to an element in the document.
publict_feedback_list (structured type) The results of a successful **List Feedback** request for all feedback.
publict_feedback_return (structured type) Information about the document and the submitted feedback.
publict_get_feedback (structured type) The results of a successful **Get Feedback** request for a single feedback + entry.
publict_htmlreturn (structured type) The HTML converted from an input document.
publict_inline_object (structured type) No documentation available.
publict_inline_object1 (structured type) No documentation available.
publict_inline_object2 (structured type) No documentation available.
publict_inline_object3 (structured type) No documentation available.
publict_inline_object4 (structured type) No documentation available.
publict_interpretation (structured type) The details of the normalized text, if applicable. This element is optional; it is returned only if normalized text exists.
publict_key (structured type) A key in a key-value pair.
publict_key_value_pair (structured type) Key-value pairs detected across cell boundaries.
publict_label (structured type) A pair of `nature` and `party` objects. The `nature` object identifies the effect of the element on the identified `party`, and the `party` object identifies the affected party.
publict_leading_sentence (structured type) The leading sentences in a section or subsection of the input document.
publict_location (structured type) The numeric location of the identified element in the document, represented with @@ -236,4 +236,4 @@
e_response Service return value of type T_BATCH_STATUS -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_discovery_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_discovery_v1.html index 14945b0..2fc702f 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_discovery_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_discovery_v1.html @@ -3,30 +3,31 @@ that you can add to applications to identify patterns, trends and actionable insights to drive better decision-making. Securely unify structured and unstructured data with pre-enriched content, and use a simplified query - language to eliminate the need for manual filtering of results.

Types

Visibility and LevelNameDocumentation
publict_aggregation_result (structured type) Aggregation results for the specified query.
publict_calculation (structured type) 
publict_collection (structured type) A collection for storing documents.
publict_collection_crawl_status (structured type) Object containing information about the crawl status of this collection.
publict_collection_disk_usage (structured type) Summary of the disk usage statistics for this collection.
publict_collection_usage (structured type) Summary of the collection usage in the environment.
publict_coll_query_large (structured type) Object that describes a long query.
publict_completions (structured type) An object containing an array of autocompletion suggestions.
publict_configuration (structured type) A custom configuration for the environment.
publict_conversions (structured type) Document conversion settings.
publict_create_collection_request (structured type) Object containing specification for a new collection.
publict_create_environment_request (structured type) Object containing information about a new environment.
publict_create_event_object (structured type) An object defining the event being created.
publict_create_event_response (structured type) An object defining the event being created.
publict_credentials (structured type) Object containing credential information.
publict_credentials_list (structured type) Object containing array of credential definitions.
publict_credential_details (structured type) Object containing details of the stored credentials. - + language to eliminate the need for manual filtering of results.

Types

Visibility and LevelNameDocumentation
publict_aggregation_result (structured type) Aggregation results for the specified query.
publict_calculation (structured type) No documentation available.
publict_collection (structured type) A collection for storing documents.
publict_collection_crawl_status (structured type) Object containing information about the crawl status of this collection.
publict_collection_disk_usage (structured type) Summary of the disk usage statistics for this collection.
publict_collection_usage (structured type) Summary of the collection usage in the environment.
publict_coll_query_large (structured type) Object that describes a long query.
publict_completions (structured type) An object containing an array of autocompletion suggestions.
publict_configuration (structured type) A custom configuration for the environment.
publict_conversions (structured type) Document conversion settings.
publict_create_collection_request (structured type) Object containing specification for a new collection.
publict_create_environment_request (structured type) Object containing information about a new environment.
publict_create_event_object (structured type) An object defining the event being created.
publict_create_event_response (structured type) An object defining the event being created.
publict_credentials (structured type) Object containing credential information.
publict_credentials_list (structured type) Object containing array of credential definitions.
publict_credential_details (structured type) Object containing details of the stored credentials.
+
Obtain credentials for your source from the administrator of the source.
publict_delete_collection_response (structured type) Response object returned when deleting a colleciton.
publict_delete_credentials (structured type) Object returned after credentials are deleted.
publict_delete_document_response (structured type) Information returned when a document is deleted.
publict_delete_environment_response (structured type) Response object returned when deleting an environment.
publict_del_configuration_response (structured type) Information returned when a configuration is deleted.
publict_disk_usage (structured type) Summary of the disk usage statistics for the environment.
publict_document_accepted (structured type) Information returned after an uploaded document is accepted.
publict_document_counts (structured type) Object containing collection document count information.
publict_document_status (structured type) Status information about a submitted document.
publict_elements_enrichment_options (structured type) An object representing the configuration options to use for the `elements` enrichment.
publict_enrichment (structured type) Enrichment step to perform on the document. Each enrichment is performed on the specified field in the order that they are listed in the configuration.
publict_enrichments TYPE STANDARD TABLE OF T_ENRICHMENT WITH NON-UNIQUE DEFAULT KEY An array of document enrichment settings for the configuration.
publict_enrichment_options (structured type) Options which are specific to a particular enrichment.
publict_environment (structured type) Details about an environment.
publict_environment_documents (structured type) Summary of the document usage statistics for the environment.
publict_error_response (structured type) An error response object.
publict_event_data (structured type) Query event data object.
publict_expansion (structured type) An expansion definition. Each object respresents one set of expandable strings. For example, you could have expansions for the word `hot` in one object, and - expansions for the word `cold` in another.
publict_expansions (structured type) The query expansion definitions for the specified collection.
publict_fed_query_large (structured type) Object that describes a long query.
publict_field (structured type) Object containing field details.
publict_filter (structured type) 
publict_font_setting (structured type) Font matching configuration.
publict_font_settings TYPE STANDARD TABLE OF T_FONT_SETTING WITH NON-UNIQUE DEFAULT KEY Array of font matching configurations.
publict_gateway (structured type) Object describing a specific gateway.
publict_gateway_delete (structured type) Gatway deletion confirmation.
publict_gateway_list (structured type) Object containing gateways array.
publict_gateway_name (structured type) Object containing user-defined name.
publict_histogram (structured type) 
publict_html_settings (structured type) A list of HTML conversion settings.
publict_index_capacity (structured type) Details about the resource usage and capacity of the environment.
publict_inline_object (structured type) 
publict_list_collections_response (structured type) Response object containing an array of collection details.
publict_list_configurations_response (structured type) Object containing an array of available configurations.
publict_list_environments_response (structured type) Response object containing an array of configured environments.
publict_log_qry_resp_rslt_docs_rslt (structured type) Each object in the **results** array corresponds to an individual document + expansions for the word `cold` in another.
publict_expansions (structured type) The query expansion definitions for the specified collection.
publict_fed_query_large (structured type) Object that describes a long query.
publict_field (structured type) Object containing field details.
publict_filter (structured type) No documentation available.
publict_font_setting (structured type) Font matching configuration.
publict_font_settings TYPE STANDARD TABLE OF T_FONT_SETTING WITH NON-UNIQUE DEFAULT KEY Array of font matching configurations.
publict_gateway (structured type) Object describing a specific gateway.
publict_gateway_delete (structured type) Gatway deletion confirmation.
publict_gateway_list (structured type) Object containing gateways array.
publict_gateway_name (structured type) Object containing user-defined name.
publict_histogram (structured type) No documentation available.
publict_html_settings (structured type) A list of HTML conversion settings.
publict_index_capacity (structured type) Details about the resource usage and capacity of the environment.
publict_inline_object (structured type) No documentation available.
publict_list_collections_response (structured type) Response object containing an array of collection details.
publict_list_configurations_response (structured type) Object containing an array of available configurations.
publict_list_environments_response (structured type) Response object containing an array of configured environments.
publict_log_qry_resp_rslt_docs_rslt (structured type) Each object in the **results** array corresponds to an individual document returned by the original query.
publict_log_query_response (structured type) Object containing results that match the requested **logs** query.
publict_log_query_response_result (structured type) Individual result object for a **logs** query. Each object represents either a query to a Discovery collection or an event that is associated with a query.
publict_log_query_resp_result_docs (structured type) Object containing result information that was returned by the query used to - create this log entry. Only returned with logs of type `query`.
publict_lst_collection_fields_resp (structured type) The list of fetched fields. - + create this log entry. Only returned with logs of type `query`.
publict_lst_collection_fields_resp (structured type) The list of fetched fields.
+
The fields are returned using a fully qualified name format, however, the format - differs slightly from that used by the query operations. - - * Fields which contain nested JSON objects are assigned a type of "nested". - + differs slightly from that used by the query operations.
+
+ * Fields which contain nested JSON objects are assigned a type of + "nested".
+
* Fields which belong to a nested object are prefixed with `.properties` (for example, `warnings.properties.severity` means that the `warnings` object has a - property called `severity`). - + property called `severity`).
+
* Fields returned from the News collection are prefixed with `v{N}-fullnews-t3-{YEAR}.mappings` (for example, `v5-fullnews-t3-2016.mappings.text.properties.author`).
publict_metric_aggregation (structured type) An aggregation analyzing log information for queries and events.
publict_metric_aggregation_result (structured type) Aggregation result data for the requested metric.
publict_metric_response (structured type) The response generated from a call to a **metrics** method.
publict_metric_token_aggregation (structured type) An aggregation analyzing log information for queries and events.
publict_metric_token_aggr_result (structured type) Aggregation result data for the requested metric.
publict_metric_token_response (structured type) The response generated from a call to a **metrics** method that evaluates - tokens.
publict_nested (structured type) 
publict_new_training_query (structured type) Training query to add.
publict_nlu_enrichment_categories type MAP An object that indicates the Categories enrichment will be applied to the + tokens.
publict_nested (structured type) No documentation available.
publict_new_training_query (structured type) Training query to add.
publict_nlu_enrichment_categories type MAP An object that indicates the Categories enrichment will be applied to the specified field.
publict_nlu_enrichment_concepts (structured type) An object specifiying the concepts enrichment and related parameters.
publict_nlu_enrichment_emotion (structured type) An object specifying the emotion detection enrichment and related parameters.
publict_nlu_enrichment_entities (structured type) An object speficying the Entities enrichment and related parameters.
publict_nlu_enrichment_features (structured type) Object containing Natural Language Understanding features to be used.
publict_nlu_enrichment_keywords (structured type) An object specifying the Keyword enrichment and related parameters.
publict_nlu_enrichment_options (structured type) An object representing the configuration options to use for the `natural_language_understanding` enrichments.
publict_nlu_enrichment_relations (structured type) An object specifying the relations enrichment and related parameters.
publict_nlu_enrichment_sentiment (structured type) An object specifying the sentiment extraction enrichment and related parameters.
publict_nl_enrichment_semantic_roles (structured type) An object specifiying the semantic roles enrichment and related parameters.
publict_normalizations TYPE STANDARD TABLE OF T_NORMALIZATION_OPERATION WITH NON-UNIQUE DEFAULT KEY Defines operations that can be used to transform the final output JSON into a @@ -34,8 +35,8 @@ array.
publict_normalization_operation (structured type) Object containing normalization operations.
publict_notice (structured type) A notice produced for the collection.
publict_pdf_heading_detection (structured type) Object containing heading detection conversion settings for PDF documents.
publict_pdf_settings (structured type) A list of PDF conversion settings.
publict_query_aggregation (structured type) An aggregation produced by Discovery to analyze the input provided.
publict_query_large (structured type) Object that describes a long query.
publict_query_notices_response (structured type) Object containing notice query results.
publict_query_notices_result (structured type) Query result object.
publict_query_passages (structured type) A passage query result.
publict_query_response (structured type) A response containing the documents and aggregations for the query.
publict_query_result (structured type) Query result object.
publict_query_result_metadata (structured type) Metadata of a query result.
publict_retrieval_details (structured type) An object contain retrieval type information.
publict_sdu_status (structured type) Object containing smart document understanding information for this collection.
publict_sdu_status_custom_fields (structured type) Information about custom smart document understanding fields that exist in this collection.
publict_search_status (structured type) Information about the Continuous Relevancy Training for this environment.
publict_segment_settings (structured type) A list of Document Segmentation settings.
publict_source (structured type) Object containing source parameters for the configuration.
publict_source_options (structured type) The **options** object defines which items to crawl from the source system.
publict_source_options_buckets (structured type) Object defining a cloud object store bucket to crawl.
publict_source_options_folder (structured type) Object that defines a box folder to crawl with this configuration.
publict_source_options_object (structured type) Object that defines a Salesforce document object type crawl with this configuration.
publict_source_options_site_coll (structured type) Object that defines a Microsoft SharePoint site collection to crawl with this - configuration.
publict_source_options_web_crawl (structured type) Object defining which URL to crawl and how to crawl it.
publict_source_schedule (structured type) Object containing the schedule information for the source.
publict_source_status (structured type) Object containing source crawl status information.
publict_term (structured type) 
publict_timeslice (structured type) 
publict_token_dict (structured type) Tokenization dictionary describing how words are tokenized during ingestion and - at query time.
publict_token_dict_rule (structured type) An object defining a single tokenizaion rule.
publict_token_dict_status_response (structured type) Object describing the current status of the wordlist.
publict_top_hits (structured type) 
publict_top_hits_results (structured type) Top hit information for this query.
publict_training_data_set (structured type) Training information for a specific collection.
publict_training_example (structured type) Training example details.
publict_training_example_list (structured type) Object containing an array of training examples.
publict_training_example_patch (structured type) Training example to add.
publict_training_query (structured type) Training query details.
publict_training_status (structured type) Training status details.
publict_update_collection_request (structured type) Object containing collection update information.
publict_update_environment_request (structured type) Object containing environment update information.
publict_word_heading_detection (structured type) Object containing heading detection conversion settings for Microsoft Word + configuration.
publict_source_options_web_crawl (structured type) Object defining which URL to crawl and how to crawl it.
publict_source_schedule (structured type) Object containing the schedule information for the source.
publict_source_status (structured type) Object containing source crawl status information.
publict_term (structured type) No documentation available.
publict_timeslice (structured type) No documentation available.
publict_token_dict (structured type) Tokenization dictionary describing how words are tokenized during ingestion and + at query time.
publict_token_dict_rule (structured type) An object defining a single tokenizaion rule.
publict_token_dict_status_response (structured type) Object describing the current status of the wordlist.
publict_top_hits (structured type) No documentation available.
publict_top_hits_results (structured type) Top hit information for this query.
publict_training_data_set (structured type) Training information for a specific collection.
publict_training_example (structured type) Training example details.
publict_training_example_list (structured type) Object containing an array of training examples.
publict_training_example_patch (structured type) Training example to add.
publict_training_query (structured type) Training query details.
publict_training_status (structured type) Training status details.
publict_update_collection_request (structured type) Object containing collection update information.
publict_update_environment_request (structured type) Object containing environment update information.
publict_word_heading_detection (structured type) Object containing heading detection conversion settings for Microsoft Word documents.
publict_word_settings (structured type) A list of Word conversion settings.
publict_word_style (structured type) Microsoft Word styles to convert into a specified HTML head level.
publict_word_styles TYPE STANDARD TABLE OF T_WORD_STYLE WITH NON-UNIQUE DEFAULT KEY Array of Microsoft Word styles to convert.
publict_xpath_patterns (structured type) Object containing an array of XPaths.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
add_document
importingi_environment_idtype STRING
i_collection_idtype STRING
i_filetype FILE optional
i_filenametype STRING optional
i_file_content_typetype STRING optional
i_metadatatype STRING optional
i_contenttypetype STRING default 'multipart/form-data'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DOCUMENT_ACCEPTED
raisingzcx_ibmc_service_exception
Add a document.
Parameters
i_environment_id @@ -45,7 +46,7 @@
i_file The content of the document to ingest. The maximum supported file size when adding a file to a collection is 50 megabytes, the maximum supported file size - when testing a confiruration is 1 megabyte. Files larger than the supported + when testing a configuration is 1 megabyte. Files larger than the supported size are rejected.
i_filename The filename for file. @@ -53,9 +54,9 @@ The content type of file.
i_metadata The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 - MB are rejected. Example: ``` { - "Creator": "Johnny Appleseed", - "Subject": "Apples" + MB are rejected. Example: ``` {
+ "Creator": "Johnny Appleseed",
+ "Subject": "Apples"
} ```.
e_response Service return value of type T_DOCUMENT_ACCEPTED @@ -84,16 +85,16 @@ The ID of the environment.
i_configuration Input an object that enables you to customize how your content is ingested and - what enrichments are added to your data. - + what enrichments are added to your data.
+
**name** is required and must be unique within the current **environment**. All - other properties are optional. - + other properties are optional.
+
If the input configuration contains the **configuration_id**, **created**, or **updated** properties, then they will be ignored and overridden by the system (an error is not returned so that the overridden fields do not need to be - removed when copying a configuration). - + removed when copying a configuration).
+
The configuration can contain unrecognized JSON fields. Any such fields will be ignored and will not generate an error. This makes it easier to use newer configuration files with older versions of the API and the service. It also @@ -269,12 +270,12 @@
Parameters
i_customer_id The customer ID for which all data is to be deleted. -
public instance
federated_query
importingi_environment_idtype STRING
i_query_longtype T_FED_QUERY_LARGE optional
i_x_watson_logging_opt_outtype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_QUERY_RESPONSE
raisingzcx_ibmc_service_exception
Query multiple collections. +
public instance
federated_query
importingi_environment_idtype STRING
i_query_longtype T_FED_QUERY_LARGE
i_x_watson_logging_opt_outtype BOOLEAN default C_BOOLEAN_FALSE
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_QUERY_RESPONSE
raisingzcx_ibmc_service_exception
Query multiple collections.
Parameters
i_environment_id The ID of the environment.
i_query_long - + No documentation available.
i_x_watson_logging_opt_out If `true`, queries are not stored in the Discovery **Logs** endpoint.
e_response @@ -316,8 +317,8 @@ specified.
i_highlight When true, a highlight field is returned for each result which contains the - fields which match the query with `` tags around the matching query - terms. + fields which match the query with `<em></em>` tags around the + matching query terms.
i_deduplicate_field When specified, duplicate results based on the field specified are removed from the returned results. Duplicate comparison is limited to the current query @@ -327,8 +328,8 @@ When `true`, results are returned based on their similarity to the document IDs specified in the **similar.document_ids** parameter.
i_similar_document_ids - A comma-separated list of document IDs to find similar documents. - + A comma-separated list of document IDs to find similar documents.
+
**Tip:** Include the **natural_language_query** parameter to expand the scope of the document similarity search with the natural language query. Other query parameters, such as **filter** and **query**, are subsequently applied and @@ -339,19 +340,19 @@ comparison.
e_response Service return value of type T_QUERY_NOTICES_RESPONSE -
public instanceget_appname redefinition 
public instance
get_autocompletion
importingi_environment_idtype STRING
i_collection_idtype STRING
i_fieldtype STRING optional
i_prefixtype STRING optional
i_counttype INTEGER optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COMPLETIONS
raisingzcx_ibmc_service_exception
Get Autocomplete Suggestions. +
public instanceget_appname redefinition 
public instance
get_autocompletion
importingi_environment_idtype STRING
i_collection_idtype STRING
i_prefixtype STRING
i_fieldtype STRING optional
i_counttype INTEGER optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COMPLETIONS
raisingzcx_ibmc_service_exception
Get Autocomplete Suggestions.
Parameters
i_environment_id The ID of the environment.
i_collection_id The ID of the collection. -
i_field - The field in the result documents that autocompletion suggestions are identified - from.
i_prefix The prefix to use for autocompletion. For example, the prefix `Ho` could autocomplete to `Hot`, `Housing`, or `How do I upgrade`. Possible completions are. +
i_field + The field in the result documents that autocompletion suggestions are identified + from.
i_count The number of autocompletion suggestions to return.
e_response @@ -648,8 +649,8 @@ specified.
i_highlight When true, a highlight field is returned for each result which contains the - fields which match the query with `` tags around the matching query - terms. + fields which match the query with `<em></em>` tags around the + matching query terms.
i_passages_fields A comma-separated list of fields that passages are drawn from. If this parameter not specified, then all top-level fields are included. @@ -667,8 +668,8 @@ When `true`, results are returned based on their similarity to the document IDs specified in the **similar.document_ids** parameter.
i_similar_document_ids - A comma-separated list of document IDs to find similar documents. - + A comma-separated list of document IDs to find similar documents.
+
**Tip:** Include the **natural_language_query** parameter to expand the scope of the document similarity search with the natural language query. Other query parameters, such as **filter** and **query**, are subsequently applied and @@ -679,7 +680,7 @@ comparison.
e_response Service return value of type T_QUERY_NOTICES_RESPONSE -
public instance
update_collection
importingi_environment_idtype STRING
i_collection_idtype STRING
i_bodytype T_UPDATE_COLLECTION_REQUEST optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COLLECTION
raisingzcx_ibmc_service_exception
Update a collection. +
public instance
update_collection
importingi_environment_idtype STRING
i_collection_idtype STRING
i_bodytype T_UPDATE_COLLECTION_REQUEST
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COLLECTION
raisingzcx_ibmc_service_exception
Update a collection.
Parameters
i_environment_id The ID of the environment. @@ -700,13 +701,13 @@ ingested and what enrichments are added to your data. The **name** parameter is required and must be unique within the current **environment**. All other properties are optional, but if they are omitted the default values replace - the current value of each omitted property. - + the current value of each omitted property.
+
If the input configuration contains the **configuration_id**, **created**, or **updated** properties, they are ignored and overridden by the system, and an error is not returned so that the overridden fields do not need to be removed - when updating a configuration. - + when updating a configuration.
+
The configuration can contain unrecognized JSON fields. Any such fields are ignored and do not generate an error. This makes it easier to use newer configuration files with older versions of the API and the service. It also @@ -735,7 +736,7 @@
i_file The content of the document to ingest. The maximum supported file size when adding a file to a collection is 50 megabytes, the maximum supported file size - when testing a confiruration is 1 megabyte. Files larger than the supported + when testing a configuration is 1 megabyte. Files larger than the supported size are rejected.
i_filename The filename for file. @@ -743,9 +744,9 @@ The content type of file.
i_metadata The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 - MB are rejected. Example: ``` { - "Creator": "Johnny Appleseed", - "Subject": "Apples" + MB are rejected. Example: ``` {
+ "Creator": "Johnny Appleseed",
+ "Subject": "Apples"
} ```.
e_response Service return value of type T_DOCUMENT_ACCEPTED @@ -771,4 +772,4 @@ The body of the example that is to be added to the specified query.
e_response Service return value of type T_TRAINING_EXAMPLE -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_lang_translator_v3.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_lang_translator_v3.html index a14399f..18f1016 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_lang_translator_v3.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_lang_translator_v3.html @@ -4,9 +4,9 @@ can customize based on your unique terminology and language. Use Language Translator to take news from across the globe and present it in your language, communicate with your customers in their own language, and more.

Types

Visibility and LevelNameDocumentation
publict_base_model_id type STRING Model ID of the base model that was used to customize the model. If the model is - not a custom model, this will be absent or an empty string.
publict_delete_model_result (structured type) 
publict_document_id type STRING System generated ID identifying a document being translated using one specific - translation model.
publict_document_list (structured type) 
publict_document_status (structured type) Document information, including translation status.
publict_error_response (structured type) 
publict_identifiable_language (structured type) 
publict_identifiable_languages (structured type) 
publict_identified_language (structured type) 
publict_identified_languages (structured type) 
publict_inline_object (structured type) 
publict_inline_object1 (structured type) 
publict_model_id type STRING A globally unique string that identifies the underlying model that is used for - translation.
publict_source type STRING Translation source language code.
publict_target type STRING Translation target language code.
publict_translate_request (structured type) 
publict_translation (structured type) 
publict_translation_model (structured type) Response payload for models.
publict_translation_models (structured type) The response type for listing existing translation models.
publict_translation_result (structured type) 
publict_translation_status type STRING The status of the translation job associated with a submitted document.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
create_model
importingi_base_model_idtype STRING
i_forced_glossarytype FILE optional
i_parallel_corpustype FILE optional
i_nametype STRING optional
i_forced_glossary_cttype STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL
i_parallel_corpus_cttype STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL
i_contenttypetype STRING default 'multipart/form-data'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRANSLATION_MODEL
raisingzcx_ibmc_service_exception
Create model. + not a custom model, this will be absent or an empty string.
publict_delete_model_result (structured type) No documentation available.
publict_document_id type STRING System generated ID identifying a document being translated using one specific + translation model.
publict_document_list (structured type) No documentation available.
publict_document_status (structured type) Document information, including translation status.
publict_error_response (structured type) No documentation available.
publict_identifiable_language (structured type) No documentation available.
publict_identifiable_languages (structured type) No documentation available.
publict_identified_language (structured type) No documentation available.
publict_identified_languages (structured type) No documentation available.
publict_inline_object (structured type) No documentation available.
publict_inline_object1 (structured type) No documentation available.
publict_model_id type STRING A globally unique string that identifies the underlying model that is used for + translation.
publict_source type STRING Translation source language code.
publict_target type STRING Translation target language code.
publict_translate_request (structured type) No documentation available.
publict_translation (structured type) No documentation available.
publict_translation_model (structured type) Response payload for models.
publict_translation_models (structured type) The response type for listing existing translation models.
publict_translation_result (structured type) No documentation available.
publict_translation_status type STRING The status of the translation job associated with a submitted document.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
create_model
importingi_base_model_idtype STRING
i_forced_glossarytype FILE optional
i_parallel_corpustype FILE optional
i_nametype STRING optional
i_forced_glossary_cttype STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL
i_parallel_corpus_cttype STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL
i_contenttypetype STRING default 'multipart/form-data'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRANSLATION_MODEL
raisingzcx_ibmc_service_exception
Create model.
Parameters
i_base_model_id The model ID of the model to use as the base for customization. To see available @@ -110,12 +110,12 @@
public instance
translate_document
importingi_filetype FILE
i_filenametype STRING
i_file_content_typetype STRING optional
i_model_idtype STRING optional
i_sourcetype STRING optional
i_targettype STRING optional
i_document_idtype STRING optional
i_contenttypetype STRING default 'multipart/form-data'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_DOCUMENT_STATUS
raisingzcx_ibmc_service_exception
Translate document.
Parameters
i_file - The source file to translate. - + The contents of the source file to translate.
+
[Supported file types](https://cloud.ibm.com/docs/services/language-translator?topic=language-t - ranslator-document-translator-tutorial#supported-file-formats) - + ranslator-document-translator-tutorial#supported-file-formats)
+
Maximum file size: **20 MB**.
i_filename The filename for file. @@ -133,4 +133,4 @@ enter the `document_id` of the document.
e_response Service return value of type T_DOCUMENT_STATUS -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_class_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_class_v1.html index 16a7506..eaab147 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_class_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_class_v1.html @@ -2,7 +2,7 @@ IBM Watson™ Natural Language Classifier uses machine learning algorithms to return the top matching predefined classes for short text input. You create and train a classifier to connect predefined classes to example texts so that - the service can apply those classes to new inputs.

Types

Visibility and LevelNameDocumentation
publict_classification (structured type) Response from the classifier for a phrase.
publict_classification_collection (structured type) Response from the classifier for multiple phrases.
publict_classified_class (structured type) Class and confidence.
publict_classifier (structured type) A classifier for natural language phrases.
publict_classifier_list (structured type) List of available classifiers.
publict_classify_collection_input (structured type) Request payload to classify.
publict_classify_input (structured type) Request payload to classify.
publict_collection_item (structured type) Response from the classifier for a phrase in a collection.
publict_empty type JSONOBJECT 
publict_error_cloud (structured type) Response payload for Cloud errors.
publict_error_response (structured type) Response payload for HTTP errors.
publict_inline_object (structured type) 

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
classify
importingi_classifier_idtype STRING
i_bodytype T_CLASSIFY_INPUT
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_CLASSIFICATION
raisingzcx_ibmc_service_exception
Classify a phrase. + the service can apply those classes to new inputs.

Types

Visibility and LevelNameDocumentation
publict_classification (structured type) Response from the classifier for a phrase.
publict_classification_collection (structured type) Response from the classifier for multiple phrases.
publict_classified_class (structured type) Class and confidence.
publict_classifier (structured type) A classifier for natural language phrases.
publict_classifier_list (structured type) List of available classifiers.
publict_classify_collection_input (structured type) Request payload to classify.
publict_classify_input (structured type) Request payload to classify.
publict_collection_item (structured type) Response from the classifier for a phrase in a collection.
publict_empty type JSONOBJECT No documentation available.
publict_error_cloud (structured type) Response payload for Cloud errors.
publict_error_response (structured type) Response payload for HTTP errors.
publict_inline_object (structured type) No documentation available.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
classify
importingi_classifier_idtype STRING
i_bodytype T_CLASSIFY_INPUT
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_CLASSIFICATION
raisingzcx_ibmc_service_exception
Classify a phrase.
Parameters
i_classifier_id Classifier ID to use. @@ -23,16 +23,16 @@
Parameters
i_training_metadata Metadata in JSON format. The metadata identifies the language of the data, and an optional name to identify the classifier. Specify the language with the - 2-letter primary language code as assigned in ISO standard 639. - + 2-letter primary language code as assigned in ISO standard 639.
+
Supported languages are English (`en`), Arabic (`ar`), French (`fr`), German, (`de`), Italian (`it`), Japanese (`ja`), Korean (`ko`), Brazilian Portuguese (`pt`), and Spanish (`es`).
i_training_data Training data in CSV format. Each text value must have at least one class. The data can include up to 3,000 classes and 20,000 records. For details, see [Data - preparation](https://cloud.ibm.com/docs/services/natural-language-classifier?to - pic=natural-language-classifier-using-your-data). + preparation](https://cloud.ibm.com/docs/natural-language-classifier?topic=natur + al-language-classifier-using-your-data).
e_response Service return value of type T_CLASSIFIER
public instance
delete_classifier
importingi_classifier_idtype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception
Delete classifier. @@ -49,4 +49,4 @@
Parameters
e_response Service return value of type T_CLASSIFIER_LIST -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_undrstnd_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_undrstnd_v1.html index 27d563a..2fb60dd 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_undrstnd_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_nat_lang_undrstnd_v1.html @@ -3,58 +3,57 @@ public URL and IBM Watson Natural Language Understanding will give you results for the features you request. The service cleans HTML content before analysis by default, so the results can ignore most advertisements and other unwanted - content. - + content.
+
You can create [custom models](https://cloud.ibm.com/docs/services/natural-language-understanding?topi c=natural-language-understanding-customizing) with Watson Knowledge Studio to - detect custom entities, relations, and categories in Natural Language - Understanding.

Types

Visibility and LevelNameDocumentation
publict_analysis_results (structured type) Results of the analysis, organized by feature.
publict_analysis_results_metadata (structured type) Webpage metadata, such as the author and the title of the page.
publict_analysis_results_usage (structured type) API usage information for the request.
publict_author (structured type) The author of the analyzed content.
publict_categories_options (structured type) Returns a five-level taxonomy of the content. The top three categories are - returned. - + detect custom entities and relations in Natural Language Understanding.

Types

Visibility and LevelNameDocumentation
publict_analysis_results (structured type) Results of the analysis, organized by feature.
publict_analysis_results_metadata (structured type) Webpage metadata, such as the author and the title of the page.
publict_analysis_results_usage (structured type) API usage information for the request.
publict_author (structured type) The author of the analyzed content.
publict_categories_options (structured type) Returns a five-level taxonomy of the content. The top three categories are + returned.
+
Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, Portuguese, Spanish.
publict_categories_relevant_text (structured type) Relevant text that contributed to the categorization.
publict_categories_result (structured type) A categorization of the analyzed text.
publict_concepts_options (structured type) Returns high-level concepts in the content. For example, a research paper about deep learning might return the concept, "Artificial Intelligence" although the - term is not mentioned. - + term is not mentioned.
+
Supported languages: English, French, German, Italian, Japanese, Korean, - Portuguese, Spanish.
publict_concepts_result (structured type) The general concepts referenced or alluded to in the analyzed text.
publict_ctgrs_result_explanation (structured type) Information that helps to explain what contributed to the categories result.
publict_dbpedia_resource type STRING Link to the corresponding DBpedia resource.
publict_delete_model_results (structured type) Delete model results.
publict_disambiguation_result (structured type) Disambiguation information for the entity.
publict_document_emotion_results (structured type) Emotion results for the document as a whole.
publict_document_sentiment_results (structured type) 
publict_emotion_options (structured type) Detects anger, disgust, fear, joy, or sadness that is conveyed in the content or + Portuguese, Spanish.
publict_concepts_result (structured type) The general concepts referenced or alluded to in the analyzed text.
publict_ctgrs_result_explanation (structured type) Information that helps to explain what contributed to the categories result.
publict_dbpedia_resource type STRING Link to the corresponding DBpedia resource.
publict_delete_model_results (structured type) Delete model results.
publict_disambiguation_result (structured type) Disambiguation information for the entity.
publict_document_emotion_results (structured type) Emotion results for the document as a whole.
publict_document_sentiment_results (structured type) No documentation available.
publict_emotion_options (structured type) Detects anger, disgust, fear, joy, or sadness that is conveyed in the content or by the context around target phrases specified in the targets parameter. You can analyze emotion for detected entities with `entities.emotion` and for - keywords with `keywords.emotion`. - + keywords with `keywords.emotion`.
+
Supported languages: English.
publict_emotion_result (structured type) The detected anger, disgust, fear, joy, or sadness that is conveyed by the content. Emotion information can be returned for detected entities, keywords, - or user-specified target phrases found in the text.
publict_emotion_scores (structured type) 
publict_entities_options (structured type) Identifies people, cities, organizations, and other entities in the content. See + or user-specified target phrases found in the text.
publict_emotion_scores (structured type) No documentation available.
publict_entities_options (structured type) Identifies people, cities, organizations, and other entities in the content. See [Entity types and subtypes](https://cloud.ibm.com/docs/services/natural-language-understanding?to - pic=natural-language-understanding-entity-types). - + pic=natural-language-understanding-entity-types).
+
Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported only through custom models.
publict_entities_result (structured type) The important people, places, geopolitical entities and other types of entities - in your content.
publict_entity_mention (structured type) 
publict_error_response (structured type) 
publict_features (structured type) Analysis features and options.
publict_features_results (structured type) Analysis results for each requested feature.
publict_features_results_metadata (structured type) Webpage metadata, such as the author and the title of the page.
publict_feature_sentiment_results (structured type) 
publict_feed (structured type) RSS or ATOM feed found on the webpage.
publict_keywords_options (structured type) Returns important keywords in the content. - + in your content.
publict_entity_mention (structured type) No documentation available.
publict_error_response (structured type) No documentation available.
publict_features (structured type) Analysis features and options.
publict_features_results (structured type) Analysis results for each requested feature.
publict_features_results_metadata (structured type) Webpage metadata, such as the author and the title of the page.
publict_feature_sentiment_results (structured type) No documentation available.
publict_feed (structured type) RSS or ATOM feed found on the webpage.
publict_keywords_options (structured type) Returns important keywords in the content.
+
Supported languages: English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish.
publict_keywords_result (structured type) The important keywords in the content, organized by relevance.
publict_list_models_results (structured type) Custom models that are available for entities and relations.
publict_metadata_options type JSONOBJECT Returns information from the document, including author name, title, RSS/ATOM feeds, prominent page image, and publication date. Supports URL and HTML input types only.
publict_metadata_result (structured type) The authors, publication date, title, prominent page image, and RSS/ATOM feeds - of the webpage. Supports URL and HTML input types.
publict_model (structured type) 
publict_parameters (structured type) An object containing request parameters.
publict_relations_options (structured type) Recognizes when two entities are related and identifies the type of relation. + of the webpage. Supports URL and HTML input types.
publict_model (structured type) No documentation available.
publict_model_file_and_metadata (structured type) Metadata associated with this custom model.
publict_model_metadata (structured type) Metadata associated with this custom model.
publict_parameters (structured type) An object containing request parameters.
publict_relations_options (structured type) Recognizes when two entities are related and identifies the type of relation. For example, an `awardedTo` relation might connect the entities "Nobel Prize" and "Albert Einstein". See [Relation types](https://cloud.ibm.com/docs/services/natural-language-understanding?topic - =natural-language-understanding-relations). - + =natural-language-understanding-relations).
+
Supported languages: Arabic, English, German, Japanese, Korean, Spanish. Chinese, Dutch, French, Italian, and Portuguese custom models are also - supported.
publict_relations_result (structured type) The relations between entities found in the content.
publict_relation_argument (structured type) 
publict_relation_entity (structured type) An entity that corresponds with an argument in a relation.
publict_semantic_roles_action (structured type) 
publict_semantic_roles_entity (structured type) 
publict_semantic_roles_keyword (structured type) 
publict_semantic_roles_object (structured type) 
publict_semantic_roles_options (structured type) Parses sentences into subject, action, and object form. - - Supported languages: English, German, Japanese, Korean, Spanish.
publict_semantic_roles_result (structured type) The object containing the actions and the objects the actions act upon.
publict_semantic_roles_result_action (structured type) The extracted action from the sentence.
publict_semantic_roles_result_object (structured type) The extracted object from the sentence.
publict_semantic_roles_subject (structured type) 
publict_semantic_roles_verb (structured type) 
publict_sentence_result (structured type) 
publict_sentiment_options (structured type) Analyzes the general sentiment of your content or the sentiment toward specific + supported.
publict_relations_result (structured type) The relations between entities found in the content.
publict_relation_argument (structured type) No documentation available.
publict_relation_entity (structured type) An entity that corresponds with an argument in a relation.
publict_semantic_roles_action (structured type) No documentation available.
publict_semantic_roles_entity (structured type) No documentation available.
publict_semantic_roles_keyword (structured type) No documentation available.
publict_semantic_roles_object (structured type) No documentation available.
publict_semantic_roles_options (structured type) Parses sentences into subject, action, and object form.
+
+ Supported languages: English, German, Japanese, Korean, Spanish.
publict_semantic_roles_result (structured type) The object containing the actions and the objects the actions act upon.
publict_semantic_roles_result_action (structured type) The extracted action from the sentence.
publict_semantic_roles_result_object (structured type) The extracted object from the sentence.
publict_semantic_roles_subject (structured type) No documentation available.
publict_semantic_roles_verb (structured type) No documentation available.
publict_sentence_result (structured type) No documentation available.
publict_sentiment_options (structured type) Analyzes the general sentiment of your content or the sentiment toward specific target phrases. You can analyze sentiment for detected entities with - `entities.sentiment` and for keywords with `keywords.sentiment`. - + `entities.sentiment` and for keywords with `keywords.sentiment`.
+
Supported languages: Arabic, English, French, German, Italian, Japanese, - Korean, Portuguese, Russian, Spanish.
publict_sentiment_result (structured type) The sentiment of the content.
publict_smntc_roles_result_subject (structured type) The extracted subject from the sentence.
publict_syntax_options (structured type) Returns tokens and sentences from the input text.
publict_syntax_options_tokens (structured type) Tokenization options.
publict_syntax_result (structured type) Tokens and sentences returned from syntax analysis.
publict_targeted_emotion_results (structured type) Emotion results for a specified target.
publict_targeted_sentiment_results (structured type) 
publict_token_result (structured type) 
publict_usage (structured type) Usage information.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
analyze
importingi_parameterstype T_PARAMETERS
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_ANALYSIS_RESULTS
raisingzcx_ibmc_service_exception
Analyze text. + Korean, Portuguese, Russian, Spanish.
publict_sentiment_result (structured type) The sentiment of the content.
publict_smntc_roles_result_subject (structured type) The extracted subject from the sentence.
publict_syntax_options (structured type) Returns tokens and sentences from the input text.
publict_syntax_options_tokens (structured type) Tokenization options.
publict_syntax_result (structured type) Tokens and sentences returned from syntax analysis.
publict_targeted_emotion_results (structured type) Emotion results for a specified target.
publict_targeted_sentiment_results (structured type) No documentation available.
publict_token_result (structured type) No documentation available.
publict_usage (structured type) Usage information.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
analyze
importingi_parameterstype T_PARAMETERS
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_ANALYSIS_RESULTS
raisingzcx_ibmc_service_exception
Analyze text.
Parameters
i_parameters An object containing request parameters. The `features` object and one of the @@ -71,4 +70,4 @@
Parameters
e_response Service return value of type T_LIST_MODELS_RESULTS -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_personal_insights_v3.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_personal_insights_v3.html index 7267aee..cc54ea7 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_personal_insights_v3.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_personal_insights_v3.html @@ -4,21 +4,21 @@ communications. The service uses linguistic analytics to infer individuals' intrinsic personality characteristics, including Big Five, Needs, and Values, from digital communications such as email, text messages, tweets, and forum - posts. - + posts.
+
The service can automatically infer, from potentially noisy social media, portraits of individuals that reflect their personality characteristics. The service can infer consumption preferences based on the results of its analysis - and, for JSON content that is timestamped, can report temporal behavior. + and, for JSON content that is timestamped, can report temporal behavior.
* For information about the meaning of the models that the service uses to describe personality characteristics, see [Personality models](https://cloud.ibm.com/docs/services/personality-insights?topic=personal - ity-insights-models#models). + ity-insights-models#models).
* For information about the meaning of the consumption preferences, see [Consumption preferences](https://cloud.ibm.com/docs/services/personality-insights?topic=per - sonality-insights-preferences#preferences). - + sonality-insights-preferences#preferences).
+
**Note:** Request logging is disabled for the Personality Insights service. Regardless of whether you set the `X-Watson-Learning-Opt-Out` request header, the service does not log or retain data from requests and responses.

Types

Visibility and LevelNameDocumentation
publict_behavior (structured type) The temporal behavior for the input content.
publict_cnsmptn_preferences_category (structured type) The consumption preferences that the service inferred from the input content.
publict_consumption_preferences (structured type) A consumption preference that the service inferred from the input content.
publict_content (structured type) The full input content that the service is to analyze.
publict_content_item (structured type) An input content item that the service is to analyze.
publict_csv_file type STRING A CSV file that contains the results of the personality profile that the service @@ -36,8 +36,8 @@
i_content_language The language of the input text for the request: Arabic, English, Japanese, Korean, or Spanish. Regional variants are treated as their parent language; for - example, `en-US` is interpreted as `en`. - + example, `en-US` is interpreted as `en`.
+
The effect of the **Content-Language** parameter depends on the **Content-Type** parameter. When **Content-Type** is `text/plain` or `text/html`, **Content-Language** is the only way to specify the language. When @@ -65,7 +65,9 @@ default, no consumption preferences are returned.
e_response Service return value of type T_PROFILE -
public instance
profile_as_csv
importingi_contenttype T_CONTENT
i_content_typetype STRING default 'text/plain'
i_content_languagetype STRING default 'en'
i_accept_languagetype STRING default 'en'
i_raw_scorestype BOOLEAN default C_BOOLEAN_FALSE
i_csv_headerstype BOOLEAN default C_BOOLEAN_FALSE
i_consumption_preferencestype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'text/csv'
raisingzcx_ibmc_service_exception
Get profile as csv. +
Class-based Exceptions
zcx_ibmc_service_exception + Exception being raised in case of an error. +
public instance
profile_as_csv
importingi_contenttype T_CONTENT
i_content_typetype STRING default 'text/plain'
i_content_languagetype STRING default 'en'
i_accept_languagetype STRING default 'en'
i_raw_scorestype BOOLEAN default C_BOOLEAN_FALSE
i_csv_headerstype BOOLEAN default C_BOOLEAN_FALSE
i_consumption_preferencestype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'text/csv'
exportinge_responsetype STRING
raisingzcx_ibmc_service_exception
Get profile as csv.
Parameters
i_content A maximum of 20 MB of content to analyze, though the service requires much less @@ -79,8 +81,8 @@
i_content_language The language of the input text for the request: Arabic, English, Japanese, Korean, or Spanish. Regional variants are treated as their parent language; for - example, `en-US` is interpreted as `en`. - + example, `en-US` is interpreted as `en`.
+
The effect of the **Content-Language** parameter depends on the **Content-Type** parameter. When **Content-Type** is `text/plain` or `text/html`, **Content-Language** is the only way to specify the language. When @@ -106,4 +108,7 @@
i_consumption_preferences Indicates whether consumption preferences are returned with the results. By default, no consumption preferences are returned. -
\ No newline at end of file + e_response + Service return value of type STRING +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service.html index de7c2ae..3cdd1d6 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service.html @@ -1 +1,109 @@ -Class ZCL_IBMC_SERVICE

Class ZCL_IBMC_SERVICE

public inheriting from ZCL_IBMC_SERVICE_ARCH create public

Documentation

IBM Watson ABAP SDK - Service Class

Types

Visibility and LevelNameDocumentation
publicbinary type XSTRING 
publicboolean type ZIF_IBMC_SERVICE_ARCH~BOOLEAN 
publicchar type ZIF_IBMC_SERVICE_ARCH~CHAR 
publicdata_reference type ref to DATA 
publicdate type STRING 
publicdatetime (typing) 
publicdouble type F 
publicfieldname (typing) 
publicfile type XSTRING 
publicfloat type F 
publicinteger type I 
publicjsonobject type ref to DATA 
publiclong type INT8 
publicmap type ref to DATA 
publicnumber type F 
publicshort type INT2 
publictime type STRING 
publicts_file_with_metadata (structured type) 
publicts_form_part (structured type) 
publicts_map_file (structured type) 
publictt_boolean TYPE standard table of ZIF_IBMC_SERVICE_ARCH~BOOLEAN with non-unique default key 
publictt_char TYPE standard table of ZIF_IBMC_SERVICE_ARCH~CHAR with non-unique default key 
publictt_double TYPE standard table of DOUBLE with non-unique default key 
publictt_file TYPE standard table of FILE with non-unique default key 
publictt_file_with_metadata TYPE standard table of TS_FILE_WITH_METADATA with non-unique default key 
publictt_float TYPE standard table of FLOAT with non-unique default key 
publictt_form_part TYPE standard table of TS_FORM_PART 
publictt_integer TYPE standard table of INTEGER with non-unique default key 
publictt_long TYPE standard table of LONG with non-unique default key 
publictt_map_file TYPE standard table of TS_MAP_FILE with non-unique default key 
publictt_number TYPE standard table of NUMBER with non-unique default key 
publictt_short TYPE standard table of SHORT with non-unique default key 
publictt_string type ZIF_IBMC_SERVICE_ARCH~TT_STRING 

Constants

Visibility and LevelNameDocumentation
public staticc_blank type STRING value '&#§§#&__%$X' 
public staticc_boolean_false type BOOLEAN value SPACE 
public staticc_boolean_true type BOOLEAN value 'X' 
public staticc_datatype (structured type)  
public staticc_default type STRING value 'DEFAULT' 
public staticc_f_zero type F value '-2147481.648' 
public staticc_i8_zero type INT8 value -9223372036854775608 
public staticc_i_zero type I value -2147481648 
public staticc_msgid type SY-MSGID value 'ZIBMC' 
public staticc_subrc_unknown type SY-SUBRC value 999999 
public staticc_tribool_false type BOOLEAN value '-' 

Attributes

Visibility and LevelNameDocumentation
public instancep_debug_mode type CHAR value SPACE 
public instancep_request_prop_default type TS_REQUEST_PROP  
public instancep_version type STRING  

Methods

Visibility and LevelNameDocumentation
public static
abap_to_json
importingi_nametype STRING optional
i_valuetype ANY
i_dictionarytype ANY optional
i_required_fieldstype ANY optional
i_lower_casetype BOOLEAN default C_BOOLEAN_TRUE
returningvalue(e_json)type STRING
 
public static
add_header_parameter
importingi_parametertype STRING
i_valuetype STRING
i_is_booleantype BOOLEAN default C_BOOLEAN_FALSE
changingc_headerstype ZIF_IBMC_SERVICE_ARCH~TS_REQUEST_PROP-HEADERS
 
public static
add_query_parameter
importingi_parametertype STRING
i_valuetype STRING
i_is_booleantype BOOLEAN default C_BOOLEAN_FALSE
changingc_urltype TS_URL
 
public static
get_datatype
importingi_fieldtype ANY
returningvalue(e_datatype)type ZIF_IBMC_SERVICE_ARCH~CHAR
Returns data type of a variable
public static
get_file_extension
importingvalue(i_mime_type)type STRING
returningvalue(e_extension)type STRING
Returns file extension for given mime type
public static
get_full_url
importingi_urltype TS_URL
returningvalue(e_url)type STRING
 
public static
move_data_reference_to_abap
importingi_data_referencetype DATA_REFERENCE
exportingvalue(e_abap)type ANY
raisingzcx_ibmc_service_exception
moves type DATA_REFERENCE to ABAP structure
Class-based Exceptions
zcx_ibmc_service_exceptionIBM Cloud Service Exception
public static
normalize_url
changingc_urltype TS_URL
 
public static
raise_exception
importingi_msgnotype SY-MSGNO optional
i_msgv1type STRING optional
i_msgv2type STRING optional
i_msgv3type STRING optional
i_msgv4type STRING optional
i_texttype STRING optional
i_subrctype SY-SUBRC default C_SUBRC_UNKNOWN
i_previoustype ref to CX_ROOT optional
i_http_statustype TS_HTTP_STATUS optional
raisingzcx_ibmc_service_exception
 
public static
unescape_unicode
importingi_intype STRING
returningvalue(e_out)type STRING
Unescapes unicode codepoints
public instance
add_form_part
importingi_clienttype TS_CLIENT
it_form_parttype TT_FORM_PART
raisingzcx_ibmc_service_exception
 
public instance
check_http_response
importingi_responsetype TO_REST_RESPONSE optional
i_urltype TS_URL optional
raisingzcx_ibmc_service_exception
 
public instance
constructor
importingi_hosttype STRING optional
i_proxy_hosttype STRING optional
i_proxy_porttype STRING optional
i_usernametype STRING optional
i_passwordtype STRING optional
i_apikeytype STRING optional
i_access_tokentype TS_ACCESS_TOKEN optional
i_ssl_idtype ZIF_IBMC_SERVICE_ARCH~TY_SSL_ID optional
i_debug_modetype CHAR default SPACE
 
public instance
get_access_token
importingi_request_proptype TS_REQUEST_PROP optional
returningvalue(e_access_token)type TS_ACCESS_TOKEN
raisingzcx_ibmc_service_exception
 
public instance
get_appname
returningvalue(e_appname)type STRING
 
public instance
get_request_prop
importingi_auth_methodtype STRING default C_DEFAULT
returningvalue(e_request_prop)type TS_REQUEST_PROP
 
public instance
get_rest_client
importingi_request_proptype TS_REQUEST_PROP
returningvalue(e_client)type TS_CLIENT
raisingzcx_ibmc_service_exception
 
public instance
http_delete
importingi_request_proptype TS_REQUEST_PROP
returningvalue(e_response)type TO_REST_RESPONSE
raisingzcx_ibmc_service_exception
 
public instance
http_get
importingi_request_proptype TS_REQUEST_PROP
returningvalue(e_response)type TO_REST_RESPONSE
raisingzcx_ibmc_service_exception
 
public instance
http_post
importingi_request_proptype TS_REQUEST_PROP
returningvalue(e_response)type TO_REST_RESPONSE
raisingzcx_ibmc_service_exception
 
public instance
http_post_multipart
importingi_request_proptype TS_REQUEST_PROP
it_form_parttype TT_FORM_PART
returningvalue(e_response)type TO_REST_RESPONSE
raisingzcx_ibmc_service_exception
 
public instance
http_put
importingi_request_proptype TS_REQUEST_PROP
returningvalue(e_response)type TO_REST_RESPONSE
raisingzcx_ibmc_service_exception
 
public instance
set_access_token
importingi_access_tokentype TS_ACCESS_TOKEN
raisingzcx_ibmc_service_exception
 
\ No newline at end of file +Class ZCL_IBMC_SERVICE

Class ZCL_IBMC_SERVICE

public inheriting from ZCL_IBMC_SERVICE_ARCH create public

Documentation

ABAP SDK for IBM Watson - Service Class

Types

Visibility and LevelNameDocumentation
publicbinary type XSTRING 
publicboolean type ZIF_IBMC_SERVICE_ARCH~BOOLEAN 
publicchar type ZIF_IBMC_SERVICE_ARCH~CHAR 
publicdata_reference type ref to DATA 
publicdate type STRING 
publicdatetime (typing) 
publicdouble type F 
publicfieldname (typing) 
publicfile type XSTRING 
publicfloat type F 
publicinteger type I 
publicjsonobject type ref to DATA 
publiclong type INT8 
publicmap type ref to DATA 
publicnumber type F 
publicshort type INT2 
publictime type STRING 
publicts_file_with_metadata (structured type) 
publicts_form_part type ZIF_IBMC_SERVICE_ARCH~TS_FORM_PART 
publicts_map_file (structured type) 
publictt_boolean TYPE standard table of ZIF_IBMC_SERVICE_ARCH~BOOLEAN with non-unique default key 
publictt_char TYPE standard table of ZIF_IBMC_SERVICE_ARCH~CHAR with non-unique default key 
publictt_double TYPE standard table of DOUBLE with non-unique default key 
publictt_file TYPE standard table of FILE with non-unique default key 
publictt_file_with_metadata TYPE standard table of TS_FILE_WITH_METADATA with non-unique default key 
publictt_float TYPE standard table of FLOAT with non-unique default key 
publictt_form_part type ZIF_IBMC_SERVICE_ARCH~TT_FORM_PART 
publictt_integer TYPE standard table of INTEGER with non-unique default key 
publictt_long TYPE standard table of LONG with non-unique default key 
publictt_map_file TYPE standard table of TS_MAP_FILE with non-unique default key 
publictt_number TYPE standard table of NUMBER with non-unique default key 
publictt_short TYPE standard table of SHORT with non-unique default key 
publictt_string type ZIF_IBMC_SERVICE_ARCH~TT_STRING 

Constants

Visibility and LevelNameDocumentation
public staticc_blank type STRING value '&#§§#&__%$X' 
public staticc_boolean_false type BOOLEAN value SPACE 
public staticc_boolean_true type BOOLEAN value 'X' 
public staticc_datatype (structured type)  
public staticc_default type STRING value 'DEFAULT' 
public staticc_f_zero type F value '-2147481.648' 
public staticc_i8_zero type INT8 value -9223372036854775608 
public staticc_i_zero type I value -2147481648 
public staticc_msgid type SY-MSGID value 'ZIBMC' 
public staticc_subrc_unknown type SY-SUBRC value 999999 
public staticc_tribool_false type BOOLEAN value '-' 

Attributes

Visibility and LevelNameDocumentation
public instancep_debug_mode type CHAR value SPACE 
public instancep_request_prop_default type TS_REQUEST_PROP  
public instancep_version type STRING  

Methods

Visibility and LevelNameDocumentation
public static
abap_to_json
importingi_nametype STRING optional
i_valuetype ANY
i_dictionarytype ANY optional
i_required_fieldstype ANY optional
i_lower_casetype BOOLEAN default C_BOOLEAN_TRUE
returningvalue(e_json)type STRING
Extracts a JSON string from an ABAP structure. + +
Parameters
i_name Name of component to be extracted. +
i_value ABAP structure to be converted to JSON string. +
i_dictionary Dictionary to be used for mapping ABAP identifiers to JSON keys. +
i_required_fields + Dictionary of required fields.
+ If a field is required, an initial value appears as initial value in JSON structure. + Otherwise it is omitted in JSON string. +
i_lower_case If set to C_BOOLEAN_TRUE all keys in JSON string will be lower case. +
e_json JSON string. +
public static
add_header_parameter
importingi_parametertype STRING
i_valuetype STRING
i_is_booleantype BOOLEAN default C_BOOLEAN_FALSE
changingc_headerstype ZIF_IBMC_SERVICE_ARCH~TS_REQUEST_PROP-HEADERS
Method for internal use. +
public static
add_query_parameter
importingi_parametertype STRING
i_valuetype STRING
i_is_booleantype BOOLEAN default C_BOOLEAN_FALSE
changingc_urltype TS_URL
Method for internal use. +
public static
get_components
importingi_structuretype ANY
exportingvalue(e_components)type ZIF_IBMC_SERVICE_ARCH~TT_STRING
Returns component names of a given structure + +
Parameters
i_structure Structure with components. +
e_components Internal table of component names. +
public static
get_datatype
importingi_fieldtype ANY
returningvalue(e_datatype)type ZIF_IBMC_SERVICE_ARCH~CHAR
Returns data type of a given parameter + +
Parameters
i_field Field of type that is supposed to be determined. +
e_datatype Technical type (= base type) of I_FIELD. +
public static
get_field_type
importingi_fieldtype ANY
exportinge_technical_typetype ZIF_IBMC_SERVICE_ARCH~CHAR
e_relative_typetype STRING
e_lengthtype I
Returns field type and length of a given parameter + +
Parameters
i_field Field of type that is supposed to be determined. +
e_technical_type Technical type (= base type) of I_FIELD. +
e_relative_type Relative type (= data type) of I_FIELD. +
e_length Length of type of I_FIELD. +
public static
get_file_extension
importingvalue(i_mime_type)type STRING
returningvalue(e_extension)type STRING
Returns the file extension for a mime type, e.g. 'text/plain' -> 'txt' + +
Parameters
i_mime_type MIME type. +
e_extension File extension (without leading dot). +
public static
get_full_url
importingi_urltype TS_URL
returningvalue(e_url)type STRING
Method for internal use. +
public static
move_data_reference_to_abap
importingi_data_referencetype DATA_REFERENCE
exportingvalue(e_abap)type ANY
raisingzcx_ibmc_service_exception
Moves a referenced data structure to an ABAP structure + +
Parameters
i_data_reference Reference to data object. +
e_abap ABAP structure to be filled. +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public static
normalize_url
changingc_urltype TS_URL
Method for internal use. +
public static
parse_json
importingi_jsontype STRING
i_dictionarytype ANY optional
changingvalue(c_abap)type ANY
zcx_ibmc_service_exception
Parses a JSON string into an ABAP structure + +
Parameters
i_json JSON string. +
i_dictionary Dictionary for mapping of identifier names. +
c_abap ABAP structure to be filled +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public static
raise_exception
importingi_msgnotype SY-MSGNO optional
i_msgv1type STRING optional
i_msgv2type STRING optional
i_msgv3type STRING optional
i_msgv4type STRING optional
i_texttype STRING optional
i_subrctype SY-SUBRC default C_SUBRC_UNKNOWN
i_previoustype ref to CX_ROOT optional
i_http_statustype TS_HTTP_STATUS optional
raisingzcx_ibmc_service_exception
Raises an exception + +
Parameters
i_msgno Message number. +
i_msgv1 Substitution for 1st placeholder in message. +
i_msgv2 Substitution for 2nd placeholder in message. +
i_msgv3 Substitution for 3rd placeholder in message. +
i_msgv4 Substitution for 4th placeholder in message. +
i_text Message text; specify if message number is not specified. +
i_subrc Return code being returned. +
i_previous Exception that has been captured before. +
i_http_status HTTP status code if exception is triggered by HTTP error +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised. +
public static
unescape_unicode
importingi_intype STRING
returningvalue(e_out)type STRING
Unescape unicode codepoints to characters in a string, e.g. '\u0041 b \u0063' -> 'A b c' + +
Parameters
i_in String with unicode codepoints. +
e_out Unescaped string. +
public instance
check_http_response
importingi_responsetype TO_REST_RESPONSE optional
i_urltype TS_URL optional
raisingzcx_ibmc_service_exception
Throws an exception, if HTTP response indicates an error
public instance
constructor
importingi_urltype STRING optional
i_hosttype STRING optional
i_proxy_hosttype STRING optional
i_proxy_porttype STRING optional
i_usernametype STRING optional
i_passwordtype STRING optional
i_apikeytype STRING optional
i_access_tokentype TS_ACCESS_TOKEN optional
i_ssl_idtype ZIF_IBMC_SERVICE_ARCH~TY_SSL_ID optional
i_debug_modetype CHAR default SPACE
Class constructor. + +
Parameters
i_url URL of the service. +
i_host Host of the service. I_URL and I_HOST can be used synonymously. +
i_proxy_host Proxy server, not applicable on SAP Cloud Platform. +
i_proxy_port Proxy server port, not applicable on SAP Cloud Platform. +
i_username User name to authenticate on service. +
i_password User password to authenticate on service. +
i_apikey API key password to authenticate on service. +
i_access_token Access token to authenticate on service. +
i_ssl_id ID of PSE, not applicable on SAP Cloud Platform. +
i_debug_mode not used. +
public instance
get_access_token
importingi_request_proptype TS_REQUEST_PROP optional
returningvalue(e_access_token)type TS_ACCESS_TOKEN
raisingzcx_ibmc_service_exception
Method for internal use. +
public instance
get_appname
returningvalue(e_appname)type STRING
Returns the service name. + +
Parameters
e_appname Name of the service. +
public instance
get_request_prop
importingi_auth_methodtype STRING default C_DEFAULT
returningvalue(e_request_prop)type TS_REQUEST_PROP
Method for internal use. +
public instance
get_rest_client
importingi_request_proptype TS_REQUEST_PROP
returningvalue(e_client)type TS_CLIENT
raisingzcx_ibmc_service_exception
Method for internal use. +
public instance
http_delete
importingi_request_proptype TS_REQUEST_PROP
returningvalue(e_response)type TO_REST_RESPONSE
raisingzcx_ibmc_service_exception
Sends a HTTP DELETE request. + +
Parameters
i_request_prop Request properties. +
e_response Response returned by service. +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
http_get
importingi_request_proptype TS_REQUEST_PROP
returningvalue(e_response)type TO_REST_RESPONSE
raisingzcx_ibmc_service_exception
Sends a HTTP GET request. + +
Parameters
i_request_prop Request properties. +
e_response Response returned by service. +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
http_post
importingi_request_proptype TS_REQUEST_PROP
returningvalue(e_response)type TO_REST_RESPONSE
raisingzcx_ibmc_service_exception
Sends a HTTP POST request. + +
Parameters
i_request_prop Request properties. +
e_response Response returned by service. +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
http_post_multipart
importingi_request_proptype TS_REQUEST_PROP
it_form_parttype TT_FORM_PART
returningvalue(e_response)type TO_REST_RESPONSE
raisingzcx_ibmc_service_exception
Sends a HTTP POST request with multipart body. + +
Parameters
i_request_prop Request properties. +
it_form_part Internal table of form parts in request body. +
e_response Response returned by service. +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
http_put
importingi_request_proptype TS_REQUEST_PROP
returningvalue(e_response)type TO_REST_RESPONSE
raisingzcx_ibmc_service_exception
Sends a HTTP PUT request. + +
Parameters
i_request_prop Request properties. +
e_response Response returned by service. +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instance
set_access_token
importingi_access_tokentype TS_ACCESS_TOKEN
raisingzcx_ibmc_service_exception
Sets an access token explicitly. + +
Parameters
i_access_token Access token. +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_arch.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_arch.html new file mode 100644 index 0000000..4cdbf96 --- /dev/null +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_arch.html @@ -0,0 +1 @@ +Class ZCL_IBMC_SERVICE_ARCH

Class ZCL_IBMC_SERVICE_ARCH

public create public

Documentation

IBM Watson SDK Platform-specifics

Interfaces

zif_ibmc_service_arch

Types

Visibility and LevelNameDocumentation
publicto_form_part type ref to IF_HTTP_ENTITY 
publicto_http_client type ref to IF_HTTP_CLIENTHTTP Client Control Block
publicto_http_entity type ref to IF_HTTP_ENTITY 
publicto_rest_client type ref to CL_REST_HTTP_CLIENTREST HTTP Client
publicto_rest_entity type ref to IF_REST_ENTITY 
publicto_rest_request type ref to IF_REST_ENTITY 
publicto_rest_response type ref to IF_REST_ENTITY 
publicts_access_token type ZIF_IBMC_SERVICE_ARCH~TS_ACCESS_TOKEN 
publicts_client (structured type) 
publicts_header type ZIF_IBMC_SERVICE_ARCH~TS_HEADER 
publicts_http_status type ZIF_IBMC_SERVICE_ARCH~TS_HTTP_STATUS 
publicts_request_prop type ZIF_IBMC_SERVICE_ARCH~TS_REQUEST_PROP 
publicts_url type ZIF_IBMC_SERVICE_ARCH~TS_URL 
publictt_header type ZIF_IBMC_SERVICE_ARCH~TT_HEADER 

Methods

Visibility and LevelNameDocumentation
public static
base64_decode
importingi_base64type STRING
returningvalue(e_binary)type XSTRING
raisingzcx_ibmc_service_exception
Decodes base64 encoded data to binary
Class-based Exceptions
zcx_ibmc_service_exceptionIBM Cloud Service Exception
public static
convert_string_to_utf8
importingi_stringtype STRING
returningvalue(e_utf8)type XSTRING
raisingzcx_ibmc_service_exception
Converts STRING data to UTF8 encoded XSTRING
Class-based Exceptions
zcx_ibmc_service_exceptionIBM Cloud Service Exception
public static
create_client_by_url
importingi_urltype STRING
i_request_proptype TS_REQUEST_PROP
exportinge_clienttype TS_CLIENT
raisingzcx_ibmc_service_exception
Returns a HTTP/REST client based on an URL
Class-based Exceptions
zcx_ibmc_service_exceptionIBM Cloud Service Exception
public static
execute
importingi_clienttype TS_CLIENT
i_methodtype ZIF_IBMC_SERVICE_ARCH~CHAR default ZIF_IBMC_SERVICE_ARCH~C_METHOD_GET
returningvalue(e_response)type TO_REST_RESPONSE
raisingzcx_ibmc_service_exception
Executes a HTTP request (GET, POST or DELETE)
Class-based Exceptions
zcx_ibmc_service_exceptionIBM Cloud Service Exception
public static
get_default_proxy
importingi_urltype TS_URL optional
exportinge_proxy_hosttype STRING
e_proxy_porttype STRING
Returns the default proxy host and port
public static
get_http_status
importingi_rest_responsetype TO_REST_RESPONSE
returningvalue(e_status)type TS_HTTP_STATUS
Returns the status of a http response
public static
get_progname
returningvalue(e_progname)type STRING
Returns the ABAP program name
public static
get_response_binary
importingi_responsetype TO_REST_RESPONSE
returningvalue(e_data)type XSTRING
Reads string data from response
public static
get_response_string
importingi_responsetype TO_REST_RESPONSE
returningvalue(e_data)type STRING
Reads string data from response
public static
get_rest_request
importingi_clienttype TS_CLIENT
returningvalue(e_rest_request)type TO_REST_REQUEST
Returns a request object from a HTTP client object
public static
get_timezone
returningvalue(e_timezone)type ZIF_IBMC_SERVICE_ARCH~TY_TIMEZONE
Returns the user's time zone
public static
set_authentication_basic
importingi_clienttype TS_CLIENT
i_usernametype STRING
i_passwordtype STRING
Sets request header for basic authentication
public static
set_request_body_cdata
importingi_clienttype TS_CLIENT
i_datatype STRING
Sets the body of a HTTP request object
public static
set_request_body_xdata
importingi_clienttype TS_CLIENT
i_datatype XSTRING
Sets the body of a HTTP request object
public static
set_request_header
importingi_clienttype TS_CLIENT
i_nametype STRING
i_valuetype STRING
Sets a HTTP header
public static
set_request_uri
importingi_clienttype TS_CLIENT
i_uritype STRING
Sets the URI for a HTTP request
public instance
add_form_part
importingi_clienttype TS_CLIENT
it_form_parttype ZIF_IBMC_SERVICE_ARCH=>TT_FORM_PART
raisingzcx_ibmc_service_exception
 
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_ext.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_ext.html index dcc4502..9d9a0b3 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_ext.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_service_ext.html @@ -1 +1,41 @@ -Class ZCL_IBMC_SERVICE_EXT

Class ZCL_IBMC_SERVICE_EXT

public inheriting from ZCL_IBMC_SERVICE create public

Documentation

Extended REST API service class

Types

Visibility and LevelNameDocumentation
publicts_oauth_prop (structured type) 
publicty_image_class type STRING 
publicty_image_format (typing) 
publicty_instance_id (typing) 
publicty_servicename (typing) 

Constants

Visibility and LevelNameDocumentation
public staticc_field_none type FIELDNAME value '###'Field Name
public staticc_format_all type TY_IMAGE_FORMAT value '*'Image encoding (jpg, png, ...)
public staticc_format_gif type TY_IMAGE_FORMAT value 'gif'Image encoding (jpg, png, ...)
public staticc_format_jpg type TY_IMAGE_FORMAT value 'jpg'Image encoding (jpg, png, ...)
public staticc_format_png type TY_IMAGE_FORMAT value 'png'Image encoding (jpg, png, ...)
public staticc_format_tif type TY_IMAGE_FORMAT value 'tif'Image encoding (jpg, png, ...)
public staticc_format_unknown type TY_IMAGE_FORMAT value '###'Image encoding (jpg, png, ...)
public staticc_format_zip type TY_IMAGE_FORMAT value 'zip'Image encoding (jpg, png, ...)
public staticc_token_generation_always type CHAR value 'A' 
public staticc_token_generation_auto type CHAR value SPACE 
public staticc_token_generation_never type CHAR value 'N' 

Attributes

Visibility and LevelNameDocumentation
public instancep_instance_id type TY_INSTANCE_ID  
public instancep_servicename type TY_SERVICENAME  

Methods

Visibility and LevelNameDocumentation
public static
get_instance
importingi_instance_idtype TY_INSTANCE_ID optional
i_hosttype STRING optional
i_usernametype STRING optional
i_passwordtype STRING optional
i_proxy_hosttype STRING optional
i_proxy_servicetype STRING optional
i_apikeytype STRING optional
i_auth_methodtype STRING default C_DEFAULT
i_oauth_proptype TS_OAUTH_PROP optional
i_token_generationtype CHAR default C_TOKEN_GENERATION_AUTO
i_request_headerstype STRING optional
i_versiontype STRING optional
exportingvalue(eo_instance)type ANY
Creates an IBM Cloud service class instance
Parameters
i_instance_idInstance GUI
eo_instanceExtended REST API service class
public static
get_zipdata
importingit_examplestype ANY TABLE
iv_field_classtype FIELDNAME default C_FIELD_NONE
iv_field_filenametype FIELDNAME optional
iv_field_imagetype FIELDNAME optional
iv_image_formattype TY_IMAGE_FORMAT optional
iv_image_nametype STRING optional
exportinget_zipdatatype TT_MAP_FILE
raisingzcx_ibmc_service_exception
Creates or Updates a classifier
Parameters
iv_field_classField Name
iv_field_filenameField Name
iv_field_imageField Name
public instanceget_access_token redefinition 
public instance
get_bearer_token
returningvalue(e_bearer_token)type STRING
Returns the bearer token, if available
public instance
get_config_value
importingi_defaulttype ZIBMC_CONFIG-VALUE optional
i_paramtype ZIBMC_CONFIG-PARAM
returningvalue(e_value)type ZIBMC_CONFIG-VALUE
raisingzcx_ibmc_service_exception
Reads an individual value form table ZIBMC_CONFIG
Parameters
i_defaultCase-sensitive string value
e_valueCase-sensitive string value
Class-based Exceptions
zcx_ibmc_service_exceptionIBM Cloud Service Exception
public instance
get_sdk_version_date
returningvalue(e_sdk_version_date)type STRING
returns the build date of the method
public instanceset_access_token redefinition 
public instance
set_bearer_token
importingi_bearer_tokentype STRING
Sets the bearer token
\ No newline at end of file +Class ZCL_IBMC_SERVICE_EXT

Class ZCL_IBMC_SERVICE_EXT

public inheriting from ZCL_IBMC_SERVICE create public

Documentation

Extended REST API service class

Types

Visibility and LevelNameDocumentation
publicts_oauth_prop (structured type) 
publicty_image_class type STRING 
publicty_image_format (typing) 
publicty_instance_id (typing) 
publicty_servicename (typing) 

Constants

Visibility and LevelNameDocumentation
public staticc_field_none type FIELDNAME value '###'Field Name
public staticc_format_all type TY_IMAGE_FORMAT value '*'Image encoding (jpg, png, ...)
public staticc_format_gif type TY_IMAGE_FORMAT value 'gif'Image encoding (jpg, png, ...)
public staticc_format_jpg type TY_IMAGE_FORMAT value 'jpg'Image encoding (jpg, png, ...)
public staticc_format_png type TY_IMAGE_FORMAT value 'png'Image encoding (jpg, png, ...)
public staticc_format_tif type TY_IMAGE_FORMAT value 'tif'Image encoding (jpg, png, ...)
public staticc_format_unknown type TY_IMAGE_FORMAT value '###'Image encoding (jpg, png, ...)
public staticc_format_zip type TY_IMAGE_FORMAT value 'zip'Image encoding (jpg, png, ...)
public staticc_iam_token_host type STRING value 'iam.cloud.ibm.com' 
public staticc_iam_token_path type STRING value '/identity/token' 
public staticc_token_generation_always type CHAR value 'A' 
public staticc_token_generation_auto type CHAR value SPACE 
public staticc_token_generation_never type CHAR value 'N' 

Attributes

Visibility and LevelNameDocumentation
public instancep_instance_id type TY_INSTANCE_ID  
public instancep_servicename type TY_SERVICENAME  

Methods

Visibility and LevelNameDocumentation
public static
get_instance
importingi_instance_idtype TY_INSTANCE_ID optional
i_urltype STRING optional
i_hosttype STRING optional
i_usernametype STRING optional
i_passwordtype STRING optional
i_proxy_hosttype STRING optional
i_proxy_servicetype STRING optional
i_apikeytype STRING optional
i_auth_methodtype STRING default C_DEFAULT
i_oauth_proptype TS_OAUTH_PROP optional
i_token_generationtype CHAR default C_TOKEN_GENERATION_AUTO
i_request_headerstype STRING optional
i_versiontype STRING optional
exportingvalue(eo_instance)type ANY
Factory method to instantiate a service specific wrapper class. + +
Parameters
i_instance_id + Value of field INSTANCE_UID in table ZIBMC_CONFIG. + Service credentials are read from table ZIBMC_CONFIG with key SERVICE = Name of service wrapper class without prefix ZCL_IBMC_ and INSTANCE_UID. +
i_url URL of the service. +
i_host Host of the service. I_URL and I_HOST can be used synonymously. +
i_username User password to authenticate on service. +
i_password User password to authenticate on service. +
i_proxy_host Proxy server, not applicable on SAP Cloud Platform. +
i_apikey API key password to authenticate on service. +
i_auth_method Authentication method. Possible values are "IAM", "ICP4D", "basicAuth", "NONE". +
i_token_generation Method for access token refresh:
+ C_TOKEN_GENERATION_NEVER - Access token is not refreshed. + C_TOKEN_GENERATION_ALWAYS - Access to token is refreshed for each service call. + C_TOKEN_GENERATION_AUTO - Access to token is refreshed just before it expires. +
i_request_headers List of headers sent with every request, format 'Header1=Value1;Header2=Value2'. +
i_version Value of query parameter VERSION. +
eo_instanceExtended REST API service class
public static
get_zipdata
importingit_examplestype ANY TABLE
iv_field_classtype FIELDNAME default C_FIELD_NONE
iv_field_filenametype FIELDNAME optional
iv_field_imagetype FIELDNAME optional
iv_image_formattype TY_IMAGE_FORMAT optional
iv_image_nametype STRING optional
exportinget_zipdatatype TT_MAP_FILE
raisingzcx_ibmc_service_exception
Compresses multiple images from an internal table to a one or more xstrings in ZIP format. + +
Parameters
it_examples Internal table of images. +
iv_field_class + Field in IT_EXAMPLES that contains the file class. + All records in IT_EXAMPLES with same class will be compress into one ZIP xstring. +
iv_field_filename Field in IT_EXAMPLES that contains the filename for the image. +
iv_field_image Field in IT_EXAMPLES that contains the image. +
iv_image_format Format of the image. Possible values are + C_FORMAT_JPG, C_FORMAT_PNG, C_FORMAT_GIF, C_FORMAT_TIF, C_FORMAT_ALL. +
iv_image_name Name of the image. +
et_zipdata Internal table containing a compressed ZIP xstring for each image class. +
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error. +
public instanceget_access_token redefinition 
public instance
get_bearer_token
returningvalue(e_bearer_token)type STRING
Sends a HTTP PUT request. + +
public instance
get_config_value
importingi_defaulttype ZIBMC_CONFIG-VALUE optional
i_paramtype ZIBMC_CONFIG-PARAM
returningvalue(e_value)type ZIBMC_CONFIG-VALUE
raisingzcx_ibmc_service_exception
Retrieves a value of a configuration parameter from table ZIBMC_CONFIG. + +
Parameters
i_defaultCase-sensitive string value
i_param Configuration parameter name. +
e_valueCase-sensitive string value
Class-based Exceptions
zcx_ibmc_service_exceptionIBM Cloud Service Exception
public instanceget_request_prop redefinition 
public instance
get_sdk_version_date
returningvalue(e_sdk_version_date)type STRING
Returns the SDK built date. + +
Parameters
e_sdk_version_date Built data in format YYYYMMDD. +
public instanceset_access_token redefinition 
public instance
set_bearer_token
importingi_bearer_tokentype STRING
Method for internal use. +
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_speech_to_text_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_speech_to_text_v1.html index 7686e51..cd9b8d6 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_speech_to_text_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_speech_to_text_v1.html @@ -5,21 +5,21 @@ addition to basic transcription, the service can produce detailed information about many different aspects of the audio. For most languages, the service supports two sampling rates, broadband and narrowband. It returns all JSON - response content in the UTF-8 character set. - + response content in the UTF-8 character set.
+
For speech recognition, the service supports synchronous and asynchronous HTTP Representational State Transfer (REST) interfaces. It also supports a WebSocket interface that provides a full-duplex, low-latency communication channel: Clients send requests and audio to the service and receive results over a - single connection asynchronously. - + single connection asynchronously.
+
The service also offers two customization interfaces. Use language model customization to expand the vocabulary of a base model with domain-specific terminology. Use acoustic model customization to adapt a base model for the acoustic characteristics of your audio. For language model customization, the service also supports grammars. A grammar is a formal language specification - that lets you restrict the phrases that the service can recognize. - + that lets you restrict the phrases that the service can recognize.
+
Language model customization is generally available for production use with most supported languages. Acoustic model customization is beta functionality that is available for all supported languages.

Types

Visibility and LevelNameDocumentation
publict_acoustic_model (structured type) Information about an existing custom acoustic model.
publict_acoustic_models (structured type) Information about existing custom acoustic models.
publict_audio_details (structured type) Information about an audio resource from a custom acoustic model.
publict_audio_listing (structured type) Information about an audio resource from a custom acoustic model.
publict_audio_metrics (structured type) If audio metrics are requested, information about the signal characteristics of @@ -27,7 +27,7 @@ signal characteristics for a histogram. The first and last bins of a histogram are the boundary bins. They cover the intervals between negative infinity and the first boundary, and between the last boundary and positive infinity, - respectively.
publict_audio_resource (structured type) Information about an audio resource from a custom acoustic model.
publict_audio_resources (structured type) Information about the audio resources from a custom acoustic model.
publict_corpora (structured type) Information about the corpora from a custom language model.
publict_corpus (structured type) Information about a corpus from a custom language model.
publict_create_acoustic_model (structured type) Information about the new custom acoustic model.
publict_create_language_model (structured type) Information about the new custom language model.
publict_custom_word (structured type) Information about a word that is to be added to a custom language model.
publict_custom_words (structured type) Information about the words that are to be added to a custom language model.
publict_empty_response_body type JSONOBJECT The empty response from a request.
publict_error_model (structured type) The error response from a failed request.
publict_grammar (structured type) Information about a grammar from a custom language model.
publict_grammars (structured type) Information about the grammars from a custom language model.
publict_inline_object (structured type) 
publict_keyword_result (structured type) Information about a match for a keyword from speech recognition results.
publict_language_model (structured type) Information about an existing custom language model.
publict_language_models (structured type) Information about existing custom language models.
publict_processed_audio (structured type) Detailed timing information about the service's processing of the input audio.
publict_processing_metrics (structured type) If processing metrics are requested, information about the service's processing + respectively.
publict_audio_resource (structured type) Information about an audio resource from a custom acoustic model.
publict_audio_resources (structured type) Information about the audio resources from a custom acoustic model.
publict_corpora (structured type) Information about the corpora from a custom language model.
publict_corpus (structured type) Information about a corpus from a custom language model.
publict_create_acoustic_model (structured type) Information about the new custom acoustic model.
publict_create_language_model (structured type) Information about the new custom language model.
publict_custom_word (structured type) Information about a word that is to be added to a custom language model.
publict_custom_words (structured type) Information about the words that are to be added to a custom language model.
publict_empty_response_body type JSONOBJECT The empty response from a request.
publict_error_model (structured type) The error response from a failed request.
publict_grammar (structured type) Information about a grammar from a custom language model.
publict_grammars (structured type) Information about the grammars from a custom language model.
publict_inline_object (structured type) No documentation available.
publict_keyword_result (structured type) Information about a match for a keyword from speech recognition results.
publict_language_model (structured type) Information about an existing custom language model.
publict_language_models (structured type) Information about existing custom language models.
publict_processed_audio (structured type) Detailed timing information about the service's processing of the input audio.
publict_processing_metrics (structured type) If processing metrics are requested, information about the service's processing of the input audio. Processing metrics are not available with the synchronous **Recognize audio** method.
publict_recognition_job (structured type) Information about a current asynchronous speech recognition job.
publict_recognition_jobs (structured type) Information about current asynchronous speech recognition jobs.
publict_register_status (structured type) Information about a request to register a callback for asynchronous speech recognition.
publict_spch_recognition_alternative (structured type) An alternative transcript from speech recognition results.
publict_speaker_labels_result (structured type) Information about the speakers from speech recognition results.
publict_speech_model (structured type) Information about an available language model.
publict_speech_models (structured type) Information about the available language models.
publict_speech_recognition_result (structured type) Component results for a speech recognition request.
publict_speech_recognition_results (structured type) The complete results for a speech recognition request.
publict_supported_features (structured type) Additional service features that are supported with the model.
publict_training_response (structured type) The response from training of a custom language or custom acoustic model.
publict_training_warning (structured type) A warning from training of a custom language or custom acoustic model.
publict_word (structured type) Information about a word from a custom language model.
publict_words (structured type) Information about the words from a custom language model.
publict_word_alternative_result (structured type) An alternative hypothesis for a word from speech recognition results.
publict_word_alternative_results (structured type) Information about alternative hypotheses for words from speech recognition @@ -40,26 +40,26 @@
i_audio_name The name of the new audio resource for the custom acoustic model. Use a localized name that matches the language of the custom model and reflects the - contents of the resource. - * Include a maximum of 128 characters in the name. + contents of the resource.
+ * Include a maximum of 128 characters in the name.
* Do not use characters that need to be URL-encoded. For example, do not use spaces, slashes, backslashes, colons, ampersands, double quotes, plus signs, equals signs, questions marks, and so on in the name. (The service does not prevent the use of these characters. But because they must be URL-encoded - wherever used, their use is strongly discouraged.) + wherever used, their use is strongly discouraged.)
* Do not use the name of an audio resource that has already been added to the custom model.
i_audio_resource The audio resource that is to be added to the custom acoustic model, an - individual audio file or an archive file. - + individual audio file or an archive file.
+
With the `curl` command, use the `--data-binary` option to upload the file for the request.
i_content_type For an audio-type resource, the format (MIME type) of the audio. For more information, see **Content types for audio-type resources** in the method - description. - + description.
+
For an archive-type resource, the media type of the archive file. For more information, see **Content types for archive-type resources** in the method description. @@ -68,16 +68,16 @@ ** contained in the archive file if they are of type `audio/alaw`, `audio/basic`, ** `audio/l16`, or `audio/mulaw`. Include the `rate`, `channels`, and `endianness` ** parameters where necessary. In this case, all audio files that are contained in - ** the archive file must be of the indicated type. - ** + ** the archive file must be of the indicated type.
+ **
**For all other audio formats, you can omit the header. In this case, the audio ** files can be of multiple types as long as they are not of the types listed in - ** the previous paragraph. - ** + ** the previous paragraph.
+ **
**The parameter accepts all of the audio formats that are supported for use with ** speech recognition. For more information, see **Content types for audio-type - ** resources** in the method description. - ** + ** resources** in the method description.
+ **
****For an audio-type resource,** omit the header.
i_allow_overwrite If `true`, the specified audio resource overwrites an existing audio resource @@ -93,30 +93,30 @@
i_corpus_name The name of the new corpus for the custom language model. Use a localized name that matches the language of the custom model and reflects the contents of the - corpus. - * Include a maximum of 128 characters in the name. + corpus.
+ * Include a maximum of 128 characters in the name.
* Do not use characters that need to be URL-encoded. For example, do not use spaces, slashes, backslashes, colons, ampersands, double quotes, plus signs, equals signs, questions marks, and so on in the name. (The service does not prevent the use of these characters. But because they must be URL-encoded - wherever used, their use is strongly discouraged.) + wherever used, their use is strongly discouraged.)
* Do not use the name of an existing corpus or grammar that is already defined - for the custom model. + for the custom model.
* Do not use the name `user`, which is reserved by the service to denote custom - words that are added or modified by the user. + words that are added or modified by the user.
* Do not use the name `base_lm` or `default_lm`. Both names are reserved for future use by the service.
i_corpus_file A plain text file that contains the training data for the corpus. Encode the file in UTF-8 if it contains non-ASCII characters; the service assumes UTF-8 - encoding if it encounters non-ASCII characters. - + encoding if it encounters non-ASCII characters.
+
Make sure that you know the character encoding of the file. You must use that encoding when working with the words in the custom language model. For more information, see [Character encoding](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-te - xt-corporaWords#charEncoding). - + xt-corporaWords#charEncoding).
+
With the `curl` command, use the `--data-binary` option to upload the file for the request.
i_allow_overwrite @@ -133,17 +133,17 @@
i_grammar_name The name of the new grammar for the custom language model. Use a localized name that matches the language of the custom model and reflects the contents of the - grammar. - * Include a maximum of 128 characters in the name. + grammar.
+ * Include a maximum of 128 characters in the name.
* Do not use characters that need to be URL-encoded. For example, do not use spaces, slashes, backslashes, colons, ampersands, double quotes, plus signs, equals signs, questions marks, and so on in the name. (The service does not prevent the use of these characters. But because they must be URL-encoded - wherever used, their use is strongly discouraged.) + wherever used, their use is strongly discouraged.)
* Do not use the name of an existing grammar or corpus that is already defined - for the custom model. + for the custom model.
* Do not use the name `user`, which is reserved by the service to denote custom - words that are added or modified by the user. + words that are added or modified by the user.
* Do not use the name `base_lm` or `default_lm`. Both names are reserved for future use by the service.
i_grammar_file @@ -151,14 +151,14 @@ `Content-Type` header. Encode the file in UTF-8 (ASCII is a subset of UTF-8). Using any other encoding can lead to issues when compiling the grammar or to unexpected results in decoding. The service ignores an encoding that is - specified in the header of the grammar. - + specified in the header of the grammar.
+
With the `curl` command, use the `--data-binary` option to upload the file for the request.
i_content_type - The format (MIME type) of the grammar file: + The format (MIME type) of the grammar file:
* `application/srgs` for Augmented Backus-Naur Form (ABNF), which uses a - plain-text representation that is similar to traditional BNF grammars. + plain-text representation that is similar to traditional BNF grammars.
* `application/srgs+xml` for XML Form, which uses XML elements to represent the grammar.
i_allow_overwrite @@ -211,7 +211,7 @@ custom acoustic model.
e_response Service return value of type T_ACOUSTIC_MODEL -
public instance
create_job
importingi_audiotype FILE
i_content_typetype STRING default 'application/octet-stream'
i_modeltype STRING default 'en-US_BroadbandModel'
i_callback_urltype STRING optional
i_eventstype STRING optional
i_user_tokentype STRING optional
i_results_ttltype INTEGER optional
i_language_customization_idtype STRING optional
i_acoustic_customization_idtype STRING optional
i_base_model_versiontype STRING optional
i_customization_weighttype DOUBLE optional
i_inactivity_timeouttype INTEGER optional
i_keywordstype TT_STRING optional
i_keywords_thresholdtype FLOAT optional
i_max_alternativestype INTEGER optional
i_word_alternatives_thresholdtype FLOAT optional
i_word_confidencetype BOOLEAN default C_BOOLEAN_FALSE
i_timestampstype BOOLEAN default C_BOOLEAN_FALSE
i_profanity_filtertype BOOLEAN default C_BOOLEAN_TRUE
i_smart_formattingtype BOOLEAN default C_BOOLEAN_FALSE
i_speaker_labelstype BOOLEAN default C_BOOLEAN_FALSE
i_customization_idtype STRING optional
i_grammar_nametype STRING optional
i_redactiontype BOOLEAN default C_BOOLEAN_FALSE
i_processing_metricstype BOOLEAN default C_BOOLEAN_FALSE
i_processing_metrics_intervaltype FLOAT optional
i_audio_metricstype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_RECOGNITION_JOB
raisingzcx_ibmc_service_exception
Create a job. +public instance
create_job
importingi_audiotype FILE
i_content_typetype STRING default 'application/octet-stream'
i_modeltype STRING default 'en-US_BroadbandModel'
i_callback_urltype STRING optional
i_eventstype STRING optional
i_user_tokentype STRING optional
i_results_ttltype INTEGER optional
i_language_customization_idtype STRING optional
i_acoustic_customization_idtype STRING optional
i_base_model_versiontype STRING optional
i_customization_weighttype DOUBLE optional
i_inactivity_timeouttype INTEGER optional
i_keywordstype TT_STRING optional
i_keywords_thresholdtype FLOAT optional
i_max_alternativestype INTEGER optional
i_word_alternatives_thresholdtype FLOAT optional
i_word_confidencetype BOOLEAN default C_BOOLEAN_FALSE
i_timestampstype BOOLEAN default C_BOOLEAN_FALSE
i_profanity_filtertype BOOLEAN default C_BOOLEAN_TRUE
i_smart_formattingtype BOOLEAN default C_BOOLEAN_FALSE
i_speaker_labelstype BOOLEAN default C_BOOLEAN_FALSE
i_customization_idtype STRING optional
i_grammar_nametype STRING optional
i_redactiontype BOOLEAN default C_BOOLEAN_FALSE
i_processing_metricstype BOOLEAN default C_BOOLEAN_FALSE
i_processing_metrics_intervaltype FLOAT optional
i_audio_metricstype BOOLEAN default C_BOOLEAN_FALSE
i_end_of_phrase_silence_timetype DOUBLE optional
i_splt_trnscrpt_at_phrase_endtype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_RECOGNITION_JOB
raisingzcx_ibmc_service_exception
Create a job.
Parameters
i_audio The audio to transcribe. @@ -227,26 +227,26 @@ A URL to which callback notifications are to be sent. The URL must already be successfully white-listed by using the **Register a callback** method. You can include the same callback URL with any number of job creation requests. Omit - the parameter to poll the service for job completion and results. - + the parameter to poll the service for job completion and results.
+
Use the `user_token` parameter to specify a unique user-specified string with each job to differentiate the callback notifications for the jobs.
i_events If the job includes a callback URL, a comma-separated list of notification - events to which to subscribe. Valid events are + events to which to subscribe. Valid events are
* `recognitions.started` generates a callback notification when the service - begins to process the job. + begins to process the job.
* `recognitions.completed` generates a callback notification when the job is complete. You must use the **Check a job** method to retrieve the results - before they time out or are deleted. + before they time out or are deleted.
* `recognitions.completed_with_results` generates a callback notification when - the job is complete. The notification includes the results of the request. + the job is complete. The notification includes the results of the request.
* `recognitions.failed` generates a callback notification if the service - experiences an error while processing the job. - + experiences an error while processing the job.
+
The `recognitions.completed` and `recognitions.completed_with_results` events - are incompatible. You can specify only of the two events. - + are incompatible. You can specify only of the two events.
+
If the job includes a callback URL, omit the parameter to subscribe to the default events: `recognitions.started`, `recognitions.completed`, and `recognitions.failed`. If the job does not include a callback URL, omit the @@ -268,8 +268,8 @@ request with credentials for the instance of the service that owns the custom model. By default, no custom language model is used. See [Custom models](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text - -input#custom-input). - + -input#custom-input).
+
**Note:** Use this parameter instead of the deprecated `customization_id` parameter.
i_acoustic_customization_id @@ -293,19 +293,19 @@ If you specify the customization ID (GUID) of a custom language model with the recognition request, the customization weight tells the service how much weight to give to words from the custom language model compared to those from the base - model for the current request. - + model for the current request.
+
Specify a value between 0.0 and 1.0. Unless a different customization weight was specified for the custom model when it was trained, the default value is 0.3. A customization weight that you specify overrides a weight that was specified - when the custom model was trained. - + when the custom model was trained.
+
The default value yields the best performance in general. Assign a higher value if your audio makes frequent use of OOV words from the custom model. Use caution when setting the weight: a higher value can improve the accuracy of phrases from the custom model's domain, but it can negatively affect - performance on non-domain phrases. - + performance on non-domain phrases.
+
See [Custom models](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text -input#custom-input). @@ -371,9 +371,10 @@ conventional representations in the final transcript of a recognition request. For US English, the service also converts certain keyword strings to punctuation symbols. By default, the service performs no smart formatting. - - **Note:** Applies to US English, Japanese, and Spanish transcription only. - +
+
+ **Note:** Applies to US English, Japanese, and Spanish transcription only.
+
See [Smart formatting](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to- text-output#smart_formatting). @@ -382,14 +383,14 @@ which participants in a multi-person exchange. By default, the service returns no speaker labels. Setting `speaker_labels` to `true` forces the `timestamps` parameter to be `true`, regardless of whether you specify `false` for the - parameter. - + parameter.
+
**Note:** Applies to US English, Japanese, and Spanish (both broadband and narrowband models) and UK English (narrowband model) transcription only. To determine whether a language model supports speaker labels, you can also use the **Get a model** method and check that the attribute `speaker_labels` is set - to `true`. - + to `true`.
+
See [Speaker labels](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text -output#speaker_labels). @@ -411,16 +412,16 @@ The feature redacts any number that has three or more consecutive digits by replacing each digit with an `X` character. It is intended to redact sensitive numeric data, such as credit card numbers. By default, the service performs no - redaction. - + redaction.
+
When you enable redaction, the service automatically enables smart formatting, regardless of whether you explicitly disable that feature. To ensure maximum security, the service also disables keyword spotting (ignores the `keywords` and `keywords_threshold` parameters) and returns only a single final transcript - (forces the `max_alternatives` parameter to be `1`). - - **Note:** Applies to US English, Japanese, and Korean transcription only. - + (forces the `max_alternatives` parameter to be `1`).
+
+ **Note:** Applies to US English, Japanese, and Korean transcription only.
+
See [Numeric redaction](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-t ext-output#redaction). @@ -429,23 +430,66 @@ input audio. The service returns processing metrics at the interval specified by the `processing_metrics_interval` parameter. It also returns processing metrics for transcription events, for example, for final and interim results. - By default, the service returns no processing metrics. + By default, the service returns no processing metrics.
+
+ See [Processing + metrics](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-tex + t-metrics#processing_metrics).
i_processing_metrics_interval Specifies the interval in real wall-clock seconds at which the service is to return processing metrics. The parameter is ignored unless the - `processing_metrics` parameter is set to `true`. - + `processing_metrics` parameter is set to `true`.
+
The parameter accepts a minimum value of 0.1 seconds. The level of precision is - not restricted, so you can specify values such as 0.25 and 0.125. - + not restricted, so you can specify values such as 0.25 and 0.125.
+
The service does not impose a maximum value. If you want to receive processing metrics only for transcription events instead of at periodic intervals, set the value to a large number. If the value is larger than the duration of the audio, - the service returns processing metrics only for transcription events. + the service returns processing metrics only for transcription events.
+
+ See [Processing + metrics](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-tex + t-metrics#processing_metrics).
i_audio_metrics If `true`, requests detailed information about the signal characteristics of the input audio. The service returns audio metrics with the final transcription - results. By default, the service returns no audio metrics. + results. By default, the service returns no audio metrics.
+
+ See [Audio + metrics](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-tex + t-metrics#audio_metrics). +
i_end_of_phrase_silence_time + If `true`, specifies the duration of the pause interval at which the service + splits a transcript into multiple final results. If the service detects pauses + or extended silence before it reaches the end of the audio stream, its response + can include multiple final results. Silence indicates a point at which the + speaker pauses between spoken words or phrases.
+
+ Specify a value for the pause interval in the range of 0.0 to 120.0.
+ * A value greater than 0 specifies the interval that the service is to use for + speech recognition.
+ * A value of 0 indicates that the service is to use the default interval. It is + equivalent to omitting the parameter.
+
+ The default pause interval for most languages is 0.8 seconds; the default for + Chinese is 0.6 seconds.
+
+ See [End of phrase silence + time](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-o + utput#silence_time). +
i_splt_trnscrpt_at_phrase_end + If `true`, directs the service to split the transcript into multiple final + results based on semantic features of the input, for example, at the conclusion + of meaningful phrases such as sentences. The service bases its understanding of + semantic features on the base language model that you use with a request. + Custom language models and grammars can also influence how and where the + service splits a transcript. By default, the service splits transcripts based + solely on the pause interval.
+
+ See [Split transcript at phrase + end](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-ou + tput#split_transcript).
e_response Service return value of type T_RECOGNITION_JOB
public instance
create_language_model
importingi_create_language_modeltype T_CREATE_LANGUAGE_MODEL
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_LANGUAGE_MODEL
raisingzcx_ibmc_service_exception
Create a custom language model. @@ -633,11 +677,12 @@ the request. You must make the request with credentials for the instance of the service that owns the custom model. i_word_type - The type of words to be listed from the custom language model's words resource: - * `all` (the default) shows all words. + The type of words to be listed from the custom language model's words + resource:
+ * `all` (the default) shows all words.
* `user` shows only custom words that were added or modified by the user - directly. - * `corpora` shows only OOV that were extracted from corpora. + directly.
+ * `corpora` shows only OOV that were extracted from corpora.
* `grammars` shows only OOV words that are recognized by grammars.
i_sort Indicates the order in which the words are to be listed, `alphabetical` or by @@ -650,7 +695,7 @@ `%2B`. e_response Service return value of type T_WORDS -public instance
recognize
importingi_audiotype FILE
i_content_typetype STRING default 'application/octet-stream'
i_modeltype STRING default 'en-US_BroadbandModel'
i_language_customization_idtype STRING optional
i_acoustic_customization_idtype STRING optional
i_base_model_versiontype STRING optional
i_customization_weighttype DOUBLE optional
i_inactivity_timeouttype INTEGER optional
i_keywordstype TT_STRING optional
i_keywords_thresholdtype FLOAT optional
i_max_alternativestype INTEGER optional
i_word_alternatives_thresholdtype FLOAT optional
i_word_confidencetype BOOLEAN default C_BOOLEAN_FALSE
i_timestampstype BOOLEAN default C_BOOLEAN_FALSE
i_profanity_filtertype BOOLEAN default C_BOOLEAN_TRUE
i_smart_formattingtype BOOLEAN default C_BOOLEAN_FALSE
i_speaker_labelstype BOOLEAN default C_BOOLEAN_FALSE
i_customization_idtype STRING optional
i_grammar_nametype STRING optional
i_redactiontype BOOLEAN default C_BOOLEAN_FALSE
i_audio_metricstype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SPEECH_RECOGNITION_RESULTS
raisingzcx_ibmc_service_exception
Recognize audio. +public instance
recognize
importingi_audiotype FILE
i_content_typetype STRING default 'application/octet-stream'
i_modeltype STRING default 'en-US_BroadbandModel'
i_language_customization_idtype STRING optional
i_acoustic_customization_idtype STRING optional
i_base_model_versiontype STRING optional
i_customization_weighttype DOUBLE optional
i_inactivity_timeouttype INTEGER optional
i_keywordstype TT_STRING optional
i_keywords_thresholdtype FLOAT optional
i_max_alternativestype INTEGER optional
i_word_alternatives_thresholdtype FLOAT optional
i_word_confidencetype BOOLEAN default C_BOOLEAN_FALSE
i_timestampstype BOOLEAN default C_BOOLEAN_FALSE
i_profanity_filtertype BOOLEAN default C_BOOLEAN_TRUE
i_smart_formattingtype BOOLEAN default C_BOOLEAN_FALSE
i_speaker_labelstype BOOLEAN default C_BOOLEAN_FALSE
i_customization_idtype STRING optional
i_grammar_nametype STRING optional
i_redactiontype BOOLEAN default C_BOOLEAN_FALSE
i_audio_metricstype BOOLEAN default C_BOOLEAN_FALSE
i_end_of_phrase_silence_timetype DOUBLE optional
i_splt_trnscrpt_at_phrase_endtype BOOLEAN default C_BOOLEAN_FALSE
i_accepttype STRING default 'application/json'
exportinge_responsetype T_SPEECH_RECOGNITION_RESULTS
raisingzcx_ibmc_service_exception
Recognize audio.
Parameters
i_audio The audio to transcribe. @@ -669,8 +714,8 @@ request with credentials for the instance of the service that owns the custom model. By default, no custom language model is used. See [Custom models](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text - -input#custom-input). - + -input#custom-input).
+
**Note:** Use this parameter instead of the deprecated `customization_id` parameter.
i_acoustic_customization_id @@ -694,19 +739,19 @@ If you specify the customization ID (GUID) of a custom language model with the recognition request, the customization weight tells the service how much weight to give to words from the custom language model compared to those from the base - model for the current request. - + model for the current request.
+
Specify a value between 0.0 and 1.0. Unless a different customization weight was specified for the custom model when it was trained, the default value is 0.3. A customization weight that you specify overrides a weight that was specified - when the custom model was trained. - + when the custom model was trained.
+
The default value yields the best performance in general. Assign a higher value if your audio makes frequent use of OOV words from the custom model. Use caution when setting the weight: a higher value can improve the accuracy of phrases from the custom model's domain, but it can negatively affect - performance on non-domain phrases. - + performance on non-domain phrases.
+
See [Custom models](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text -input#custom-input). @@ -772,9 +817,10 @@ conventional representations in the final transcript of a recognition request. For US English, the service also converts certain keyword strings to punctuation symbols. By default, the service performs no smart formatting. - - **Note:** Applies to US English, Japanese, and Spanish transcription only. - +
+
+ **Note:** Applies to US English, Japanese, and Spanish transcription only.
+
See [Smart formatting](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to- text-output#smart_formatting). @@ -783,14 +829,14 @@ which participants in a multi-person exchange. By default, the service returns no speaker labels. Setting `speaker_labels` to `true` forces the `timestamps` parameter to be `true`, regardless of whether you specify `false` for the - parameter. - + parameter.
+
**Note:** Applies to US English, Japanese, and Spanish (both broadband and narrowband models) and UK English (narrowband model) transcription only. To determine whether a language model supports speaker labels, you can also use the **Get a model** method and check that the attribute `speaker_labels` is set - to `true`. - + to `true`.
+
See [Speaker labels](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text -output#speaker_labels). @@ -812,23 +858,58 @@ The feature redacts any number that has three or more consecutive digits by replacing each digit with an `X` character. It is intended to redact sensitive numeric data, such as credit card numbers. By default, the service performs no - redaction. - + redaction.
+
When you enable redaction, the service automatically enables smart formatting, regardless of whether you explicitly disable that feature. To ensure maximum security, the service also disables keyword spotting (ignores the `keywords` and `keywords_threshold` parameters) and returns only a single final transcript - (forces the `max_alternatives` parameter to be `1`). - - **Note:** Applies to US English, Japanese, and Korean transcription only. - + (forces the `max_alternatives` parameter to be `1`).
+
+ **Note:** Applies to US English, Japanese, and Korean transcription only.
+
See [Numeric redaction](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-t ext-output#redaction).
i_audio_metrics If `true`, requests detailed information about the signal characteristics of the input audio. The service returns audio metrics with the final transcription - results. By default, the service returns no audio metrics. + results. By default, the service returns no audio metrics.
+
+ See [Audio + metrics](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-tex + t-metrics#audio_metrics). +
i_end_of_phrase_silence_time + If `true`, specifies the duration of the pause interval at which the service + splits a transcript into multiple final results. If the service detects pauses + or extended silence before it reaches the end of the audio stream, its response + can include multiple final results. Silence indicates a point at which the + speaker pauses between spoken words or phrases.
+
+ Specify a value for the pause interval in the range of 0.0 to 120.0.
+ * A value greater than 0 specifies the interval that the service is to use for + speech recognition.
+ * A value of 0 indicates that the service is to use the default interval. It is + equivalent to omitting the parameter.
+
+ The default pause interval for most languages is 0.8 seconds; the default for + Chinese is 0.6 seconds.
+
+ See [End of phrase silence + time](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-o + utput#silence_time). +
i_splt_trnscrpt_at_phrase_end + If `true`, directs the service to split the transcript into multiple final + results based on semantic features of the input, for example, at the conclusion + of meaningful phrases such as sentences. The service bases its understanding of + semantic features on the base language model that you use with a request. + Custom language models and grammars can also influence how and where the + service splits a transcript. By default, the service splits transcripts based + solely on the pause interval.
+
+ See [Split transcript at phrase + end](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-ou + tput#split_transcript).
e_response Service return value of type T_SPEECH_RECOGNITION_RESULTS
public instance
register_callback
importingi_callback_urltype STRING
i_user_secrettype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_REGISTER_STATUS
raisingzcx_ibmc_service_exception
Register a callback. @@ -883,10 +964,10 @@ service that owns the custom model. i_word_type_to_add The type of words from the custom language model's words resource on which to - train the model: + train the model:
* `all` (the default) trains the model on all new words, regardless of whether they were extracted from corpora or grammars or were added or modified by the - user. + user.
* `user` trains the model only on new words that were added or modified by the user directly. The model is not trained on new words extracted from corpora or grammars. @@ -894,14 +975,14 @@ Specifies a customization weight for the custom language model. The customization weight tells the service how much weight to give to words from the custom language model compared to those from the base model for speech - recognition. Specify a value between 0.0 and 1.0; the default is 0.3. - + recognition. Specify a value between 0.0 and 1.0; the default is 0.3.
+
The default value yields the best performance in general. Assign a higher value if your audio makes frequent use of OOV words from the custom model. Use caution when setting the weight: a higher value can improve the accuracy of phrases from the custom model's domain, but it can negatively affect - performance on non-domain phrases. - + performance on non-domain phrases.
+
The value that you assign is used for all recognition requests that use the model. You can override it for any recognition request by specifying a customization weight for that request. @@ -936,4 +1017,4 @@ The customization ID (GUID) of the custom language model that is to be used for the request. You must make the request with credentials for the instance of the service that owns the custom model. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_text_to_speech_v1.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_text_to_speech_v1.html index 9f2ce66..488e67c 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_text_to_speech_v1.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_text_to_speech_v1.html @@ -3,14 +3,14 @@ speech-synthesis capabilities to synthesize text into natural-sounding speech in a variety of languages, dialects, and voices. The service supports at least one male or female voice, sometimes both, for each language. The audio is - streamed back to the client with minimal delay. - + streamed back to the client with minimal delay.
+
For speech synthesis, the service supports a synchronous HTTP Representational State Transfer (REST) interface. It also supports a WebSocket interface that provides both plain text and SSML input, including the SSML <mark> element and word timings. SSML is an XML-based markup language that provides - text annotation for speech-synthesis applications. - + text annotation for speech-synthesis applications.
+
The service also offers a customization interface. You can use the interface to define sounds-like or phonetic translations for words. A sounds-like translation consists of one or more words that, when combined, sound like the @@ -21,8 +21,8 @@ an XML-based markup language that provides text annotation for speech-synthesis applications. Pass a maximum of 5 KB of input text.publict_translation (structured type) Information about the translation for the specified text.publict_update_voice_model (structured type) Information about the updated custom voice model.publict_voice (structured type) Information about an available voice model.publict_voices (structured type) Information about all available voice models.publict_voice_model (structured type) Information about an existing custom voice model.publict_voice_models (structured type) Information about existing custom voice models.publict_word (structured type) Information about a word for the custom voice model.publict_words (structured type) For the **Add custom words** method, one or more words that are to be added or updated for the custom voice model and the translation for each specified word. - - +
+
For the **List custom words** method, the words and their translations from the custom voice model.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
add_word
importingi_customization_idtype STRING
i_wordtype STRING
i_translationtype T_TRANSLATION
i_contenttypetype STRING default 'application/json'
raisingzcx_ibmc_service_exception
Add a custom word. @@ -39,7 +39,7 @@ The customization ID (GUID) of the custom voice model. You must make the request with credentials for the instance of the service that owns the custom model.
i_custom_words - + No documentation available.
public instance
create_voice_model
importingi_create_voice_modeltype T_CREATE_VOICE_MODEL
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_VOICE_MODEL
raisingzcx_ibmc_service_exception
Create a custom model.
Parameters
i_create_voice_model @@ -133,7 +133,7 @@
public instance
synthesize
importingi_texttype T_TEXT
i_accepttype STRING default 'audio/ogg;codecs=opus'
i_voicetype STRING default 'en-US_MichaelVoice'
i_customization_idtype STRING optional
i_contenttypetype STRING default 'application/json'
exportinge_responsetype FILE
raisingzcx_ibmc_service_exception
Synthesize audio.
Parameters
i_text - + No documentation available.
i_accept The requested format (MIME type) of the audio. You can use the `Accept` header or the `accept` parameter to specify the audio format. For more information @@ -157,4 +157,4 @@
i_update_voice_model An `UpdateVoiceModel` object that contains information that is to be updated for the custom voice model. -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_tone_analyzer_v3.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_tone_analyzer_v3.html index 47ecec1..b6db80a 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_tone_analyzer_v3.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_tone_analyzer_v3.html @@ -5,8 +5,8 @@ how your written communications are perceived and then to improve the tone of your communications. Businesses can use the service to learn the tone of their customers' communications and to respond to each customer appropriately, or to - understand and improve their customer conversations. - + understand and improve their customer conversations.
+
**Note:** Request logging is disabled for the Tone Analyzer service. Regardless of whether you set the `X-Watson-Learning-Opt-Out` request header, the service does not log or retain data from requests and responses.

Types

Visibility and LevelNameDocumentation
publict_document_analysis (structured type) The results of the analysis for the full input content.
publict_error_model (structured type) The error response from a failed request.
publict_sentence_analysis (structured type) The results of the analysis for the individual sentences of the input content.
publict_tone_analysis (structured type) The tone analysis results for the input from the general-purpose endpoint.
publict_tone_category (structured type) The category for a tone from the input content.
publict_tone_chat_input (structured type) Input for the customer-engagement endpoint.
publict_tone_chat_score (structured type) The score for an utterance from the input content.
publict_tone_input (structured type) Input for the general-purpose endpoint.
publict_tone_score (structured type) The score for a tone from the input content.
publict_utterance (structured type) An utterance for the input of the general-purpose endpoint.
publict_utterance_analyses (structured type) The results of the analysis for the utterances of the input content.
publict_utterance_analysis (structured type) The results of the analysis for an utterance of the input content.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instanceget_appname redefinition 
public instanceget_request_prop redefinition 
public instanceget_sdk_version_date redefinition 
public instance
tone
importingi_tone_inputtype T_TONE_INPUT
i_content_typetype STRING default 'application/json'
i_sentencestype BOOLEAN default C_BOOLEAN_TRUE
i_tonestype TT_STRING optional
i_content_languagetype STRING default 'en'
i_accept_languagetype STRING default 'en'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TONE_ANALYSIS
raisingzcx_ibmc_service_exception
Analyze general tone. @@ -23,8 +23,8 @@ default), the service returns results for each sentence.
i_tones **`2017-09-21`:** Deprecated. The service continues to accept the parameter for - ** backward-compatibility, but the parameter no longer affects the response. - ** + ** backward-compatibility, but the parameter no longer affects the response.
+ **
****`2016-05-19`:** A comma-separated list of tones for which the service is to ** return its analysis of the input; the indicated tones apply both to the full ** document and to individual sentences of the document. You can specify one or @@ -35,8 +35,8 @@ variants are treated as their parent language; for example, `en-US` is interpreted as `en`. The input content must match the specified language. Do not submit content that contains both languages. You can use different - languages for **Content-Language** and **Accept-Language**. - * **`2017-09-21`:** Accepts `en` or `fr`. + languages for **Content-Language** and **Accept-Language**.
+ * **`2017-09-21`:** Accepts `en` or `fr`.
* **`2016-05-19`:** Accepts only `en`.
i_accept_language The desired language of the response. For two-character arguments, regional @@ -54,8 +54,8 @@ variants are treated as their parent language; for example, `en-US` is interpreted as `en`. The input content must match the specified language. Do not submit content that contains both languages. You can use different - languages for **Content-Language** and **Accept-Language**. - * **`2017-09-21`:** Accepts `en` or `fr`. + languages for **Content-Language** and **Accept-Language**.
+ * **`2017-09-21`:** Accepts `en` or `fr`.
* **`2016-05-19`:** Accepts only `en`.
i_accept_language The desired language of the response. For two-character arguments, regional @@ -64,4 +64,4 @@ and **Accept-Language**.
e_response Service return value of type T_UTTERANCE_ANALYSES -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_util.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_util.html index 808bb12..1230f65 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_util.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_util.html @@ -1 +1,34 @@ -Class ZCL_IBMC_UTIL

Class ZCL_IBMC_UTIL

public final create public

Documentation

Utilities to connect to IBM Watson

Methods

Visibility and LevelNameDocumentation
public static
convert_datetime_to_timestamp
importingi_datetimetype ZCL_IBMC_SERVICE=>DATETIME
returningvalue(e_timestamp)type TIMESTAMP
Converts a DATETIME String to type TIMESTAMP
Parameters
e_timestampUTC Time Stamp in Short Form (YYYYMMDDhhmmss)
public static
convert_timestamp_to_datetime
importingi_timestamptype TIMESTAMP
returningvalue(e_datetime)type ZCL_IBMC_SERVICE=>DATETIME
Converts a DATETIME String to type TIMESTAMP
Parameters
i_timestampUTC Time Stamp in Short Form (YYYYMMDDhhmmss)
e_datetimeUTC Time Stamp in Short Form (YYYYMMDDhhmmss)
public static
convert_timestamp_to_local
importingiv_timestamptype TIMESTAMP
returningvalue(ev_local)type STRING
Converts a UTF timestamp to a local timestamp
Parameters
iv_timestampUTC Time Stamp in Short Form (YYYYMMDDhhmmss)
public static
get_mimetype_from_extension
importingi_filenametype STRING
returningvalue(e_mimetype)type STRING
Returns mime type for a given extension
Parameters
i_filenameCharacter field of length 40
public static
utc_to_timezone
importingi_timestamptype TIMESTAMP
i_timezonetype ZIF_IBMC_SERVICE_ARCH=>TY_TIMEZONE optional
returningvalue(e_timestamp)type TIMESTAMP
Converts an UTC timestamp to the specified timezone
Parameters
i_timestampUTC Time Stamp in Short Form (YYYYMMDDhhmmss)
i_timezoneTime Zone
e_timestampUTC Time Stamp in Short Form (YYYYMMDDhhmmss)
\ No newline at end of file +Class ZCL_IBMC_UTIL

Class ZCL_IBMC_UTIL

public final create public

Documentation

Utilities to connect to IBM Watson

Methods

Visibility and LevelNameDocumentation
public static
convert_datetime_to_timestamp
importingi_datetimetype ZCL_IBMC_SERVICE=>DATETIME
returningvalue(e_timestamp)type TIMESTAMP
Converts datetime format to a timestamp, i.e. yyyy-mm-ddThh:mm:ssZ -> YYYYMMDDHHMMSS + +
Parameters
i_datetime Input in datetime format. +
e_timestamp Timestamp. +
public static
convert_timestamp_to_datetime
importingi_timestamptype TIMESTAMP
returningvalue(e_datetime)type ZCL_IBMC_SERVICE=>DATETIME
Converts a timestamp to datetime format, i.e. YYYYMMDDHHMMSS -> yyyy-mm-ddThh:mm:ssZ + +
Parameters
i_timestamp Timestamp. +
e_datetimeUTC Time Stamp in Short Form (YYYYMMDDhhmmss)
public static
convert_timestamp_to_local
importingiv_timestamptype TIMESTAMP
returningvalue(ev_local)type STRING
Converts a timestamp in UTC to a timestamp in local time. + +
Parameters
iv_timestamp Timestamp (UTC). +
ev_local Timestamp (local time). +
public static
get_mimetype_from_extension
importingi_filenametype STRING
returningvalue(e_mimetype)type STRING
Determine MIME type from a file name, e.g. 'docu.txt' -> 'text_/plain'. + +
Parameters
i_filename Filename with extension. +
e_mimetype MIME type. +
public static
itab_to_tableschema
importingi_itabtype ANY TABLE
i_dictionarytype ANY optional
i_lower_casetype ZCL_IBMC_SERVICE=>BOOLEAN default ZCL_IBMC_SERVICE=>C_BOOLEAN_FALSE
it_excluded_fieldstype ZCL_IBMC_SERVICE=>TT_STRING optional
returningvalue(e_json)type STRING
Converts an internal table to JSON string in table schema format. + E.g.: '{"fields": ["PET", "NUMBER"], "values": [["Cat",5],["Rabbit",2]]}' + +
Parameters
i_itab Internal table to be converted. +
i_dictionary Dictionary to be used for mapping ABAP identifiers to JSON keys. +
i_lower_case If set to C_BOOLEAN_TRUE all keys in JSON string will be lower case. +
e_json JSON string. +
public static
tableschema_to_itab
importingi_jsontype STRING
i_tableschema_keytype STRING optional
exportinge_itabtype ANY TABLE
Converts a JSON string in table schema format to an internal table. + E.g.: '{"tableschema_key": {"fields": ["PET", "NUMBER"], "values": [["Cat",5],["Rabbit",2]]}}' + +
Parameters
i_json JSON string. +
i_tableschema_key Key in JSON string that holds the table schema. +
e_itab Internal table containing converted data. +
public static
utc_to_timezone
importingi_timestamptype TIMESTAMP
i_timezonetype ZIF_IBMC_SERVICE_ARCH=>TY_TIMEZONE optional
returningvalue(e_timestamp)type TIMESTAMP
Converts a timestamp in UTC to a timestamp in another timezone. + +
Parameters
i_timestamp Timestamp (UTC). +
i_timezone Time zone +
e_timestamp Timestamp in give time zone. +
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v3.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v3.html index 6b0cd9f..a7c227a 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v3.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v3.html @@ -6,7 +6,7 @@ indicates greater likelihood that the class is depicted in the image. The default threshold for returning scores from a classifier is 0.5.publict_custom_classes_processed type INTEGER Number of custom classes identified in the images.publict_empty type JSONOBJECT Empty object.publict_error_html (structured type) Error information.publict_error_info (structured type) Information about what might have caused a failure, such as an image that is too large. Not returned when there is no error.publict_error_response (structured type) Error information.publict_images_processed type INTEGER Number of images processed for the API call.publict_image_file type STRING Relative path of the image file if uploaded directly. Not returned when the - image is passed by URL.publict_inline_object (structured type) publict_inline_object1 (structured type) publict_inline_object2 (structured type) publict_resolved_url type STRING Fully resolved URL of the image after redirects are followed. Not returned when + image is passed by URL.publict_inline_object (structured type) No documentation available.publict_inline_object1 (structured type) No documentation available.publict_inline_object2 (structured type) No documentation available.publict_resolved_url type STRING Fully resolved URL of the image after redirects are followed. Not returned when the image is uploaded.publict_source_url type STRING Source of the image before any redirects. Not returned when the image is uploaded.publict_type_hierarchy type STRING Knowledge graph of the property. For example, `/fruit/pome/apple/eating apple/Granny Smith`. Included only if identified.publict_warning_info (structured type) Information about something that went wrong.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
classify
importingi_images_filetype FILE optional
i_images_filenametype STRING optional
i_images_file_content_typetype STRING optional
i_urltype STRING optional
i_thresholdtype FLOAT optional
i_ownerstype TT_STRING optional
i_classifier_idstype TT_STRING optional
i_accept_languagetype STRING default 'en'
i_contenttypetype STRING default 'multipart/form-data'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_CLASSIFIED_IMAGES
raisingzcx_ibmc_service_exception
Classify images. @@ -16,8 +16,8 @@ size is 10 MB. Include no more than 20 images and limit the .zip file to 100 MB. Encode the image and .zip file names in UTF-8 if they contain non-ASCII characters. The service assumes UTF-8 encoding if it encounters non-ASCII - characters. - + characters.
+
You can also include an image with the **url** parameter.
i_images_filename The filename for imagesFile. @@ -26,30 +26,32 @@
i_url The URL of an image (.gif, .jpg, .png, .tif) to analyze. The minimum recommended pixel density is 32X32 pixels, but the service tends to perform better with - images that are at least 224 x 224 pixels. The maximum image size is 10 MB. - + images that are at least 224 x 224 pixels. The maximum image size is 10 + MB.
+
You can also include images with the **images_file** parameter.
i_threshold The minimum score a class must have to be displayed in the response. Set the threshold to `0.0` to return all identified classes.
i_owners The categories of classifiers to apply. The **classifier_ids** parameter - overrides **owners**, so make sure that **classifier_ids** is empty. + overrides **owners**, so make sure that **classifier_ids** is empty.
- Use `IBM` to classify against the `default` general classifier. You get the - same result if both **classifier_ids** and **owners** parameters are empty. + same result if both **classifier_ids** and **owners** parameters are + empty.
- Use `me` to classify against all your custom classifiers. However, for better performance use **classifier_ids** to specify the specific custom classifiers - to apply. + to apply.
- Use both `IBM` and `me` to analyze the image against both classifier categories.
i_classifier_ids Which classifiers to apply. Overrides the **owners** parameter. You can specify both custom and built-in classifier IDs. The built-in `default` classifier is - used if both **classifier_ids** and **owners** parameters are empty. - - The following built-in classifier IDs require no training: - - `default`: Returns classes from thousands of general tags. - - `food`: Enhances specificity and accuracy for images of food items. + used if both **classifier_ids** and **owners** parameters are empty.
+
+ The following built-in classifier IDs require no training:
+ - `default`: Returns classes from thousands of general tags.
+ - `food`: Enhances specificity and accuracy for images of food items.
- `explicit`: Evaluates whether the image might be pornographic.
i_accept_language The desired language of parts of the response. See the response for details. @@ -61,21 +63,22 @@ The name of the new classifier. Encode special characters in UTF-8.
i_positive_examples A .zip file of images that depict the visual subject of a class in the new - classifier. You can include more than one positive example file in a call. - + classifier. You can include more than one positive example file in a call.
+
Specify the parameter name by appending `_positive_examples` to the class name. For example, `goldenretriever_positive_examples` creates the class - **goldenretriever**. - + **goldenretriever**. The string cannot contain the following characters: ``$ * + - { } \ | / ' " ` [ ]``.
+
Include at least 10 images in .jpg or .png format. The minimum recommended image resolution is 32X32 pixels. The maximum number of images is 10,000 images or - 100 MB per .zip file. - + 100 MB per .zip file.
+
Encode special characters in the file name in UTF-8.
i_negative_examples A .zip file of images that do not depict the visual subject of any of the - classes of the new classifier. Must contain a minimum of 10 images. - + classes of the new classifier. Must contain a minimum of 10 images.
+
Encode special characters in the file name in UTF-8.
i_negative_examples_filename The filename for negativeExamples. @@ -115,24 +118,25 @@
i_positive_examples A .zip file of images that depict the visual subject of a class in the classifier. The positive examples create or update classes in the classifier. - You can include more than one positive example file in a call. - + You can include more than one positive example file in a call.
+
Specify the parameter name by appending `_positive_examples` to the class name. For example, `goldenretriever_positive_examples` creates the class - `goldenretriever`. - + `goldenretriever`. The string cannot contain the following characters: ``$ * - + { } \ | / ' " ` [ ]``.
+
Include at least 10 images in .jpg or .png format. The minimum recommended image resolution is 32X32 pixels. The maximum number of images is 10,000 images or - 100 MB per .zip file. - + 100 MB per .zip file.
+
Encode special characters in the file name in UTF-8.
i_negative_examples A .zip file of images that do not depict the visual subject of any of the - classes of the new classifier. Must contain a minimum of 10 images. - + classes of the new classifier. Must contain a minimum of 10 images.
+
Encode special characters in the file name in UTF-8.
i_negative_examples_filename The filename for negativeExamples.
e_response Service return value of type T_CLASSIFIER -
\ No newline at end of file + \ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v4.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v4.html index ce353ca..f4eef82 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v4.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcl_ibmc_visual_recognition_v4.html @@ -1,35 +1,29 @@ Class ZCL_IBMC_VISUAL_RECOGNITION_V4

Class ZCL_IBMC_VISUAL_RECOGNITION_V4

public inheriting from ZCL_IBMC_SERVICE_EXT create public

Documentation

Visual Recognition v4

Provide images to the IBM Watson™ Visual Recognition service for analysis. - The service detects objects based on a set of images with training data. - - **Beta:** The Visual Recognition v4 API and Object Detection model are beta - features. For more information about beta features, see the [Release - notes](https://cloud.ibm.com/docs/services/visual-recognition?topic=visual-reco - gnition-release-notes#beta). - {: important}

Types

Visibility and LevelNameDocumentation
publict_analyze_response (structured type) Results for all images.
publict_base_collection (structured type) Base details about a collection.
publict_base_object (structured type) Details about an object and its location.
publict_base_training_data_objects (structured type) Container for the training data.
publict_collection (structured type) Details about a collection.
publict_collections_list (structured type) A container for the list of collections.
publict_collection_objects (structured type) The objects in a collection that are detected in an image.
publict_detected_objects (structured type) Container for the list of collections that have objects detected in an image.
publict_empty type JSONOBJECT Empty response.
publict_error (structured type) Details about an error.
publict_error_response (structured type) A container for the list of request-level problems.
publict_error_target (structured type) Details about the specific area of the problem.
publict_image (structured type) Details about an image.
publict_image_details (structured type) Details about an image.
publict_image_details_list (structured type) List of information about the images.
publict_image_dimensions (structured type) Height and width of an image.
publict_image_source (structured type) The source type of the image.
publict_image_summary (structured type) Basic information about an image.
publict_image_summary_list (structured type) List of images.
publict_inline_object (structured type) 
publict_inline_object1 (structured type) 
publict_jpeg_image type FILE A file returned in the response.
publict_location (structured type) Defines the location of the bounding box around the object.
publict_object_detail (structured type) Details about an object in the collection.
publict_object_training_status (structured type) Training status for the objects in the collection.
publict_training_data_object (structured type) Details about the training data.
publict_training_data_objects (structured type) Training data for all objects.
publict_training_status (structured type) Training status information for the collection.
publict_warning (structured type) Details about a problem.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
add_images
importingi_collection_idtype STRING
i_images_filetype TT_FILE_WITH_METADATA optional
i_image_urltype TT_STRING optional
i_training_datatype STRING optional
i_contenttypetype STRING default 'multipart/form-data'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_IMAGE_DETAILS_LIST
raisingzcx_ibmc_service_exception
Add images. + The service detects objects based on a set of images with training data.

Types

Visibility and LevelNameDocumentation
publict_analyze_response (structured type) Results for all images.
publict_base_collection (structured type) Base details about a collection.
publict_base_object (structured type) Details about an object and its location.
publict_base_training_data_objects (structured type) Container for the training data.
publict_collection (structured type) Details about a collection.
publict_collections_list (structured type) A container for the list of collections.
publict_collection_objects (structured type) The objects in a collection that are detected in an image.
publict_detected_objects (structured type) Container for the list of collections that have objects detected in an image.
publict_empty type JSONOBJECT Empty response.
publict_error (structured type) Details about an error.
publict_error_response (structured type) A container for the list of request-level problems.
publict_error_target (structured type) Details about the specific area of the problem.
publict_image (structured type) Details about an image.
publict_image_details (structured type) Details about an image.
publict_image_details_list (structured type) List of information about the images.
publict_image_dimensions (structured type) Height and width of an image.
publict_image_source (structured type) The source type of the image.
publict_image_summary (structured type) Basic information about an image.
publict_image_summary_list (structured type) List of images.
publict_inline_object (structured type) No documentation available.
publict_inline_object1 (structured type) No documentation available.
publict_jpeg_image type FILE A file returned in the response.
publict_location (structured type) Defines the location of the bounding box around the object.
publict_object_detail (structured type) Details about an object in the collection.
publict_object_metadata (structured type) Basic information about an object.
publict_object_metadata_list (structured type) List of objects.
publict_object_training_status (structured type) Training status for the objects in the collection.
publict_training_data_object (structured type) Details about the training data.
publict_training_data_objects (structured type) Training data for all objects.
publict_training_event (structured type) Details about the training event.
publict_training_events (structured type) Details about the training events.
publict_training_status (structured type) Training status information for the collection.
publict_update_object_metadata (structured type) Basic information about an updated object.
publict_warning (structured type) Details about a problem.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)  
public staticc_required_fields (structured type)  

Methods

Visibility and LevelNameDocumentation
public instance
add_images
importingi_collection_idtype STRING
i_images_filetype TT_FILE_WITH_METADATA optional
i_image_urltype TT_STRING optional
i_training_datatype STRING optional
i_contenttypetype STRING default 'multipart/form-data'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_IMAGE_DETAILS_LIST
raisingzcx_ibmc_service_exception
Add images.
Parameters
i_collection_id The identifier of the collection.
i_images_file - An array of image files (.jpg or .png) or .zip files with images. - - Include a maximum of 20 images in a request. - - Limit the .zip file to 100 MB. - - Limit each image file to 10 MB. - + An array of image files (.jpg or .png) or .zip files with images.
+ - Include a maximum of 20 images in a request.
+ - Limit the .zip file to 100 MB.
+ - Limit each image file to 10 MB.
+
You can also include an image with the **image_url** parameter.
i_image_url - The array of URLs of image files (.jpg or .png). - - Include a maximum of 20 images in a request. - - Limit each image file to 10 MB. + The array of URLs of image files (.jpg or .png).
+ - Include a maximum of 20 images in a request.
+ - Limit each image file to 10 MB.
- Minimum width and height is 30 pixels, but the service tends to perform better with images that are at least 300 x 300 pixels. Maximum is 5400 pixels for - either height or width. - + either height or width.
+
You can also include images with the **images_file** parameter.
i_training_data Training data for a single image. Include training data only if you add one - image with the request. - + image with the request.
+
The `object` property can contain alphanumeric, underscore, hyphen, space, and dot characters. It cannot begin with the reserved prefix `sys-` and must be no longer than 32 characters. @@ -52,20 +46,20 @@
i_features The features to analyze.
i_images_file - An array of image files (.jpg or .png) or .zip files with images. - - Include a maximum of 20 images in a request. - - Limit the .zip file to 100 MB. - - Limit each image file to 10 MB. - + An array of image files (.jpg or .png) or .zip files with images.
+ - Include a maximum of 20 images in a request.
+ - Limit the .zip file to 100 MB.
+ - Limit each image file to 10 MB.
+
You can also include an image with the **image_url** parameter.
i_image_url - An array of URLs of image files (.jpg or .png). - - Include a maximum of 20 images in a request. - - Limit each image file to 10 MB. + An array of URLs of image files (.jpg or .png).
+ - Include a maximum of 20 images in a request.
+ - Limit each image file to 10 MB.
- Minimum width and height is 30 pixels, but the service tends to perform better with images that are at least 300 x 300 pixels. Maximum is 5400 pixels for - either height or width. - + either height or width.
+
You can also include images with the **images_file** parameter.
i_threshold The minimum score a feature must have to be returned. @@ -87,6 +81,12 @@ The identifier of the collection.
i_image_id The identifier of the image. +
public instance
delete_object
importingi_collection_idtype STRING
i_objecttype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception
Delete an object. + +
Parameters
i_collection_id + The identifier of the collection. +
i_object + The name of the object.
public instance
delete_user_data
importingi_customer_idtype STRING
i_accepttype STRING default 'application/json'
raisingzcx_ibmc_service_exception
Delete labeled data.
Parameters
i_customer_id @@ -112,10 +112,32 @@
i_image_id The identifier of the image.
i_size - Specify the image size. + The image size. Specify `thumbnail` to return a version that maintains the + original aspect ratio but is no larger than 200 pixels in the larger dimension. + For example, an original 800 x 1000 image is resized to 160 x 200 pixels.
e_response Service return value of type FILE -
public instanceget_request_prop redefinition 
public instanceget_sdk_version_date redefinition 
public instance
list_collections
importingi_accepttype STRING default 'application/json'
exportinge_responsetype T_COLLECTIONS_LIST
raisingzcx_ibmc_service_exception
List collections. +
public instance
get_object_metadata
importingi_collection_idtype STRING
i_objecttype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_OBJECT_METADATA
raisingzcx_ibmc_service_exception
Get object metadata. + +
Parameters
i_collection_id + The identifier of the collection. +
i_object + The name of the object. +
e_response + Service return value of type T_OBJECT_METADATA +
public instanceget_request_prop redefinition 
public instanceget_sdk_version_date redefinition 
public instance
get_training_usage
importingi_start_timetype STRING optional
i_end_timetype STRING optional
i_accepttype STRING default 'application/json'
exportinge_responsetype T_TRAINING_EVENTS
raisingzcx_ibmc_service_exception
Get training usage. + +
Parameters
i_start_time + The earliest day to include training events. Specify dates in YYYY-MM-DD format. + If empty or not specified, the earliest training event is included. +
i_end_time + The most recent day to include training events. Specify dates in YYYY-MM-DD + format. All events for the day are included. If empty or not specified, the + current day is used. Specify the same value as `start_time` to request events + for a single day. +
e_response + Service return value of type T_TRAINING_EVENTS +
public instance
list_collections
importingi_accepttype STRING default 'application/json'
exportinge_responsetype T_COLLECTIONS_LIST
raisingzcx_ibmc_service_exception
List collections.
Parameters
e_response Service return value of type T_COLLECTIONS_LIST @@ -125,6 +147,12 @@ The identifier of the collection.
e_response Service return value of type T_IMAGE_SUMMARY_LIST +
public instance
list_object_metadata
importingi_collection_idtype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_OBJECT_METADATA_LIST
raisingzcx_ibmc_service_exception
List object metadata. + +
Parameters
i_collection_id + The identifier of the collection. +
e_response + Service return value of type T_OBJECT_METADATA_LIST
public instance
train
importingi_collection_idtype STRING
i_accepttype STRING default 'application/json'
exportinge_responsetype T_COLLECTION
raisingzcx_ibmc_service_exception
Train a collection.
Parameters
i_collection_id @@ -139,4 +167,14 @@ The updated collection.
e_response Service return value of type T_COLLECTION -
\ No newline at end of file +public instance
update_object_metadata
importingi_collection_idtype STRING
i_objecttype STRING
i_updateobjectmetadatatype T_UPDATE_OBJECT_METADATA optional
i_contenttypetype STRING default 'application/json'
i_accepttype STRING default 'application/json'
exportinge_responsetype T_UPDATE_OBJECT_METADATA
raisingzcx_ibmc_service_exception
Update an object name. + +
Parameters
i_collection_id + The identifier of the collection. +
i_object + The name of the object. +
i_updateobjectmetadata + No documentation available. +
e_response + Service return value of type T_UPDATE_OBJECT_METADATA +
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/classes/zcx_ibmc_service_exception.html b/docs/ABAPDoc/abapdoc/zibmc/classes/zcx_ibmc_service_exception.html index 8f525ff..19bc4e8 100644 --- a/docs/ABAPDoc/abapdoc/zibmc/classes/zcx_ibmc_service_exception.html +++ b/docs/ABAPDoc/abapdoc/zibmc/classes/zcx_ibmc_service_exception.html @@ -1 +1 @@ -Class ZCX_IBMC_SERVICE_EXCEPTION

Class ZCX_IBMC_SERVICE_EXCEPTION

public inheriting from CX_STATIC_CHECK final create public

Documentation

IBM Cloud Service Exception

Interfaces

if_t100_dyn_msg
if_t100_message

Attributes

Visibility and LevelNameDocumentation
public instancep_http_reason type STRING  
public instancep_http_status type STRING  
public instancep_msg_json type STRING  

Methods

Visibility and LevelNameDocumentation
public instance
constructor
importingtextidlike IF_T100_MESSAGE=>T100KEY optional
previouslike PREVIOUS optional
p_msg_jsontype STRING optional
p_http_statustype STRING optional
p_http_reasontype STRING optional
CONSTRUCTOR
public instanceif_message~get_longtext redefinition 
public instanceif_message~get_text redefinition 
\ No newline at end of file +Class ZCX_IBMC_SERVICE_EXCEPTION

Class ZCX_IBMC_SERVICE_EXCEPTION

public inheriting from CX_STATIC_CHECK final create public

Documentation

IBM Cloud Service Exception

Interfaces

if_t100_dyn_msg
if_t100_message

Attributes

Visibility and LevelNameDocumentation
public instancep_http_reason type STRING  
public instancep_http_status type STRING  
public instancep_msg_json type STRING  

Methods

Visibility and LevelNameDocumentation
public instance
constructor
importingtextidlike IF_T100_MESSAGE=>T100KEY optional
previouslike PREVIOUS optional
p_msg_jsontype STRING optional
p_http_statustype STRING optional
p_http_reasontype STRING optional
CONSTRUCTOR
public instanceif_message~get_longtext redefinition 
public instanceif_message~get_text redefinition 
\ No newline at end of file diff --git a/docs/ABAPDoc/abapdoc/zibmc/interfaces/zif_ibmc_service_arch.html b/docs/ABAPDoc/abapdoc/zibmc/interfaces/zif_ibmc_service_arch.html new file mode 100644 index 0000000..f6454d4 --- /dev/null +++ b/docs/ABAPDoc/abapdoc/zibmc/interfaces/zif_ibmc_service_arch.html @@ -0,0 +1 @@ +Interface ZIF_IBMC_SERVICE_ARCH

Interface ZIF_IBMC_SERVICE_ARCH

public

Documentation

IBM Watson SDK Platform-specifics

Types

Visibility and LevelNameDocumentation
publicboolean (typing) 
publicchar (typing) 
publicts_access_token (structured type) 
publicts_form_part (structured type) 
publicts_header (structured type) 
publicts_http_status (structured type) 
publicts_request_prop (structured type) 
publicts_url (structured type) 
publictt_form_part TYPE standard table of TS_FORM_PART with non-unique default key 
publictt_header TYPE standard table of ts_header with non-unique default key 
publictt_string TYPE standard table of string with non-unique default key 
publicty_ssl_id (typing) 
publicty_timezone (typing) 

Constants

Visibility and LevelNameDocumentation
public staticc_datatype (structured type)  
public staticc_header_accept type STRING value 'Accept' 
public staticc_header_content_disposition type STRING value 'Content-Disposition' 
public staticc_header_content_type type STRING value 'Content-Type' 
public staticc_mediatype (structured type)  
public staticc_method_create type CHAR value 'c' 
public staticc_method_delete type CHAR value 'd' 
public staticc_method_get type CHAR value 'g' 
public staticc_method_post type CHAR value 'p' 
public staticc_method_put type CHAR value 'u' 
\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 5ca7b8b..023ae78 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,7 +6,7 @@

ABAP SDK for IBM Watson: API Reference


-
The ABAP SDK is used to consume IBM Watson cognitive services with the SAP Business Suite and S/4HANA.
+
The ABAP SDK is used to consume IBM Watson cognitive services with the SAP Business Suite, S/4HANA and the SAP Cloud ABAP Environment.
It wraps the IBM Watson service REST API into regular ABAP classes and delivers ABAP data types that exactly fit the IBM Watson interface.


The table below provides an overview on the supported IBM Watson services. Click the ABAP class name to navigate to the corresponding methods and data types reference. diff --git a/src/zcl_ibmc_assistant_v1.clas.abap b/src/zcl_ibmc_assistant_v1.clas.abap index ac37d14..12fa523 100644 --- a/src/zcl_ibmc_assistant_v1.clas.abap +++ b/src/zcl_ibmc_assistant_v1.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,8 +14,8 @@ "!

Watson Assistant v1

"! The IBM Watson™ Assistant service combines machine learning, natural "! language understanding, and an integrated dialog editor to create conversation -"! flows between your apps and your users. -"! +"! flows between your apps and your users.
+"!
"! The Assistant v1 API provides authoring methods your application can use to "! create or update a workspace.
class ZCL_IBMC_ASSISTANT_V1 DEFINITION @@ -25,985 +25,1952 @@ class ZCL_IBMC_ASSISTANT_V1 DEFINITION public section. types: - "! - begin of T_DIA_ND_OTPT_TEXT_VALUES_ELEM, - TEXT type STRING, - end of T_DIA_ND_OTPT_TEXT_VALUES_ELEM. - types: - "! A mention of a contextual entity. - begin of T_MENTION, - ENTITY type STRING, - LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, - end of T_MENTION. + "! Workspace settings related to detection of irrelevant input. + begin of T_WS_SYSTEM_SETTINGS_OFF_TOPIC, + "! Whether enhanced irrelevance detection is enabled for the workspace. + ENABLED type BOOLEAN, + end of T_WS_SYSTEM_SETTINGS_OFF_TOPIC. types: - "! - begin of T_EXAMPLE, - TEXT type STRING, - MENTIONS type STANDARD TABLE OF T_MENTION WITH NON-UNIQUE DEFAULT KEY, - CREATED type DATETIME, - UPDATED type DATETIME, - end of T_EXAMPLE. + "! No documentation available. + begin of T_RT_ENTITY_INTERPRETATION, + "! The calendar used to represent a recognized date (for example, `Gregorian`). + CALENDAR_TYPE type STRING, + "! A unique identifier used to associate a recognized time and date. If the user + "! input contains a date and time that are mentioned together (for example, `Today + "! at 5`, the same **datetime_link** value is returned for both the `@sys-date` + "! and `@sys-time` entities). + DATETIME_LINK type STRING, + "! A locale-specific holiday name (such as `thanksgiving` or `christmas`). This + "! property is included when a `@sys-date` entity is recognized based on a holiday + "! name in the user input. + FESTIVAL type STRING, + "! The precision or duration of a time range specified by a recognized `@sys-time` + "! or `@sys-date` entity. + GRANULARITY type STRING, + "! A unique identifier used to associate multiple recognized `@sys-date`, + "! `@sys-time`, or `@sys-number` entities that are recognized as a range of values + "! in the user's input (for example, `from July 4 until July 14` or `from 20 to + "! 25`). + RANGE_LINK type STRING, + "! The word in the user input that indicates that a `sys-date` or `sys-time` entity + "! is part of an implied range where only one date or time is specified (for + "! example, `since` or `until`). + RANGE_MODIFIER type STRING, + "! A recognized mention of a relative day, represented numerically as an offset + "! from the current date (for example, `-1` for `yesterday` or `10` for `in ten + "! days`). + RELATIVE_DAY type NUMBER, + "! A recognized mention of a relative month, represented numerically as an offset + "! from the current month (for example, `1` for `next month` or `-3` for `three + "! months ago`). + RELATIVE_MONTH type NUMBER, + "! A recognized mention of a relative week, represented numerically as an offset + "! from the current week (for example, `2` for `in two weeks` or `-1` for `last + "! week). + RELATIVE_WEEK type NUMBER, + "! A recognized mention of a relative date range for a weekend, represented + "! numerically as an offset from the current weekend (for example, `0` for `this + "! weekend` or `-1` for `last weekend`). + RELATIVE_WEEKEND type NUMBER, + "! A recognized mention of a relative year, represented numerically as an offset + "! from the current year (for example, `1` for `next year` or `-5` for `five years + "! ago`). + RELATIVE_YEAR type NUMBER, + "! A recognized mention of a specific date, represented numerically as the date + "! within the month (for example, `30` for `June 30`.). + SPECIFIC_DAY type NUMBER, + "! A recognized mention of a specific day of the week as a lowercase string (for + "! example, `monday`). + SPECIFIC_DAY_OF_WEEK type STRING, + "! A recognized mention of a specific month, represented numerically (for example, + "! `7` for `July`). + SPECIFIC_MONTH type NUMBER, + "! A recognized mention of a specific quarter, represented numerically (for + "! example, `3` for `the third quarter`). + SPECIFIC_QUARTER type NUMBER, + "! A recognized mention of a specific year (for example, `2016`). + SPECIFIC_YEAR type NUMBER, + "! A recognized numeric value, represented as an integer or double. + NUMERIC_VALUE type NUMBER, + "! The type of numeric value recognized in the user input (`integer` or + "! `rational`). + SUBTYPE type STRING, + "! A recognized term for a time that was mentioned as a part of the day in the + "! user's input (for example, `morning` or `afternoon`). + PART_OF_DAY type STRING, + "! A recognized mention of a relative hour, represented numerically as an offset + "! from the current hour (for example, `3` for `in three hours` or `-1` for `an + "! hour ago`). + RELATIVE_HOUR type NUMBER, + "! A recognized mention of a relative time, represented numerically as an offset in + "! minutes from the current time (for example, `5` for `in five minutes` or `-15` + "! for `fifteen minutes ago`). + RELATIVE_MINUTE type NUMBER, + "! A recognized mention of a relative time, represented numerically as an offset in + "! seconds from the current time (for example, `10` for `in ten seconds` or `-30` + "! for `thirty seconds ago`). + RELATIVE_SECOND type NUMBER, + "! A recognized specific hour mentioned as part of a time value (for example, `10` + "! for `10:15 AM`.). + SPECIFIC_HOUR type NUMBER, + "! A recognized specific minute mentioned as part of a time value (for example, + "! `15` for `10:15 AM`.). + SPECIFIC_MINUTE type NUMBER, + "! A recognized specific second mentioned as part of a time value (for example, + "! `30` for `10:15:30 AM`.). + SPECIFIC_SECOND type NUMBER, + "! A recognized time zone mentioned as part of a time value (for example, `EST`). + TIMEZONE type STRING, + end of T_RT_ENTITY_INTERPRETATION. types: - "! - begin of T_INTENT, - INTENT type STRING, - DESCRIPTION type STRING, - CREATED type DATETIME, - UPDATED type DATETIME, - EXAMPLES type STANDARD TABLE OF T_EXAMPLE WITH NON-UNIQUE DEFAULT KEY, - end of T_INTENT. + "! A key/value pair defining an HTTP header and a value. + begin of T_WEBHOOK_HEADER, + "! The name of an HTTP header (for example, `Authorization`). + NAME type STRING, + "! The value of an HTTP header. + VALUE type STRING, + end of T_WEBHOOK_HEADER. types: - "! + "! No documentation available. begin of T_DIALOG_NODE_ACTION, + "! The name of the action. NAME type STRING, + "! The type of action to invoke. TYPE type STRING, + "! A map of key/value pairs to be provided to the action. PARAMETERS type MAP, + "! The location in the dialog context where the result of the action is stored. RESULT_VARIABLE type STRING, + "! The name of the context variable that the client application will use to pass in + "! credentials for the action. CREDENTIALS type STRING, end of T_DIALOG_NODE_ACTION. types: - "! Workspace settings related to the disambiguation feature. - "! - "! **Note:** This feature is available only to Premium users. + "! Workspace settings related to the disambiguation feature.
+ "!
+ "! **Note:** This feature is available only to Plus and Premium users. begin of T_WS_SYSTM_STTNGS_DSMBGTN, + "! The text of the introductory prompt that accompanies disambiguation options + "! presented to the user. PROMPT type STRING, + "! The user-facing label for the option users can select if none of the suggested + "! options is correct. If no value is specified for this property, this option + "! does not appear. NONE_OF_THE_ABOVE_PROMPT type STRING, + "! Whether the disambiguation feature is enabled for the workspace. ENABLED type BOOLEAN, + "! The sensitivity of the disambiguation feature to intent detection conflicts. Set + "! to **high** if you want the disambiguation feature to be triggered more often. + "! This can be useful for testing or demonstration purposes. SENSITIVITY type STRING, + "! Whether the order in which disambiguation suggestions are presented should be + "! randomized (but still influenced by relative confidence). + RANDOMIZE type BOOLEAN, + "! The maximum number of disambigation suggestions that can be included in a + "! `suggestion` response. + MAX_SUGGESTIONS type INTEGER, + "! For internal use only. + SUGGESTION_TEXT_POLICY type STRING, end of T_WS_SYSTM_STTNGS_DSMBGTN. types: "! Options that modify how specified output is handled. begin of T_DIALOG_NODE_OUTPUT_MODIFIERS, + "! Whether values in the output will overwrite output values in an array specified + "! by previously executed dialog nodes. If this option is set to `false`, new + "! values will be appended to previously specified values. OVERWRITE type BOOLEAN, end of T_DIALOG_NODE_OUTPUT_MODIFIERS. types: "! The next step to execute following this dialog node. begin of T_DIALOG_NODE_NEXT_STEP, + "! What happens after the dialog node completes. The valid values depend on the + "! node type:
+ "! - The following values are valid for any node:
+ "! - `get_user_input`
+ "! - `skip_user_input`
+ "! - `jump_to`
+ "! - If the node is of type `event_handler` and its parent node is of type `slot` + "! or `frame`, additional values are also valid:
+ "! - if **event_name**=`filled` and the type of the parent node is `slot`:
+ "! - `reprompt`
+ "! - `skip_all_slots`
+ "! - if **event_name**=`nomatch` and the type of the parent node is `slot`:
+ "! - `reprompt`
+ "! - `skip_slot`
+ "! - `skip_all_slots`
+ "! - if **event_name**=`generic` and the type of the parent node is `frame`:
+ "! - `reprompt`
+ "! - `skip_slot`
+ "! - `skip_all_slots`
+ "! If you specify `jump_to`, then you must also specify a value for the + "! `dialog_node` property. BEHAVIOR type STRING, + "! The ID of the dialog node to process next. This parameter is required if + "! **behavior**=`jump_to`. DIALOG_NODE type STRING, + "! Which part of the dialog node to process next. SELECTOR type STRING, end of T_DIALOG_NODE_NEXT_STEP. types: "! An input object that includes the input text. begin of T_MESSAGE_INPUT, + "! The text of the user input. This string cannot contain carriage return, newline, + "! or tab characters. TEXT type STRING, end of T_MESSAGE_INPUT. types: "! A recognized capture group for a pattern-based entity. begin of T_CAPTURE_GROUP, + "! A recognized capture group for the entity. GROUP type STRING, + "! Zero-based character offsets that indicate where the entity value begins and + "! ends in the input text. LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, end of T_CAPTURE_GROUP. + types: + "! An object describing the role played by a system entity that is specifies the + "! beginning or end of a range recognized in the user input. This property is + "! included only if the new system entities are enabled for the workspace. + begin of T_RUNTIME_ENTITY_ROLE, + "! The relationship of the entity to the range. + TYPE type STRING, + end of T_RUNTIME_ENTITY_ROLE. types: "! A term from the request that was identified as an entity. begin of T_RUNTIME_ENTITY, + "! An entity detected in the input. ENTITY type STRING, + "! An array of zero-based character offsets that indicate where the detected entity + "! values begin and end in the input text. LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, + "! The entity value that was recognized in the user input. VALUE type STRING, + "! A decimal percentage that represents Watson's confidence in the recognized + "! entity. CONFIDENCE type NUMBER, + "! Any metadata for the entity. METADATA type MAP, + "! The recognized capture groups for the entity, as defined by the entity pattern. GROUPS type STANDARD TABLE OF T_CAPTURE_GROUP WITH NON-UNIQUE DEFAULT KEY, + "! An object containing detailed information about the entity recognized in the + "! user input. This property is included only if the new system entities are + "! enabled for the workspace.
+ "!
+ "! For more information about how the new system entities are interpreted, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-beta-syste + "! m-entities). + INTERPRETATION type T_RT_ENTITY_INTERPRETATION, + "! An object describing the role played by a system entity that is specifies the + "! beginning or end of a range recognized in the user input. This property is + "! included only if the new system entities are enabled for the workspace. + ROLE type T_RUNTIME_ENTITY_ROLE, end of T_RUNTIME_ENTITY. types: "! An intent identified in the user input. begin of T_RUNTIME_INTENT, + "! The name of the recognized intent. INTENT type STRING, + "! A decimal percentage that represents Watson's confidence in the intent. CONFIDENCE type DOUBLE, end of T_RUNTIME_INTENT. types: "! An object defining the message input to be sent to the Watson Assistant service "! if the user selects the corresponding option. begin of T_DIA_ND_OUTPUT_OPT_ELEM_VALUE, + "! An input object that includes the input text. INPUT type T_MESSAGE_INPUT, + "! An array of intents to be used while processing the input.
+ "!
+ "! **Note:** This property is supported for backward compatibility with + "! applications that use the v1 **Get response to user input** method. INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! An array of entities to be used while processing the user input.
+ "!
+ "! **Note:** This property is supported for backward compatibility with + "! applications that use the v1 **Get response to user input** method. ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, end of T_DIA_ND_OUTPUT_OPT_ELEM_VALUE. types: - "! + "! No documentation available. begin of T_DIA_NODE_OUTPUT_OPT_ELEMENT, + "! The user-facing label for the option. LABEL type STRING, + "! An object defining the message input to be sent to the Watson Assistant service + "! if the user selects the corresponding option. VALUE type T_DIA_ND_OUTPUT_OPT_ELEM_VALUE, end of T_DIA_NODE_OUTPUT_OPT_ELEMENT. types: - "! + "! No documentation available. + begin of T_DIA_ND_OTPT_TEXT_VALUES_ELEM, + "! The text of a response. This string can include newline characters (`\n`), + "! Markdown tagging, or other special characters, if supported by the channel. + TEXT type STRING, + end of T_DIA_ND_OTPT_TEXT_VALUES_ELEM. + types: + "! No documentation available. begin of T_DIALOG_NODE_OUTPUT_GENERIC, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel.
+ "!
+ "! **Note:** The **search_skill** response type is available only for Plus and + "! Premium users, and is used only by the v2 runtime API. RESPONSE_TYPE type STRING, + "! A list of one or more objects defining text responses. Required when + "! **response_type**=`text`. VALUES type STANDARD TABLE OF T_DIA_ND_OTPT_TEXT_VALUES_ELEM WITH NON-UNIQUE DEFAULT KEY, + "! How a response is selected from the list, if more than one response is + "! specified. Valid only when **response_type**=`text`. SELECTION_POLICY type STRING, + "! The delimiter to use as a separator between responses when + "! `selection_policy`=`multiline`. DELIMITER type STRING, + "! How long to pause, in milliseconds. The valid values are from 0 to 10000. Valid + "! only when **response_type**=`pause`. TIME type INTEGER, + "! Whether to send a "user is typing" event during the pause. Ignored if the + "! channel does not support this event. Valid only when **response_type**=`pause`. + "! TYPING type BOOLEAN, + "! The URL of the image. Required when **response_type**=`image`. SOURCE type STRING, + "! An optional title to show before the response. Valid only when + "! **response_type**=`image` or `option`. TITLE type STRING, + "! An optional description to show with the response. Valid only when + "! **response_type**=`image` or `option`. DESCRIPTION type STRING, + "! The preferred type of control to display, if supported by the channel. Valid + "! only when **response_type**=`option`. PREFERENCE type STRING, + "! An array of objects describing the options from which the user can choose. You + "! can include up to 20 options. Required when **response_type**=`option`. OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, + "! An optional message to be sent to the human agent who will be taking over the + "! conversation. Valid only when **reponse_type**=`connect_to_agent`. MESSAGE_TO_HUMAN_AGENT type STRING, + "! The text of the search query. This can be either a natural-language query or a + "! query that uses the Discovery query language syntax, depending on the value of + "! the **query_type** property. For more information, see the [Discovery service + "! documentation](https://cloud.ibm.com/docs/services/discovery/query-operators.ht + "! ml#query-operators). Required when **response_type**=`search_skill`. QUERY type STRING, + "! The type of the search query. Required when **response_type**=`search_skill`. QUERY_TYPE type STRING, + "! An optional filter that narrows the set of documents to be searched. For more + "! information, see the [Discovery service documentation]([Discovery service + "! documentation](https://cloud.ibm.com/docs/services/discovery/query-parameters.h + "! tml#filter). FILTER type STRING, + "! The version of the Discovery service API to use for the query. DISCOVERY_VERSION type STRING, end of T_DIALOG_NODE_OUTPUT_GENERIC. types: "! The output of the dialog node. For more information about how to specify dialog "! node output, see the - "! [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-d - "! ialog-overview#dialog-overview-responses). + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-ove + "! rview#dialog-overview-responses). begin of T_DIALOG_NODE_OUTPUT, + "! An array of objects describing the output defined for the dialog node. GENERIC type STANDARD TABLE OF T_DIALOG_NODE_OUTPUT_GENERIC WITH NON-UNIQUE DEFAULT KEY, + "! Options that modify how specified output is handled. MODIFIERS type T_DIALOG_NODE_OUTPUT_MODIFIERS, end of T_DIALOG_NODE_OUTPUT. types: - "! Workspace settings related to the Watson Assistant user interface. - begin of T_WS_SYSTEM_SETTINGS_TOOLING, - STORE_GENERIC_RESPONSES type BOOLEAN, - end of T_WS_SYSTEM_SETTINGS_TOOLING. - types: - "! Global settings for the workspace. - begin of T_WORKSPACE_SYSTEM_SETTINGS, - TOOLING type T_WS_SYSTEM_SETTINGS_TOOLING, - DISAMBIGUATION type T_WS_SYSTM_STTNGS_DSMBGTN, - HUMAN_AGENT_ASSIST type MAP, - end of T_WORKSPACE_SYSTEM_SETTINGS. - types: - "! + "! No documentation available. begin of T_DIALOG_NODE, + "! The dialog node ID. This string must conform to the following restrictions:
+ "! - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot + "! characters. DIALOG_NODE type STRING, + "! The description of the dialog node. This string cannot contain carriage return, + "! newline, or tab characters. DESCRIPTION type STRING, + "! The condition that will trigger the dialog node. This string cannot contain + "! carriage return, newline, or tab characters. CONDITIONS type STRING, + "! The ID of the parent dialog node. This property is omitted if the dialog node + "! has no parent. PARENT type STRING, + "! The ID of the previous sibling dialog node. This property is omitted if the + "! dialog node has no previous sibling. PREVIOUS_SIBLING type STRING, + "! The output of the dialog node. For more information about how to specify dialog + "! node output, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-ove + "! rview#dialog-overview-responses). OUTPUT type T_DIALOG_NODE_OUTPUT, + "! The context for the dialog node. CONTEXT type MAP, + "! The metadata for the dialog node. METADATA type MAP, + "! The next step to execute following this dialog node. NEXT_STEP type T_DIALOG_NODE_NEXT_STEP, + "! The alias used to identify the dialog node. This string must conform to the + "! following restrictions:
+ "! - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot + "! characters. TITLE type STRING, + "! How the dialog node is processed. TYPE type STRING, + "! How an `event_handler` node is processed. EVENT_NAME type STRING, + "! The location in the dialog context where output is stored. VARIABLE type STRING, + "! An array of objects describing any actions to be invoked by the dialog node. ACTIONS type STANDARD TABLE OF T_DIALOG_NODE_ACTION WITH NON-UNIQUE DEFAULT KEY, + "! Whether this top-level dialog node can be digressed into. DIGRESS_IN type STRING, + "! Whether this dialog node can be returned to after a digression. DIGRESS_OUT type STRING, + "! Whether the user can digress to top-level nodes while filling out slots. DIGRESS_OUT_SLOTS type STRING, + "! A label that can be displayed externally to describe the purpose of the node to + "! users. USER_LABEL type STRING, + "! Whether the dialog node should be excluded from disambiguation suggestions. + DISAMBIGUATION_OPT_OUT type BOOLEAN, + "! For internal use only. DISABLED type BOOLEAN, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_DIALOG_NODE. types: - "! + "! No documentation available. begin of T_VALUE, + "! The text of the entity value. This string must conform to the following + "! restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. VALUE type STRING, + "! Any metadata related to the entity value. METADATA type MAP, + "! Specifies the type of entity value. TYPE type STRING, + "! An array of synonyms for the entity value. A value can specify either synonyms + "! or patterns (depending on the value type), but not both. A synonym must conform + "! to the following resrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. SYNONYMS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array of patterns for the entity value. A value can specify either synonyms + "! or patterns (depending on the value type), but not both. A pattern is a regular + "! expression; for more information about how to specify a pattern, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#e + "! ntities-create-dictionary-based). PATTERNS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_VALUE. types: - "! + "! A webhook that can be used by dialog nodes to make programmatic calls to an + "! external function.
+ "!
+ "! **Note:** Currently, only a single webhook named `main_webhook` is supported. + begin of T_WEBHOOK, + "! The URL for the external service or application to which you want to send HTTP + "! POST requests. + URL type STRING, + "! The name of the webhook. Currently, `main_webhook` is the only supported value. + NAME type STRING, + "! An optional array of HTTP headers to pass with the HTTP request. + HEADERS type STANDARD TABLE OF T_WEBHOOK_HEADER WITH NON-UNIQUE DEFAULT KEY, + end of T_WEBHOOK. + types: + "! Workspace settings related to the behavior of system entities. + begin of T_WS_SYSTM_STTNGS_SYSTM_ENTTS, + "! Whether the new system entities are enabled for the workspace. + ENABLED type BOOLEAN, + end of T_WS_SYSTM_STTNGS_SYSTM_ENTTS. + types: + "! A mention of a contextual entity. + begin of T_MENTION, + "! The name of the entity. + ENTITY type STRING, + "! An array of zero-based character offsets that indicate where the entity mentions + "! begin and end in the input text. + LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, + end of T_MENTION. + types: + "! No documentation available. + begin of T_EXAMPLE, + "! The text of a user input example. This string must conform to the following + "! restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. + TEXT type STRING, + "! An array of contextual entity mentions. + MENTIONS type STANDARD TABLE OF T_MENTION WITH NON-UNIQUE DEFAULT KEY, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + end of T_EXAMPLE. + types: + "! No documentation available. + begin of T_INTENT, + "! The name of the intent. This string must conform to the following + "! restrictions:
+ "! - It can contain only Unicode alphanumeric, underscore, hyphen, and dot + "! characters.
+ "! - It cannot begin with the reserved prefix `sys-`. + INTENT type STRING, + "! The description of the intent. This string cannot contain carriage return, + "! newline, or tab characters. + DESCRIPTION type STRING, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + "! An array of user input examples for the intent. + EXAMPLES type STANDARD TABLE OF T_EXAMPLE WITH NON-UNIQUE DEFAULT KEY, + end of T_INTENT. + types: + "! Workspace settings related to the Watson Assistant user interface. + begin of T_WS_SYSTEM_SETTINGS_TOOLING, + "! Whether the dialog JSON editor displays text responses within the + "! `output.generic` object. + STORE_GENERIC_RESPONSES type BOOLEAN, + end of T_WS_SYSTEM_SETTINGS_TOOLING. + types: + "! Global settings for the workspace. + begin of T_WORKSPACE_SYSTEM_SETTINGS, + "! Workspace settings related to the Watson Assistant user interface. + TOOLING type T_WS_SYSTEM_SETTINGS_TOOLING, + "! Workspace settings related to the disambiguation feature.
+ "!
+ "! **Note:** This feature is available only to Plus and Premium users. + DISAMBIGUATION type T_WS_SYSTM_STTNGS_DSMBGTN, + "! For internal use only. + HUMAN_AGENT_ASSIST type MAP, + "! Workspace settings related to the behavior of system entities. + SYSTEM_ENTITIES type T_WS_SYSTM_STTNGS_SYSTM_ENTTS, + "! Workspace settings related to detection of irrelevant input. + OFF_TOPIC type T_WS_SYSTEM_SETTINGS_OFF_TOPIC, + end of T_WORKSPACE_SYSTEM_SETTINGS. + types: + "! No documentation available. begin of T_COUNTEREXAMPLE, + "! The text of a user input marked as irrelevant input. This string must conform to + "! the following restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. TEXT type STRING, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_COUNTEREXAMPLE. types: - "! + "! No documentation available. begin of T_ENTITY, + "! The name of the entity. This string must conform to the following + "! restrictions:
+ "! - It can contain only Unicode alphanumeric, underscore, and hyphen + "! characters.
+ "! - If you specify an entity name beginning with the reserved prefix `sys-`, it + "! must be the name of a system entity that you want to enable. (Any entity + "! content specified with the request is ignored.). ENTITY type STRING, + "! The description of the entity. This string cannot contain carriage return, + "! newline, or tab characters. DESCRIPTION type STRING, + "! Any metadata related to the entity. METADATA type MAP, + "! Whether to use fuzzy matching for the entity. FUZZY_MATCH type BOOLEAN, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, + "! An array of objects describing the entity values. VALUES type STANDARD TABLE OF T_VALUE WITH NON-UNIQUE DEFAULT KEY, end of T_ENTITY. types: - "! + "! No documentation available. begin of T_WORKSPACE, + "! The name of the workspace. This string cannot contain carriage return, newline, + "! or tab characters. NAME type STRING, + "! The description of the workspace. This string cannot contain carriage return, + "! newline, or tab characters. DESCRIPTION type STRING, + "! The language of the workspace. LANGUAGE type STRING, + "! Any metadata related to the workspace. METADATA type MAP, + "! Whether training data from the workspace (including artifacts such as intents + "! and entities) can be used by IBM for general service improvements. `true` + "! indicates that workspace training data is not to be used. LEARNING_OPT_OUT type BOOLEAN, + "! Global settings for the workspace. SYSTEM_SETTINGS type T_WORKSPACE_SYSTEM_SETTINGS, + "! The workspace ID of the workspace. WORKSPACE_ID type STRING, + "! The current status of the workspace. STATUS type STRING, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, + "! An array of intents. INTENTS type STANDARD TABLE OF T_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects describing the entities for the workspace. ENTITIES type STANDARD TABLE OF T_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects describing the dialog nodes in the workspace. DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, + "! An array of counterexamples. COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, + "! No documentation available. + WEBHOOKS type STANDARD TABLE OF T_WEBHOOK WITH NON-UNIQUE DEFAULT KEY, end of T_WORKSPACE. types: - "! - begin of T_RT_ENTTY_INTRPRTTN_SYS_NUM, - NUMERIC_VALUE type NUMBER, - RANGE_LINK type STRING, - SUBTYPE type STRING, - end of T_RT_ENTTY_INTRPRTTN_SYS_NUM. - types: - "! - begin of T_UPDATE_COUNTEREXAMPLE, - TEXT type STRING, - CREATED type DATETIME, - UPDATED type DATETIME, - end of T_UPDATE_COUNTEREXAMPLE. - types: - "! + "! No documentation available. begin of T_SYNONYM, + "! The text of the synonym. This string must conform to the following + "! restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. SYNONYM type STRING, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_SYNONYM. types: "! The pagination data for the returned objects. begin of T_PAGINATION, + "! The URL that will return the same page of results. REFRESH_URL type STRING, + "! The URL that will return the next page of results. NEXT_URL type STRING, + "! Reserved for future use. TOTAL type INTEGER, + "! Reserved for future use. MATCHED type INTEGER, + "! A token identifying the current page of results. REFRESH_CURSOR type STRING, + "! A token identifying the next page of results. NEXT_CURSOR type STRING, end of T_PAGINATION. types: - "! + "! No documentation available. begin of T_SYNONYM_COLLECTION, + "! An array of synonyms. SYNONYMS type STANDARD TABLE OF T_SYNONYM WITH NON-UNIQUE DEFAULT KEY, + "! The pagination data for the returned objects. PAGINATION type T_PAGINATION, end of T_SYNONYM_COLLECTION. types: - "! + "! No documentation available. begin of T_RUNTIME_RESPONSE_TYPE_OPTION, + "! The title or introductory text to show before the response. TITLE type STRING, + "! The description to show with the the response. DESCRIPTION type STRING, + "! The preferred type of control to display. PREFERENCE type STRING, + "! An array of objects describing the options from which the user can choose. OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, end of T_RUNTIME_RESPONSE_TYPE_OPTION. types: - "! Log message details. - begin of T_LOG_MESSAGE, - LEVEL type STRING, - MSG type STRING, - end of T_LOG_MESSAGE. - types: - "! An array of objects describing the entities for the workspace. - begin of T_ENTITY_COLLECTION, - ENTITIES type STANDARD TABLE OF T_ENTITY WITH NON-UNIQUE DEFAULT KEY, - PAGINATION type T_PAGINATION, - end of T_ENTITY_COLLECTION. - types: - "! + "! No documentation available. begin of T_DIA_ND_OUTPUT_RESP_TYPE_TEXT, + "! A list of one or more objects defining text responses. Required when + "! **response_type**=`text`. VALUES type STANDARD TABLE OF T_DIA_ND_OTPT_TEXT_VALUES_ELEM WITH NON-UNIQUE DEFAULT KEY, + "! How a response is selected from the list, if more than one response is + "! specified. Valid only when **response_type**=`text`. SELECTION_POLICY type STRING, + "! The delimiter to use as a separator between responses when + "! `selection_policy`=`multiline`. DELIMITER type STRING, end of T_DIA_ND_OUTPUT_RESP_TYPE_TEXT. types: - "! - begin of T_INTENT_COLLECTION, - INTENTS type STANDARD TABLE OF T_INTENT WITH NON-UNIQUE DEFAULT KEY, - PAGINATION type T_PAGINATION, - end of T_INTENT_COLLECTION. - types: - "! - begin of T_DIA_ND_OTPT_RESP_TYPE_PAUSE, - TIME type INTEGER, - TYPING type BOOLEAN, - end of T_DIA_ND_OTPT_RESP_TYPE_PAUSE. - types: - "! + "! No documentation available. begin of T_BASE_WORKSPACE, + "! The name of the workspace. This string cannot contain carriage return, newline, + "! or tab characters. NAME type STRING, + "! The description of the workspace. This string cannot contain carriage return, + "! newline, or tab characters. DESCRIPTION type STRING, + "! The language of the workspace. LANGUAGE type STRING, + "! Any metadata related to the workspace. METADATA type MAP, + "! Whether training data from the workspace (including artifacts such as intents + "! and entities) can be used by IBM for general service improvements. `true` + "! indicates that workspace training data is not to be used. LEARNING_OPT_OUT type BOOLEAN, + "! Global settings for the workspace. SYSTEM_SETTINGS type T_WORKSPACE_SYSTEM_SETTINGS, + "! The workspace ID of the workspace. WORKSPACE_ID type STRING, + "! The current status of the workspace. STATUS type STRING, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_BASE_WORKSPACE. types: - "! - begin of T_DIA_SUGGESTION_RESP_GENERIC, - RESPONSE_TYPE type STRING, - TEXT type STRING, - TIME type INTEGER, - TYPING type BOOLEAN, - SOURCE type STRING, - TITLE type STRING, - DESCRIPTION type STRING, - PREFERENCE type STRING, - OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, - MESSAGE_TO_HUMAN_AGENT type STRING, - TOPIC type STRING, - DIALOG_NODE type STRING, - end of T_DIA_SUGGESTION_RESP_GENERIC. - types: - "! - begin of T_DIA_ND_OUTPUT_RESP_TYPE_IMG, - SOURCE type STRING, - TITLE type STRING, + "! No documentation available. + begin of T_BASE_ENTITY, + "! The name of the entity. This string must conform to the following + "! restrictions:
+ "! - It can contain only Unicode alphanumeric, underscore, and hyphen + "! characters.
+ "! - It cannot begin with the reserved prefix `sys-`. + ENTITY type STRING, + "! The description of the entity. This string cannot contain carriage return, + "! newline, or tab characters. DESCRIPTION type STRING, - end of T_DIA_ND_OUTPUT_RESP_TYPE_IMG. - types: - "! - begin of T_ERROR_DETAIL, - MESSAGE type STRING, - PATH type STRING, - end of T_ERROR_DETAIL. - types: - "! - begin of T_ERROR_RESPONSE, - ERROR type STRING, - ERRORS type STANDARD TABLE OF T_ERROR_DETAIL WITH NON-UNIQUE DEFAULT KEY, - CODE type INTEGER, - end of T_ERROR_RESPONSE. + "! Any metadata related to the entity. + METADATA type MAP, + "! Whether to use fuzzy matching for the entity. + FUZZY_MATCH type BOOLEAN, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + end of T_BASE_ENTITY. types: - "! Workspace settings related to the behavior of system entities. - begin of T_WS_SYSTM_STTNGS_SYSTM_ENTTS, - ENABLED type BOOLEAN, - end of T_WS_SYSTM_STTNGS_SYSTM_ENTTS. + "! No documentation available. + begin of T_RUNTIME_RESPONSE_TYPE_TEXT, + "! The text of the response. + TEXT type STRING, + end of T_RUNTIME_RESPONSE_TYPE_TEXT. types: - "! - begin of T_RT_ENTITY_INTERPRETATION, - CALENDAR_TYPE type STRING, + "! No documentation available. + begin of T_RT_ENTTY_INTRPRTTN_SYS_TIME, + "! A unique identifier used to associate a recognized time and date. If the user + "! input contains a date and time that are mentioned together (for example, `Today + "! at 5`, the same **datetime_link** value is returned for both the `@sys-date` + "! and `@sys-time` entities). DATETIME_LINK type STRING, - FESTIVAL type STRING, + "! The precision or duration of a time range specified by a recognized `@sys-time` + "! or `@sys-date` entity. GRANULARITY type STRING, - RANGE_LINK type STRING, - RANGE_MODIFIER type STRING, - RELATIVE_DAY type NUMBER, - RELATIVE_MONTH type NUMBER, - RELATIVE_WEEK type NUMBER, - RELATIVE_WEEKEND type NUMBER, - RELATIVE_YEAR type NUMBER, - SPECIFIC_DAY type NUMBER, - SPECIFIC_DAY_OF_WEEK type STRING, - SPECIFIC_MONTH type NUMBER, - SPECIFIC_QUARTER type NUMBER, - SPECIFIC_YEAR type NUMBER, - NUMERIC_VALUE type NUMBER, - SUBTYPE type STRING, + "! A recognized term for a time that was mentioned as a part of the day in the + "! user's input (for example, `morning` or `afternoon`). PART_OF_DAY type STRING, + "! A unique identifier used to associate multiple recognized `@sys-date`, + "! `@sys-time`, or `@sys-number` entities that are recognized as a range of values + "! in the user's input (for example, `from July 4 until July 14` or `from 20 to + "! 25`). + RANGE_LINK type STRING, + "! A recognized mention of a relative hour, represented numerically as an offset + "! from the current hour (for example, `3` for `in three hours` or `-1` for `an + "! hour ago`). RELATIVE_HOUR type NUMBER, + "! A recognized mention of a relative time, represented numerically as an offset in + "! minutes from the current time (for example, `5` for `in five minutes` or `-15` + "! for `fifteen minutes ago`). RELATIVE_MINUTE type NUMBER, + "! A recognized mention of a relative time, represented numerically as an offset in + "! seconds from the current time (for example, `10` for `in ten seconds` or `-30` + "! for `thirty seconds ago`). RELATIVE_SECOND type NUMBER, + "! A recognized specific hour mentioned as part of a time value (for example, `10` + "! for `10:15 AM`.). SPECIFIC_HOUR type NUMBER, + "! A recognized specific minute mentioned as part of a time value (for example, + "! `15` for `10:15 AM`.). SPECIFIC_MINUTE type NUMBER, + "! A recognized specific second mentioned as part of a time value (for example, + "! `30` for `10:15:30 AM`.). SPECIFIC_SECOND type NUMBER, + "! A recognized time zone mentioned as part of a time value (for example, `EST`). TIMEZONE type STRING, - end of T_RT_ENTITY_INTERPRETATION. + end of T_RT_ENTTY_INTRPRTTN_SYS_TIME. types: - "! An object defining the message input, intents, and entities to be sent to the - "! Watson Assistant service if the user selects the corresponding disambiguation - "! option. - begin of T_DIALOG_SUGGESTION_VALUE, - INPUT type T_MESSAGE_INPUT, - INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, - ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, - end of T_DIALOG_SUGGESTION_VALUE. + "! No documentation available. + begin of T_UPDATE_EXAMPLE, + "! The text of the user input example. This string must conform to the following + "! restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. + TEXT type STRING, + "! An array of contextual entity mentions. + MENTIONS type STANDARD TABLE OF T_MENTION WITH NON-UNIQUE DEFAULT KEY, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + end of T_UPDATE_EXAMPLE. types: - "! - begin of T_DIALOG_NODE_VISITED_DETAILS, - DIALOG_NODE type STRING, + "! An object describing a contextual entity mention. + begin of T_ENTITY_MENTION, + "! The text of the user input example. + TEXT type STRING, + "! The name of the intent. + INTENT type STRING, + "! An array of zero-based character offsets that indicate where the entity mentions + "! begin and end in the input text. + LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, + end of T_ENTITY_MENTION. + types: + "! No documentation available. + begin of T_DIA_ND_OTPT_RESP_TYP_SRCH_S1, + "! The text of the search query. This can be either a natural-language query or a + "! query that uses the Discovery query language syntax, depending on the value of + "! the **query_type** property. For more information, see the [Discovery service + "! documentation](https://cloud.ibm.com/docs/services/discovery/query-operators.ht + "! ml#query-operators). Required when **response_type**=`search_skill`. + QUERY type STRING, + "! The type of the search query. Required when **response_type**=`search_skill`. + QUERY_TYPE type STRING, + "! An optional filter that narrows the set of documents to be searched. For more + "! information, see the [Discovery service documentation]([Discovery service + "! documentation](https://cloud.ibm.com/docs/services/discovery/query-parameters.h + "! tml#filter). + FILTER type STRING, + "! The version of the Discovery service API to use for the query. + DISCOVERY_VERSION type STRING, + end of T_DIA_ND_OTPT_RESP_TYP_SRCH_S1. + types: + "! No documentation available. + begin of T_EXAMPLE_COLLECTION, + "! An array of objects describing the examples defined for the intent. + EXAMPLES type STANDARD TABLE OF T_EXAMPLE WITH NON-UNIQUE DEFAULT KEY, + "! The pagination data for the returned objects. + PAGINATION type T_PAGINATION, + end of T_EXAMPLE_COLLECTION. + types: + "! The pagination data for the returned objects. + begin of T_LOG_PAGINATION, + "! The URL that will return the next page of results, if any. + NEXT_URL type STRING, + "! Reserved for future use. + MATCHED type INTEGER, + "! A token identifying the next page of results. + NEXT_CURSOR type STRING, + end of T_LOG_PAGINATION. + types: + "! No documentation available. + begin of T_RT_RESP_TYP_CONNECT_TO_AGENT, + "! A message to be sent to the human agent who will be taking over the + "! conversation. + MESSAGE_TO_HUMAN_AGENT type STRING, + "! A label identifying the topic of the conversation, derived from the + "! **user_label** property of the relevant node. + TOPIC type STRING, + "! The ID of the dialog node that the **topic** property is taken from. The + "! **topic** property is populated using the value of the dialog node's + "! **user_label** property. + DIALOG_NODE type STRING, + end of T_RT_RESP_TYP_CONNECT_TO_AGENT. + types: + "! No documentation available. + begin of T_CREATE_VALUE, + "! The text of the entity value. This string must conform to the following + "! restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. + VALUE type STRING, + "! Any metadata related to the entity value. + METADATA type MAP, + "! Specifies the type of entity value. + TYPE type STRING, + "! An array of synonyms for the entity value. A value can specify either synonyms + "! or patterns (depending on the value type), but not both. A synonym must conform + "! to the following resrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. + SYNONYMS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array of patterns for the entity value. A value can specify either synonyms + "! or patterns (depending on the value type), but not both. A pattern is a regular + "! expression; for more information about how to specify a pattern, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#e + "! ntities-create-dictionary-based). + PATTERNS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + end of T_CREATE_VALUE. + types: + "! No documentation available. + begin of T_DIALOG_NODE_VISITED_DETAILS, + "! A dialog node that was triggered during processing of the input message. + DIALOG_NODE type STRING, + "! The title of the dialog node. TITLE type STRING, + "! The conditions that trigger the dialog node. CONDITIONS type STRING, end of T_DIALOG_NODE_VISITED_DETAILS. + types: + "! No documentation available. + begin of T_DIA_SUGGESTION_RESP_GENERIC, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel.
+ "!
+ "! **Note:** The **suggestion** response type is part of the disambiguation + "! feature, which is only available for Plus and Premium users. The + "! **search_skill** response type is available only for Plus and Premium users, + "! and is used only by the v2 runtime API. + RESPONSE_TYPE type STRING, + "! The text of the response. + TEXT type STRING, + "! How long to pause, in milliseconds. + TIME type INTEGER, + "! Whether to send a "user is typing" event during the pause. + TYPING type BOOLEAN, + "! The URL of the image. + SOURCE type STRING, + "! The title or introductory text to show before the response. + TITLE type STRING, + "! The description to show with the the response. + DESCRIPTION type STRING, + "! The preferred type of control to display. + PREFERENCE type STRING, + "! An array of objects describing the options from which the user can choose. + OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, + "! A message to be sent to the human agent who will be taking over the + "! conversation. + MESSAGE_TO_HUMAN_AGENT type STRING, + "! A label identifying the topic of the conversation, derived from the + "! **user_label** property of the relevant node. + TOPIC type STRING, + "! The ID of the dialog node that the **topic** property is taken from. The + "! **topic** property is populated using the value of the dialog node's + "! **user_label** property. + DIALOG_NODE type STRING, + end of T_DIA_SUGGESTION_RESP_GENERIC. + types: + "! An object defining the message input, intents, and entities to be sent to the + "! Watson Assistant service if the user selects the corresponding disambiguation + "! option. + begin of T_DIALOG_SUGGESTION_VALUE, + "! An input object that includes the input text. + INPUT type T_MESSAGE_INPUT, + "! An array of intents to be sent along with the user input. + INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! An array of entities to be sent along with the user input. + ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, + end of T_DIALOG_SUGGESTION_VALUE. types: "! The dialog output that will be returned from the Watson Assistant service if the "! user selects the corresponding option. begin of T_DIALOG_SUGGESTION_OUTPUT, + "! An array of the nodes that were triggered to create the response, in the order + "! in which they were visited. This information is useful for debugging and for + "! tracing the path taken through the node tree. NODES_VISITED type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects containing detailed diagnostic information about the nodes + "! that were triggered during processing of the input message. Included only if + "! **nodes_visited_details** is set to `true` in the message request. NODES_VISITED_DETAILS type STANDARD TABLE OF T_DIALOG_NODE_VISITED_DETAILS WITH NON-UNIQUE DEFAULT KEY, + "! An array of responses to the user. TEXT type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! Output intended for any channel. It is the responsibility of the client + "! application to implement the supported response types. GENERIC type STANDARD TABLE OF T_DIA_SUGGESTION_RESP_GENERIC WITH NON-UNIQUE DEFAULT KEY, end of T_DIALOG_SUGGESTION_OUTPUT. types: - "! - begin of T_BASE_ENTITY, - ENTITY type STRING, - DESCRIPTION type STRING, + "! No documentation available. + begin of T_DIALOG_SUGGESTION, + "! The user-facing label for the disambiguation option. This label is taken from + "! the **title** or **user_label** property of the corresponding dialog node, + "! depending on the disambiguation options. + LABEL type STRING, + "! An object defining the message input, intents, and entities to be sent to the + "! Watson Assistant service if the user selects the corresponding disambiguation + "! option. + VALUE type T_DIALOG_SUGGESTION_VALUE, + "! The dialog output that will be returned from the Watson Assistant service if the + "! user selects the corresponding option. + OUTPUT type T_DIALOG_SUGGESTION_OUTPUT, + "! The ID of the dialog node that the **label** property is taken from. The + "! **label** property is populated using the value of the dialog node's + "! **user_label** property. + DIALOG_NODE type STRING, + end of T_DIALOG_SUGGESTION. + types: + "! No documentation available. + T_EMPTY_RESPONSE type JSONOBJECT. + types: + "! No documentation available. + begin of T_UPDATE_VALUE, + "! The text of the entity value. This string must conform to the following + "! restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. + VALUE type STRING, + "! Any metadata related to the entity value. METADATA type MAP, - FUZZY_MATCH type BOOLEAN, + "! Specifies the type of entity value. + TYPE type STRING, + "! An array of synonyms for the entity value. A value can specify either synonyms + "! or patterns (depending on the value type), but not both. A synonym must conform + "! to the following resrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. + SYNONYMS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array of patterns for the entity value. A value can specify either synonyms + "! or patterns (depending on the value type), but not both. A pattern is a regular + "! expression; for more information about how to specify a pattern, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#e + "! ntities-create-dictionary-based). + PATTERNS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, - end of T_BASE_ENTITY. + end of T_UPDATE_VALUE. types: - "! - begin of T_RUNTIME_RESPONSE_TYPE_TEXT, + "! An alternative value for the recognized entity. + begin of T_RUNTIME_ENTITY_ALTERNATIVE, + "! The entity value that was recognized in the user input. + VALUE type STRING, + "! A decimal percentage that represents Watson's confidence in the recognized + "! entity. + CONFIDENCE type NUMBER, + end of T_RUNTIME_ENTITY_ALTERNATIVE. + types: + "! No documentation available. + begin of T_UPDATE_INTENT, + "! The name of the intent. This string must conform to the following + "! restrictions:
+ "! - It can contain only Unicode alphanumeric, underscore, hyphen, and dot + "! characters.
+ "! - It cannot begin with the reserved prefix `sys-`. + INTENT type STRING, + "! The description of the intent. This string cannot contain carriage return, + "! newline, or tab characters. + DESCRIPTION type STRING, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + "! An array of user input examples for the intent. + EXAMPLES type STANDARD TABLE OF T_EXAMPLE WITH NON-UNIQUE DEFAULT KEY, + end of T_UPDATE_INTENT. + types: + "! No documentation available. + begin of T_VALUE_COLLECTION, + "! An array of entity values. + VALUES type STANDARD TABLE OF T_VALUE WITH NON-UNIQUE DEFAULT KEY, + "! The pagination data for the returned objects. + PAGINATION type T_PAGINATION, + end of T_VALUE_COLLECTION. + types: + "! Log message details. + begin of T_LOG_MESSAGE, + "! The severity of the log message. + LEVEL type STRING, + "! The text of the log message. + MSG type STRING, + end of T_LOG_MESSAGE. + types: + "! No documentation available. + begin of T_RUNTIME_RESPONSE_GENERIC, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel.
+ "!
+ "! **Note:** The **suggestion** response type is part of the disambiguation + "! feature, which is only available for Plus and Premium users. + RESPONSE_TYPE type STRING, + "! The text of the response. TEXT type STRING, - end of T_RUNTIME_RESPONSE_TYPE_TEXT. + "! How long to pause, in milliseconds. + TIME type INTEGER, + "! Whether to send a "user is typing" event during the pause. + TYPING type BOOLEAN, + "! The URL of the image. + SOURCE type STRING, + "! The title or introductory text to show before the response. + TITLE type STRING, + "! The description to show with the the response. + DESCRIPTION type STRING, + "! The preferred type of control to display. + PREFERENCE type STRING, + "! An array of objects describing the options from which the user can choose. + OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, + "! A message to be sent to the human agent who will be taking over the + "! conversation. + MESSAGE_TO_HUMAN_AGENT type STRING, + "! A label identifying the topic of the conversation, derived from the + "! **user_label** property of the relevant node. + TOPIC type STRING, + "! The ID of the dialog node that the **topic** property is taken from. The + "! **topic** property is populated using the value of the dialog node's + "! **user_label** property. + DIALOG_NODE type STRING, + "! An array of objects describing the possible matching dialog nodes from which the + "! user can choose.
+ "!
+ "! **Note:** The **suggestions** property is part of the disambiguation feature, + "! which is only available for Plus and Premium users. + SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, + end of T_RUNTIME_RESPONSE_GENERIC. + types: + "! An output object that includes the response to the user, the dialog nodes that + "! were triggered, and messages from the log. + begin of T_OUTPUT_DATA, + "! An array of the nodes that were triggered to create the response, in the order + "! in which they were visited. This information is useful for debugging and for + "! tracing the path taken through the node tree. + NODES_VISITED type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects containing detailed diagnostic information about the nodes + "! that were triggered during processing of the input message. Included only if + "! **nodes_visited_details** is set to `true` in the message request. + NODES_VISITED_DETAILS type STANDARD TABLE OF T_DIALOG_NODE_VISITED_DETAILS WITH NON-UNIQUE DEFAULT KEY, + "! An array of up to 50 messages logged with the request. + LOG_MESSAGES type STANDARD TABLE OF T_LOG_MESSAGE WITH NON-UNIQUE DEFAULT KEY, + "! An array of responses to the user. + TEXT type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! Output intended for any channel. It is the responsibility of the client + "! application to implement the supported response types. + GENERIC type STANDARD TABLE OF T_RUNTIME_RESPONSE_GENERIC WITH NON-UNIQUE DEFAULT KEY, + end of T_OUTPUT_DATA. + types: + "! An array of dialog nodes. + begin of T_DIALOG_NODE_COLLECTION, + "! An array of objects describing the dialog nodes defined for the workspace. + DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, + "! The pagination data for the returned objects. + PAGINATION type T_PAGINATION, + end of T_DIALOG_NODE_COLLECTION. types: "! For internal use only. T_SYSTEM_RESPONSE type MAP. types: "! Metadata related to the message. begin of T_MESSAGE_CONTEXT_METADATA, + "! A label identifying the deployment environment, used for filtering log data. + "! This string cannot contain carriage return, newline, or tab characters. DEPLOYMENT type STRING, + "! A string value that identifies the user who is interacting with the workspace. + "! The client must provide a unique identifier for each individual end user who + "! accesses the application. For Plus and Premium plans, this user ID is used to + "! identify unique users for billing purposes. This string cannot contain carriage + "! return, newline, or tab characters. USER_ID type STRING, end of T_MESSAGE_CONTEXT_METADATA. types: "! State information for the conversation. To maintain state, include the context "! from the previous response. begin of T_CONTEXT, + "! The unique identifier of the conversation. CONVERSATION_ID type STRING, + "! For internal use only. SYSTEM type T_SYSTEM_RESPONSE, + "! Metadata related to the message. METADATA type T_MESSAGE_CONTEXT_METADATA, end of T_CONTEXT. types: - "! - begin of T_RT_ENTTY_INTRPRTTN_SYS_TIME, - DATETIME_LINK type STRING, - GRANULARITY type STRING, - PART_OF_DAY type STRING, - RANGE_LINK type STRING, - RELATIVE_HOUR type NUMBER, - RELATIVE_MINUTE type NUMBER, - RELATIVE_SECOND type NUMBER, - SPECIFIC_HOUR type NUMBER, - SPECIFIC_MINUTE type NUMBER, - SPECIFIC_SECOND type NUMBER, - TIMEZONE type STRING, - end of T_RT_ENTTY_INTRPRTTN_SYS_TIME. + "! The response sent by the workspace, including the output text, detected intents + "! and entities, and context. + begin of T_MESSAGE_RESPONSE, + "! An input object that includes the input text. + INPUT type T_MESSAGE_INPUT, + "! An array of intents recognized in the user input, sorted in descending order of + "! confidence. + INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! An array of entities identified in the user input. + ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! Whether to return more than one intent. A value of `true` indicates that all + "! matching intents are returned. + ALTERNATE_INTENTS type BOOLEAN, + "! State information for the conversation. To maintain state, include the context + "! from the previous response. + CONTEXT type T_CONTEXT, + "! An output object that includes the response to the user, the dialog nodes that + "! were triggered, and messages from the log. + OUTPUT type T_OUTPUT_DATA, + "! An array of objects describing any actions requested by the dialog node. + ACTIONS type STANDARD TABLE OF T_DIALOG_NODE_ACTION WITH NON-UNIQUE DEFAULT KEY, + end of T_MESSAGE_RESPONSE. types: - "! - begin of T_UPDATE_EXAMPLE, + "! No documentation available. + begin of T_BASE_VALUE, + "! The text of the entity value. This string must conform to the following + "! restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. + VALUE type STRING, + "! Any metadata related to the entity value. + METADATA type MAP, + "! Specifies the type of entity value. + TYPE type STRING, + "! An array of synonyms for the entity value. A value can specify either synonyms + "! or patterns (depending on the value type), but not both. A synonym must conform + "! to the following resrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. + SYNONYMS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array of patterns for the entity value. A value can specify either synonyms + "! or patterns (depending on the value type), but not both. A pattern is a regular + "! expression; for more information about how to specify a pattern, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#e + "! ntities-create-dictionary-based). + PATTERNS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + end of T_BASE_VALUE. + types: + "! No documentation available. + begin of T_UPDATE_ENTITY, + "! The name of the entity. This string must conform to the following + "! restrictions:
+ "! - It can contain only Unicode alphanumeric, underscore, and hyphen + "! characters.
+ "! - It cannot begin with the reserved prefix `sys-`. + ENTITY type STRING, + "! The description of the entity. This string cannot contain carriage return, + "! newline, or tab characters. + DESCRIPTION type STRING, + "! Any metadata related to the entity. + METADATA type MAP, + "! Whether to use fuzzy matching for the entity. + FUZZY_MATCH type BOOLEAN, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + "! An array of objects describing the entity values. + VALUES type STANDARD TABLE OF T_CREATE_VALUE WITH NON-UNIQUE DEFAULT KEY, + end of T_UPDATE_ENTITY. + types: + "! No documentation available. + begin of T_UPDATE_DIALOG_NODE, + "! The dialog node ID. This string must conform to the following restrictions:
+ "! - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot + "! characters. + DIALOG_NODE type STRING, + "! The description of the dialog node. This string cannot contain carriage return, + "! newline, or tab characters. + DESCRIPTION type STRING, + "! The condition that will trigger the dialog node. This string cannot contain + "! carriage return, newline, or tab characters. + CONDITIONS type STRING, + "! The ID of the parent dialog node. This property is omitted if the dialog node + "! has no parent. + PARENT type STRING, + "! The ID of the previous sibling dialog node. This property is omitted if the + "! dialog node has no previous sibling. + PREVIOUS_SIBLING type STRING, + "! The output of the dialog node. For more information about how to specify dialog + "! node output, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-ove + "! rview#dialog-overview-responses). + OUTPUT type T_DIALOG_NODE_OUTPUT, + "! The context for the dialog node. + CONTEXT type MAP, + "! The metadata for the dialog node. + METADATA type MAP, + "! The next step to execute following this dialog node. + NEXT_STEP type T_DIALOG_NODE_NEXT_STEP, + "! The alias used to identify the dialog node. This string must conform to the + "! following restrictions:
+ "! - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot + "! characters. + TITLE type STRING, + "! How the dialog node is processed. + TYPE type STRING, + "! How an `event_handler` node is processed. + EVENT_NAME type STRING, + "! The location in the dialog context where output is stored. + VARIABLE type STRING, + "! An array of objects describing any actions to be invoked by the dialog node. + ACTIONS type STANDARD TABLE OF T_DIALOG_NODE_ACTION WITH NON-UNIQUE DEFAULT KEY, + "! Whether this top-level dialog node can be digressed into. + DIGRESS_IN type STRING, + "! Whether this dialog node can be returned to after a digression. + DIGRESS_OUT type STRING, + "! Whether the user can digress to top-level nodes while filling out slots. + DIGRESS_OUT_SLOTS type STRING, + "! A label that can be displayed externally to describe the purpose of the node to + "! users. + USER_LABEL type STRING, + "! Whether the dialog node should be excluded from disambiguation suggestions. + DISAMBIGUATION_OPT_OUT type BOOLEAN, + "! For internal use only. + DISABLED type BOOLEAN, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + end of T_UPDATE_DIALOG_NODE. + types: + "! No documentation available. + begin of T_RUNTIME_RESPONSE_TYPE_PAUSE, + "! How long to pause, in milliseconds. + TIME type INTEGER, + "! Whether to send a "user is typing" event during the pause. + TYPING type BOOLEAN, + end of T_RUNTIME_RESPONSE_TYPE_PAUSE. + types: + "! No documentation available. + begin of T_DIA_ND_OTPT_RESP_TYP_CNNCT_1, + "! An optional message to be sent to the human agent who will be taking over the + "! conversation. Valid only when **reponse_type**=`connect_to_agent`. + MESSAGE_TO_HUMAN_AGENT type STRING, + end of T_DIA_ND_OTPT_RESP_TYP_CNNCT_1. + types: + "! No documentation available. + begin of T_ERROR_DETAIL, + "! Description of a specific constraint violation. + MESSAGE type STRING, + "! The location of the constraint violation. + PATH type STRING, + end of T_ERROR_DETAIL. + types: + "! No documentation available. + begin of T_CREATE_INTENT, + "! The name of the intent. This string must conform to the following + "! restrictions:
+ "! - It can contain only Unicode alphanumeric, underscore, hyphen, and dot + "! characters.
+ "! - It cannot begin with the reserved prefix `sys-`. + INTENT type STRING, + "! The description of the intent. This string cannot contain carriage return, + "! newline, or tab characters. + DESCRIPTION type STRING, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + "! An array of user input examples for the intent. + EXAMPLES type STANDARD TABLE OF T_EXAMPLE WITH NON-UNIQUE DEFAULT KEY, + end of T_CREATE_INTENT. + types: + "! No documentation available. + begin of T_CREATE_ENTITY, + "! The name of the entity. This string must conform to the following + "! restrictions:
+ "! - It can contain only Unicode alphanumeric, underscore, and hyphen + "! characters.
+ "! - If you specify an entity name beginning with the reserved prefix `sys-`, it + "! must be the name of a system entity that you want to enable. (Any entity + "! content specified with the request is ignored.). + ENTITY type STRING, + "! The description of the entity. This string cannot contain carriage return, + "! newline, or tab characters. + DESCRIPTION type STRING, + "! Any metadata related to the entity. + METADATA type MAP, + "! Whether to use fuzzy matching for the entity. + FUZZY_MATCH type BOOLEAN, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + "! An array of objects describing the entity values. + VALUES type STANDARD TABLE OF T_CREATE_VALUE WITH NON-UNIQUE DEFAULT KEY, + end of T_CREATE_ENTITY. + types: + "! No documentation available. + begin of T_CREATE_WORKSPACE, + "! The name of the workspace. This string cannot contain carriage return, newline, + "! or tab characters. + NAME type STRING, + "! The description of the workspace. This string cannot contain carriage return, + "! newline, or tab characters. + DESCRIPTION type STRING, + "! The language of the workspace. + LANGUAGE type STRING, + "! Any metadata related to the workspace. + METADATA type MAP, + "! Whether training data from the workspace (including artifacts such as intents + "! and entities) can be used by IBM for general service improvements. `true` + "! indicates that workspace training data is not to be used. + LEARNING_OPT_OUT type BOOLEAN, + "! Global settings for the workspace. + SYSTEM_SETTINGS type T_WORKSPACE_SYSTEM_SETTINGS, + "! The workspace ID of the workspace. + WORKSPACE_ID type STRING, + "! The current status of the workspace. + STATUS type STRING, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + "! An array of objects defining the intents for the workspace. + INTENTS type STANDARD TABLE OF T_CREATE_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects describing the entities for the workspace. + ENTITIES type STANDARD TABLE OF T_CREATE_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects describing the dialog nodes in the workspace. + DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects defining input examples that have been marked as irrelevant + "! input. + COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, + "! No documentation available. + WEBHOOKS type STANDARD TABLE OF T_WEBHOOK WITH NON-UNIQUE DEFAULT KEY, + end of T_CREATE_WORKSPACE. + types: + "! No documentation available. + begin of T_COUNTEREXAMPLE_COLLECTION, + "! An array of objects describing the examples marked as irrelevant input. + COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, + "! The pagination data for the returned objects. + PAGINATION type T_PAGINATION, + end of T_COUNTEREXAMPLE_COLLECTION. + types: + "! No documentation available. + begin of T_BASE_EXAMPLE, + "! The text of the user input example. This string must conform to the following + "! restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. TEXT type STRING, + "! An array of contextual entity mentions. MENTIONS type STANDARD TABLE OF T_MENTION WITH NON-UNIQUE DEFAULT KEY, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, - end of T_UPDATE_EXAMPLE. + end of T_BASE_EXAMPLE. types: - "! - begin of T_DIALOG_SUGGESTION, - LABEL type STRING, - VALUE type T_DIALOG_SUGGESTION_VALUE, - OUTPUT type T_DIALOG_SUGGESTION_OUTPUT, - DIALOG_NODE type STRING, - end of T_DIALOG_SUGGESTION. + "! No documentation available. + begin of T_RT_ENTTY_INTRPRTTN_SYS_NUM, + "! A recognized numeric value, represented as an integer or double. + NUMERIC_VALUE type NUMBER, + "! A unique identifier used to associate multiple recognized `@sys-date`, + "! `@sys-time`, or `@sys-number` entities that are recognized as a range of values + "! in the user's input (for example, `from July 4 until July 14` or `from 20 to + "! 25`). + RANGE_LINK type STRING, + "! The type of numeric value recognized in the user input (`integer` or + "! `rational`). + SUBTYPE type STRING, + end of T_RT_ENTTY_INTRPRTTN_SYS_NUM. types: - "! - begin of T_RUNTIME_RESPONSE_GENERIC, - RESPONSE_TYPE type STRING, + "! No documentation available. + begin of T_UPDATE_COUNTEREXAMPLE, + "! The text of a user input marked as irrelevant input. This string must conform to + "! the following restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. TEXT type STRING, + "! The timestamp for creation of the object. + CREATED type DATETIME, + "! The timestamp for the most recent update to the object. + UPDATED type DATETIME, + end of T_UPDATE_COUNTEREXAMPLE. + types: + "! An array of objects describing the entities for the workspace. + begin of T_ENTITY_COLLECTION, + "! An array of objects describing the entities defined for the workspace. + ENTITIES type STANDARD TABLE OF T_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! The pagination data for the returned objects. + PAGINATION type T_PAGINATION, + end of T_ENTITY_COLLECTION. + types: + "! No documentation available. + begin of T_INTENT_COLLECTION, + "! An array of objects describing the intents defined for the workspace. + INTENTS type STANDARD TABLE OF T_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! The pagination data for the returned objects. + PAGINATION type T_PAGINATION, + end of T_INTENT_COLLECTION. + types: + "! No documentation available. + begin of T_DIA_ND_OTPT_RESP_TYPE_PAUSE, + "! How long to pause, in milliseconds. The valid values are from 0 to 10000. Valid + "! only when **response_type**=`pause`. TIME type INTEGER, + "! Whether to send a "user is typing" event during the pause. Ignored if the + "! channel does not support this event. Valid only when **response_type**=`pause`. + "! TYPING type BOOLEAN, + end of T_DIA_ND_OTPT_RESP_TYPE_PAUSE. + types: + "! No documentation available. + begin of T_DIA_ND_OUTPUT_RESP_TYPE_IMG, + "! The URL of the image. Required when **response_type**=`image`. SOURCE type STRING, + "! An optional title to show before the response. Valid only when + "! **response_type**=`image` or `option`. TITLE type STRING, + "! An optional description to show with the response. Valid only when + "! **response_type**=`image` or `option`. DESCRIPTION type STRING, - PREFERENCE type STRING, - OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, - MESSAGE_TO_HUMAN_AGENT type STRING, - TOPIC type STRING, - DIALOG_NODE type STRING, - SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, - end of T_RUNTIME_RESPONSE_GENERIC. + end of T_DIA_ND_OUTPUT_RESP_TYPE_IMG. types: - "! An output object that includes the response to the user, the dialog nodes that - "! were triggered, and messages from the log. - begin of T_OUTPUT_DATA, - NODES_VISITED type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, - NODES_VISITED_DETAILS type STANDARD TABLE OF T_DIALOG_NODE_VISITED_DETAILS WITH NON-UNIQUE DEFAULT KEY, - LOG_MESSAGES type STANDARD TABLE OF T_LOG_MESSAGE WITH NON-UNIQUE DEFAULT KEY, - TEXT type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, - GENERIC type STANDARD TABLE OF T_RUNTIME_RESPONSE_GENERIC WITH NON-UNIQUE DEFAULT KEY, - end of T_OUTPUT_DATA. + "! No documentation available. + begin of T_ERROR_RESPONSE, + "! General description of an error. + ERROR type STRING, + "! Collection of specific constraint violations associated with the error. + ERRORS type STANDARD TABLE OF T_ERROR_DETAIL WITH NON-UNIQUE DEFAULT KEY, + "! HTTP status code for the error response. + CODE type INTEGER, + end of T_ERROR_RESPONSE. types: - "! + "! No documentation available. begin of T_BASE_MESSAGE, + "! An input object that includes the input text. INPUT type T_MESSAGE_INPUT, + "! An array of intents recognized in the user input, sorted in descending order of + "! confidence. INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! An array of entities identified in the user input. ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! Whether to return more than one intent. A value of `true` indicates that all + "! matching intents are returned. ALTERNATE_INTENTS type BOOLEAN, + "! State information for the conversation. To maintain state, include the context + "! from the previous response. CONTEXT type T_CONTEXT, + "! An output object that includes the response to the user, the dialog nodes that + "! were triggered, and messages from the log. OUTPUT type T_OUTPUT_DATA, + "! An array of objects describing any actions requested by the dialog node. ACTIONS type STANDARD TABLE OF T_DIALOG_NODE_ACTION WITH NON-UNIQUE DEFAULT KEY, end of T_BASE_MESSAGE. types: - "! An object describing a contextual entity mention. - begin of T_ENTITY_MENTION, - TEXT type STRING, - INTENT type STRING, - LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, - end of T_ENTITY_MENTION. - types: - "! + "! No documentation available. begin of T_RT_RESPONSE_TYPE_SUGGESTION, + "! The title or introductory text to show before the response. TITLE type STRING, + "! An array of objects describing the possible matching dialog nodes from which the + "! user can choose.
+ "!
+ "! **Note:** The **suggestions** property is part of the disambiguation feature, + "! which is only available for Plus and Premium users. SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, end of T_RT_RESPONSE_TYPE_SUGGESTION. types: - "! + "! No documentation available. begin of T_ENTITY_MENTION_COLLECTION, + "! An array of objects describing the entity mentions defined for an entity. EXAMPLES type STANDARD TABLE OF T_ENTITY_MENTION WITH NON-UNIQUE DEFAULT KEY, + "! The pagination data for the returned objects. PAGINATION type T_PAGINATION, end of T_ENTITY_MENTION_COLLECTION. types: - "! + "! No documentation available. begin of T_UPDATE_SYNONYM, + "! The text of the synonym. This string must conform to the following + "! restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. SYNONYM type STRING, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_UPDATE_SYNONYM. types: - "! - begin of T_DIA_ND_OTPT_RESP_TYP_SRCH_S1, - QUERY type STRING, - QUERY_TYPE type STRING, - FILTER type STRING, - DISCOVERY_VERSION type STRING, - end of T_DIA_ND_OTPT_RESP_TYP_SRCH_S1. - types: - "! - begin of T_EXAMPLE_COLLECTION, - EXAMPLES type STANDARD TABLE OF T_EXAMPLE WITH NON-UNIQUE DEFAULT KEY, - PAGINATION type T_PAGINATION, - end of T_EXAMPLE_COLLECTION. - types: - "! The pagination data for the returned objects. - begin of T_LOG_PAGINATION, - NEXT_URL type STRING, - MATCHED type INTEGER, - NEXT_CURSOR type STRING, - end of T_LOG_PAGINATION. - types: - "! - begin of T_RT_RESP_TYP_CONNECT_TO_AGENT, - MESSAGE_TO_HUMAN_AGENT type STRING, - TOPIC type STRING, - DIALOG_NODE type STRING, - end of T_RT_RESP_TYP_CONNECT_TO_AGENT. - types: - "! - begin of T_CREATE_VALUE, - VALUE type STRING, - METADATA type MAP, - TYPE type STRING, - SYNONYMS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, - PATTERNS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, - CREATED type DATETIME, - UPDATED type DATETIME, - end of T_CREATE_VALUE. - types: - "! + "! No documentation available. begin of T_BASE_INTENT, + "! The name of the intent. This string must conform to the following + "! restrictions:
+ "! - It can contain only Unicode alphanumeric, underscore, hyphen, and dot + "! characters.
+ "! - It cannot begin with the reserved prefix `sys-`. INTENT type STRING, + "! The description of the intent. This string cannot contain carriage return, + "! newline, or tab characters. DESCRIPTION type STRING, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_BASE_INTENT. types: - "! - T_EMPTY_RESPONSE type JSONOBJECT. - types: - "! - begin of T_UPDATE_VALUE, - VALUE type STRING, - METADATA type MAP, - TYPE type STRING, - SYNONYMS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, - PATTERNS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, - CREATED type DATETIME, - UPDATED type DATETIME, - end of T_UPDATE_VALUE. - types: - "! An alternative value for the recognized entity. - begin of T_RUNTIME_ENTITY_ALTERNATIVE, - VALUE type STRING, - CONFIDENCE type NUMBER, - end of T_RUNTIME_ENTITY_ALTERNATIVE. - types: - "! + "! No documentation available. begin of T_RT_ENTTY_INTRPRTTN_SYS_DATE, + "! The calendar used to represent a recognized date (for example, `Gregorian`). CALENDAR_TYPE type STRING, + "! A unique identifier used to associate a time and date. If the user input + "! contains a date and time that are mentioned together (for example, `Today at + "! 5`, the same **datetime_link** value is returned for both the `@sys-date` and + "! `@sys-time` entities). DATETIME_LINK type STRING, + "! A locale-specific holiday name (such as `thanksgiving` or `christmas`). This + "! property is included when a `@sys-date` entity is recognized based on a holiday + "! name in the user input. FESTIVAL type STRING, + "! The precision or duration of a time range specified by a recognized `@sys-time` + "! or `@sys-date` entity. GRANULARITY type STRING, + "! A unique identifier used to associate multiple recognized `@sys-date`, + "! `@sys-time`, or `@sys-number` entities that are recognized as a range of values + "! in the user's input (for example, `from July 4 until July 14` or `from 20 to + "! 25`). RANGE_LINK type STRING, + "! The word in the user input that indicates that a `sys-date` or `sys-time` entity + "! is part of an implied range where only one date or time is specified (for + "! example, `since` or `until`). RANGE_MODIFIER type STRING, + "! A recognized mention of a relative day, represented numerically as an offset + "! from the current date (for example, `-1` for `yesterday` or `10` for `in ten + "! days`). RELATIVE_DAY type NUMBER, + "! A recognized mention of a relative month, represented numerically as an offset + "! from the current month (for example, `1` for `next month` or `-3` for `three + "! months ago`). RELATIVE_MONTH type NUMBER, + "! A recognized mention of a relative week, represented numerically as an offset + "! from the current week (for example, `2` for `in two weeks` or `-1` for `last + "! week). RELATIVE_WEEK type NUMBER, + "! A recognized mention of a relative date range for a weekend, represented + "! numerically as an offset from the current weekend (for example, `0` for `this + "! weekend` or `-1` for `last weekend`). RELATIVE_WEEKEND type NUMBER, + "! A recognized mention of a relative year, represented numerically as an offset + "! from the current year (for example, `1` for `next year` or `-5` for `five years + "! ago`). RELATIVE_YEAR type NUMBER, + "! A recognized mention of a specific date, represented numerically as the date + "! within the month (for example, `30` for `June 30`.). SPECIFIC_DAY type NUMBER, + "! A recognized mention of a specific day of the week as a lowercase string (for + "! example, `monday`). SPECIFIC_DAY_OF_WEEK type STRING, + "! A recognized mention of a specific month, represented numerically (for example, + "! `7` for `July`). SPECIFIC_MONTH type NUMBER, + "! A recognized mention of a specific quarter, represented numerically (for + "! example, `3` for `the third quarter`). SPECIFIC_QUARTER type NUMBER, + "! A recognized mention of a specific year (for example, `2016`). SPECIFIC_YEAR type NUMBER, end of T_RT_ENTTY_INTRPRTTN_SYS_DATE. types: - "! - begin of T_UPDATE_INTENT, - INTENT type STRING, - DESCRIPTION type STRING, - CREATED type DATETIME, - UPDATED type DATETIME, - EXAMPLES type STANDARD TABLE OF T_EXAMPLE WITH NON-UNIQUE DEFAULT KEY, - end of T_UPDATE_INTENT. - types: - "! - begin of T_VALUE_COLLECTION, - VALUES type STANDARD TABLE OF T_VALUE WITH NON-UNIQUE DEFAULT KEY, - PAGINATION type T_PAGINATION, - end of T_VALUE_COLLECTION. - types: - "! An object describing the role played by a system entity that is specifies the - "! beginning or end of a range recognized in the user input. - "! - "! This property is part of the new system entities, which are a beta feature. - begin of T_RUNTIME_ENTITY_ROLE, - TYPE type STRING, - end of T_RUNTIME_ENTITY_ROLE. - types: - "! + "! No documentation available. begin of T_DIA_ND_OUTPUT_RESP_TYPE_OPT, + "! An optional title to show before the response. Valid only when + "! **response_type**=`image` or `option`. TITLE type STRING, + "! An optional description to show with the response. Valid only when + "! **response_type**=`image` or `option`. DESCRIPTION type STRING, + "! The preferred type of control to display, if supported by the channel. Valid + "! only when **response_type**=`option`. PREFERENCE type STRING, + "! An array of objects describing the options from which the user can choose. You + "! can include up to 20 options. Required when **response_type**=`option`. OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, end of T_DIA_ND_OUTPUT_RESP_TYPE_OPT. types: - "! + "! No documentation available. begin of T_BASE_COUNTEREXAMPLE, + "! The text of a user input marked as irrelevant input. This string must conform to + "! the following restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. TEXT type STRING, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_BASE_COUNTEREXAMPLE. types: - "! + "! No documentation available. begin of T_RUNTIME_RESPONSE_TYPE_IMAGE, + "! The URL of the image. SOURCE type STRING, + "! The title or introductory text to show before the response. TITLE type STRING, + "! The description to show with the the response. DESCRIPTION type STRING, end of T_RUNTIME_RESPONSE_TYPE_IMAGE. types: - "! - begin of T_CREATE_INTENT, - INTENT type STRING, - DESCRIPTION type STRING, - CREATED type DATETIME, - UPDATED type DATETIME, - EXAMPLES type STANDARD TABLE OF T_EXAMPLE WITH NON-UNIQUE DEFAULT KEY, - end of T_CREATE_INTENT. - types: - "! - begin of T_CREATE_ENTITY, - ENTITY type STRING, - DESCRIPTION type STRING, - METADATA type MAP, - FUZZY_MATCH type BOOLEAN, - CREATED type DATETIME, - UPDATED type DATETIME, - VALUES type STANDARD TABLE OF T_CREATE_VALUE WITH NON-UNIQUE DEFAULT KEY, - end of T_CREATE_ENTITY. - types: - "! + "! No documentation available. begin of T_UPDATE_WORKSPACE, + "! The name of the workspace. This string cannot contain carriage return, newline, + "! or tab characters. NAME type STRING, + "! The description of the workspace. This string cannot contain carriage return, + "! newline, or tab characters. DESCRIPTION type STRING, + "! The language of the workspace. LANGUAGE type STRING, + "! Any metadata related to the workspace. METADATA type MAP, + "! Whether training data from the workspace (including artifacts such as intents + "! and entities) can be used by IBM for general service improvements. `true` + "! indicates that workspace training data is not to be used. LEARNING_OPT_OUT type BOOLEAN, + "! Global settings for the workspace. SYSTEM_SETTINGS type T_WORKSPACE_SYSTEM_SETTINGS, + "! The workspace ID of the workspace. WORKSPACE_ID type STRING, + "! The current status of the workspace. STATUS type STRING, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, + "! An array of objects defining the intents for the workspace. INTENTS type STANDARD TABLE OF T_CREATE_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects describing the entities for the workspace. ENTITIES type STANDARD TABLE OF T_CREATE_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects describing the dialog nodes in the workspace. DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects defining input examples that have been marked as irrelevant + "! input. COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, + "! No documentation available. + WEBHOOKS type STANDARD TABLE OF T_WEBHOOK WITH NON-UNIQUE DEFAULT KEY, end of T_UPDATE_WORKSPACE. types: - "! An array of dialog nodes. - begin of T_DIALOG_NODE_COLLECTION, - DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, - PAGINATION type T_PAGINATION, - end of T_DIALOG_NODE_COLLECTION. - types: - "! + "! No documentation available. begin of T_BASE_DIALOG_NODE, + "! The dialog node ID. This string must conform to the following restrictions:
+ "! - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot + "! characters. DIALOG_NODE type STRING, + "! The description of the dialog node. This string cannot contain carriage return, + "! newline, or tab characters. DESCRIPTION type STRING, + "! The condition that will trigger the dialog node. This string cannot contain + "! carriage return, newline, or tab characters. CONDITIONS type STRING, + "! The ID of the parent dialog node. This property is omitted if the dialog node + "! has no parent. PARENT type STRING, + "! The ID of the previous sibling dialog node. This property is omitted if the + "! dialog node has no previous sibling. PREVIOUS_SIBLING type STRING, + "! The output of the dialog node. For more information about how to specify dialog + "! node output, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-ove + "! rview#dialog-overview-responses). OUTPUT type T_DIALOG_NODE_OUTPUT, + "! The context for the dialog node. CONTEXT type MAP, + "! The metadata for the dialog node. METADATA type MAP, + "! The next step to execute following this dialog node. NEXT_STEP type T_DIALOG_NODE_NEXT_STEP, + "! The alias used to identify the dialog node. This string must conform to the + "! following restrictions:
+ "! - It can contain only Unicode alphanumeric, space, underscore, hyphen, and dot + "! characters. TITLE type STRING, + "! How the dialog node is processed. TYPE type STRING, + "! How an `event_handler` node is processed. EVENT_NAME type STRING, + "! The location in the dialog context where output is stored. VARIABLE type STRING, + "! An array of objects describing any actions to be invoked by the dialog node. ACTIONS type STANDARD TABLE OF T_DIALOG_NODE_ACTION WITH NON-UNIQUE DEFAULT KEY, + "! Whether this top-level dialog node can be digressed into. DIGRESS_IN type STRING, + "! Whether this dialog node can be returned to after a digression. DIGRESS_OUT type STRING, + "! Whether the user can digress to top-level nodes while filling out slots. DIGRESS_OUT_SLOTS type STRING, + "! A label that can be displayed externally to describe the purpose of the node to + "! users. USER_LABEL type STRING, + "! Whether the dialog node should be excluded from disambiguation suggestions. + DISAMBIGUATION_OPT_OUT type BOOLEAN, + "! For internal use only. DISABLED type BOOLEAN, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_BASE_DIALOG_NODE. - types: - "! The response sent by the workspace, including the output text, detected intents - "! and entities, and context. - begin of T_MESSAGE_RESPONSE, - INPUT type T_MESSAGE_INPUT, - INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, - ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, - ALTERNATE_INTENTS type BOOLEAN, - CONTEXT type T_CONTEXT, - OUTPUT type T_OUTPUT_DATA, - ACTIONS type STANDARD TABLE OF T_DIALOG_NODE_ACTION WITH NON-UNIQUE DEFAULT KEY, - end of T_MESSAGE_RESPONSE. - types: - "! - begin of T_BASE_VALUE, - VALUE type STRING, - METADATA type MAP, - TYPE type STRING, - SYNONYMS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, - PATTERNS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, - CREATED type DATETIME, - UPDATED type DATETIME, - end of T_BASE_VALUE. types: "! A request sent to the workspace, including the user input and context. begin of T_MESSAGE_REQUEST, + "! An input object that includes the input text. INPUT type T_MESSAGE_INPUT, + "! Intents to use when evaluating the user input. Include intents from the previous + "! response to continue using those intents rather than trying to recognize + "! intents in the new input. INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! Entities to use when evaluating the message. Include entities from the previous + "! response to continue using those entities rather than detecting entities in the + "! new input. ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! Whether to return more than one intent. A value of `true` indicates that all + "! matching intents are returned. ALTERNATE_INTENTS type BOOLEAN, + "! State information for the conversation. To maintain state, include the context + "! from the previous response. CONTEXT type T_CONTEXT, + "! An output object that includes the response to the user, the dialog nodes that + "! were triggered, and messages from the log. OUTPUT type T_OUTPUT_DATA, + "! An array of objects describing any actions requested by the dialog node. ACTIONS type STANDARD TABLE OF T_DIALOG_NODE_ACTION WITH NON-UNIQUE DEFAULT KEY, end of T_MESSAGE_REQUEST. types: - "! + "! No documentation available. begin of T_LOG, + "! A request sent to the workspace, including the user input and context. REQUEST type T_MESSAGE_REQUEST, + "! The response sent by the workspace, including the output text, detected intents + "! and entities, and context. RESPONSE type T_MESSAGE_RESPONSE, + "! A unique identifier for the logged event. LOG_ID type STRING, + "! The timestamp for receipt of the message. REQUEST_TIMESTAMP type STRING, + "! The timestamp for the system response to the message. RESPONSE_TIMESTAMP type STRING, + "! The unique identifier of the workspace where the request was made. WORKSPACE_ID type STRING, + "! The language of the workspace where the message request was made. LANGUAGE type STRING, end of T_LOG. - types: - "! - begin of T_UPDATE_ENTITY, - ENTITY type STRING, - DESCRIPTION type STRING, - METADATA type MAP, - FUZZY_MATCH type BOOLEAN, - CREATED type DATETIME, - UPDATED type DATETIME, - VALUES type STANDARD TABLE OF T_CREATE_VALUE WITH NON-UNIQUE DEFAULT KEY, - end of T_UPDATE_ENTITY. types: "! An output object that includes the response to the user, the dialog nodes that "! were triggered, and messages from the log. begin of T_BASE_OUTPUT, + "! An array of the nodes that were triggered to create the response, in the order + "! in which they were visited. This information is useful for debugging and for + "! tracing the path taken through the node tree. NODES_VISITED type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects containing detailed diagnostic information about the nodes + "! that were triggered during processing of the input message. Included only if + "! **nodes_visited_details** is set to `true` in the message request. NODES_VISITED_DETAILS type STANDARD TABLE OF T_DIALOG_NODE_VISITED_DETAILS WITH NON-UNIQUE DEFAULT KEY, end of T_BASE_OUTPUT. types: - "! - begin of T_UPDATE_DIALOG_NODE, - DIALOG_NODE type STRING, - DESCRIPTION type STRING, - CONDITIONS type STRING, - PARENT type STRING, - PREVIOUS_SIBLING type STRING, - OUTPUT type T_DIALOG_NODE_OUTPUT, - CONTEXT type MAP, - METADATA type MAP, - NEXT_STEP type T_DIALOG_NODE_NEXT_STEP, - TITLE type STRING, - TYPE type STRING, - EVENT_NAME type STRING, - VARIABLE type STRING, - ACTIONS type STANDARD TABLE OF T_DIALOG_NODE_ACTION WITH NON-UNIQUE DEFAULT KEY, - DIGRESS_IN type STRING, - DIGRESS_OUT type STRING, - DIGRESS_OUT_SLOTS type STRING, - USER_LABEL type STRING, - DISABLED type BOOLEAN, - CREATED type DATETIME, - UPDATED type DATETIME, - end of T_UPDATE_DIALOG_NODE. - types: - "! - begin of T_RUNTIME_RESPONSE_TYPE_PAUSE, - TIME type INTEGER, - TYPING type BOOLEAN, - end of T_RUNTIME_RESPONSE_TYPE_PAUSE. - types: - "! + "! No documentation available. begin of T_LOG_COLLECTION, + "! An array of objects describing log events. LOGS type STANDARD TABLE OF T_LOG WITH NON-UNIQUE DEFAULT KEY, + "! The pagination data for the returned objects. PAGINATION type T_LOG_PAGINATION, end of T_LOG_COLLECTION. types: - "! - begin of T_DIA_ND_OTPT_RESP_TYP_CNNCT_1, - MESSAGE_TO_HUMAN_AGENT type STRING, - end of T_DIA_ND_OTPT_RESP_TYP_CNNCT_1. - types: - "! + "! No documentation available. begin of T_AUDIT_PROPERTIES, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_AUDIT_PROPERTIES. types: - "! - begin of T_CREATE_WORKSPACE, - NAME type STRING, - DESCRIPTION type STRING, - LANGUAGE type STRING, - METADATA type MAP, - LEARNING_OPT_OUT type BOOLEAN, - SYSTEM_SETTINGS type T_WORKSPACE_SYSTEM_SETTINGS, - WORKSPACE_ID type STRING, - STATUS type STRING, - CREATED type DATETIME, - UPDATED type DATETIME, - INTENTS type STANDARD TABLE OF T_CREATE_INTENT WITH NON-UNIQUE DEFAULT KEY, - ENTITIES type STANDARD TABLE OF T_CREATE_ENTITY WITH NON-UNIQUE DEFAULT KEY, - DIALOG_NODES type STANDARD TABLE OF T_DIALOG_NODE WITH NON-UNIQUE DEFAULT KEY, - COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, - end of T_CREATE_WORKSPACE. - types: - "! - begin of T_COUNTEREXAMPLE_COLLECTION, - COUNTEREXAMPLES type STANDARD TABLE OF T_COUNTEREXAMPLE WITH NON-UNIQUE DEFAULT KEY, - PAGINATION type T_PAGINATION, - end of T_COUNTEREXAMPLE_COLLECTION. - types: - "! + "! No documentation available. begin of T_WORKSPACE_COLLECTION, + "! An array of objects describing the workspaces associated with the service + "! instance. WORKSPACES type STANDARD TABLE OF T_WORKSPACE WITH NON-UNIQUE DEFAULT KEY, + "! The pagination data for the returned objects. PAGINATION type T_PAGINATION, end of T_WORKSPACE_COLLECTION. types: - "! + "! No documentation available. begin of T_BASE_SYNONYM, + "! The text of the synonym. This string must conform to the following + "! restrictions:
+ "! - It cannot contain carriage return, newline, or tab characters.
+ "! - It cannot consist of only whitespace characters. SYNONYM type STRING, + "! The timestamp for creation of the object. CREATED type DATETIME, + "! The timestamp for the most recent update to the object. UPDATED type DATETIME, end of T_BASE_SYNONYM. - types: - "! - begin of T_BASE_EXAMPLE, - TEXT type STRING, - MENTIONS type STANDARD TABLE OF T_MENTION WITH NON-UNIQUE DEFAULT KEY, - CREATED type DATETIME, - UPDATED type DATETIME, - end of T_BASE_EXAMPLE. constants: begin of C_REQUIRED_FIELDS, - T_DIA_ND_OTPT_TEXT_VALUES_ELEM type string value '|', - T_MENTION type string value '|ENTITY|LOCATION|', - T_EXAMPLE type string value '|TEXT|', - T_INTENT type string value '|INTENT|', + T_WS_SYSTEM_SETTINGS_OFF_TOPIC type string value '|', + T_RT_ENTITY_INTERPRETATION type string value '|', + T_WEBHOOK_HEADER type string value '|NAME|VALUE|', T_DIALOG_NODE_ACTION type string value '|NAME|RESULT_VARIABLE|', T_WS_SYSTM_STTNGS_DSMBGTN type string value '|', T_DIALOG_NODE_OUTPUT_MODIFIERS type string value '|', T_DIALOG_NODE_NEXT_STEP type string value '|BEHAVIOR|', T_MESSAGE_INPUT type string value '|', T_CAPTURE_GROUP type string value '|GROUP|', + T_RUNTIME_ENTITY_ROLE type string value '|', T_RUNTIME_ENTITY type string value '|ENTITY|LOCATION|VALUE|', T_RUNTIME_INTENT type string value '|INTENT|CONFIDENCE|', T_DIA_ND_OUTPUT_OPT_ELEM_VALUE type string value '|', T_DIA_NODE_OUTPUT_OPT_ELEMENT type string value '|LABEL|VALUE|', + T_DIA_ND_OTPT_TEXT_VALUES_ELEM type string value '|', T_DIALOG_NODE_OUTPUT_GENERIC type string value '|RESPONSE_TYPE|', T_DIALOG_NODE_OUTPUT type string value '|', - T_WS_SYSTEM_SETTINGS_TOOLING type string value '|', - T_WORKSPACE_SYSTEM_SETTINGS type string value '|', T_DIALOG_NODE type string value '|DIALOG_NODE|', T_VALUE type string value '|VALUE|TYPE|', + T_WEBHOOK type string value '|URL|NAME|', + T_WS_SYSTM_STTNGS_SYSTM_ENTTS type string value '|', + T_MENTION type string value '|ENTITY|LOCATION|', + T_EXAMPLE type string value '|TEXT|', + T_INTENT type string value '|INTENT|', + T_WS_SYSTEM_SETTINGS_TOOLING type string value '|', + T_WORKSPACE_SYSTEM_SETTINGS type string value '|', T_COUNTEREXAMPLE type string value '|TEXT|', T_ENTITY type string value '|ENTITY|', T_WORKSPACE type string value '|NAME|LANGUAGE|LEARNING_OPT_OUT|WORKSPACE_ID|', - T_RT_ENTTY_INTRPRTTN_SYS_NUM type string value '|', - T_UPDATE_COUNTEREXAMPLE type string value '|', T_SYNONYM type string value '|SYNONYM|', T_PAGINATION type string value '|REFRESH_URL|', T_SYNONYM_COLLECTION type string value '|SYNONYMS|PAGINATION|', T_RUNTIME_RESPONSE_TYPE_OPTION type string value '|', - T_LOG_MESSAGE type string value '|LEVEL|MSG|', - T_ENTITY_COLLECTION type string value '|ENTITIES|PAGINATION|', T_DIA_ND_OUTPUT_RESP_TYPE_TEXT type string value '|', - T_INTENT_COLLECTION type string value '|INTENTS|PAGINATION|', - T_DIA_ND_OTPT_RESP_TYPE_PAUSE type string value '|', T_BASE_WORKSPACE type string value '|', - T_DIA_SUGGESTION_RESP_GENERIC type string value '|RESPONSE_TYPE|', - T_DIA_ND_OUTPUT_RESP_TYPE_IMG type string value '|', - T_ERROR_DETAIL type string value '|MESSAGE|', - T_ERROR_RESPONSE type string value '|ERROR|CODE|', - T_WS_SYSTM_STTNGS_SYSTM_ENTTS type string value '|', - T_RT_ENTITY_INTERPRETATION type string value '|', - T_DIALOG_SUGGESTION_VALUE type string value '|', - T_DIALOG_NODE_VISITED_DETAILS type string value '|', - T_DIALOG_SUGGESTION_OUTPUT type string value '|TEXT|', T_BASE_ENTITY type string value '|', T_RUNTIME_RESPONSE_TYPE_TEXT type string value '|', - T_MESSAGE_CONTEXT_METADATA type string value '|', - T_CONTEXT type string value '|', T_RT_ENTTY_INTRPRTTN_SYS_TIME type string value '|', T_UPDATE_EXAMPLE type string value '|', - T_DIALOG_SUGGESTION type string value '|LABEL|VALUE|', - T_RUNTIME_RESPONSE_GENERIC type string value '|RESPONSE_TYPE|', - T_OUTPUT_DATA type string value '|LOG_MESSAGES|TEXT|', - T_BASE_MESSAGE type string value '|', T_ENTITY_MENTION type string value '|TEXT|INTENT|LOCATION|', - T_RT_RESPONSE_TYPE_SUGGESTION type string value '|', - T_ENTITY_MENTION_COLLECTION type string value '|EXAMPLES|PAGINATION|', - T_UPDATE_SYNONYM type string value '|', T_DIA_ND_OTPT_RESP_TYP_SRCH_S1 type string value '|', T_EXAMPLE_COLLECTION type string value '|EXAMPLES|PAGINATION|', T_LOG_PAGINATION type string value '|', T_RT_RESP_TYP_CONNECT_TO_AGENT type string value '|', T_CREATE_VALUE type string value '|VALUE|', - T_BASE_INTENT type string value '|', + T_DIALOG_NODE_VISITED_DETAILS type string value '|', + T_DIA_SUGGESTION_RESP_GENERIC type string value '|RESPONSE_TYPE|', + T_DIALOG_SUGGESTION_VALUE type string value '|', + T_DIALOG_SUGGESTION_OUTPUT type string value '|TEXT|', + T_DIALOG_SUGGESTION type string value '|LABEL|VALUE|', T_UPDATE_VALUE type string value '|', T_RUNTIME_ENTITY_ALTERNATIVE type string value '|', - T_RT_ENTTY_INTRPRTTN_SYS_DATE type string value '|', T_UPDATE_INTENT type string value '|', T_VALUE_COLLECTION type string value '|VALUES|PAGINATION|', - T_RUNTIME_ENTITY_ROLE type string value '|', + T_LOG_MESSAGE type string value '|LEVEL|MSG|', + T_RUNTIME_RESPONSE_GENERIC type string value '|RESPONSE_TYPE|', + T_OUTPUT_DATA type string value '|LOG_MESSAGES|TEXT|', + T_DIALOG_NODE_COLLECTION type string value '|DIALOG_NODES|PAGINATION|', + T_MESSAGE_CONTEXT_METADATA type string value '|', + T_CONTEXT type string value '|', + T_MESSAGE_RESPONSE type string value '|INPUT|INTENTS|ENTITIES|CONTEXT|OUTPUT|', + T_BASE_VALUE type string value '|', + T_UPDATE_ENTITY type string value '|', + T_UPDATE_DIALOG_NODE type string value '|', + T_RUNTIME_RESPONSE_TYPE_PAUSE type string value '|', + T_DIA_ND_OTPT_RESP_TYP_CNNCT_1 type string value '|', + T_ERROR_DETAIL type string value '|MESSAGE|', + T_CREATE_INTENT type string value '|INTENT|', + T_CREATE_ENTITY type string value '|ENTITY|', + T_CREATE_WORKSPACE type string value '|', + T_COUNTEREXAMPLE_COLLECTION type string value '|COUNTEREXAMPLES|PAGINATION|', + T_BASE_EXAMPLE type string value '|', + T_RT_ENTTY_INTRPRTTN_SYS_NUM type string value '|', + T_UPDATE_COUNTEREXAMPLE type string value '|', + T_ENTITY_COLLECTION type string value '|ENTITIES|PAGINATION|', + T_INTENT_COLLECTION type string value '|INTENTS|PAGINATION|', + T_DIA_ND_OTPT_RESP_TYPE_PAUSE type string value '|', + T_DIA_ND_OUTPUT_RESP_TYPE_IMG type string value '|', + T_ERROR_RESPONSE type string value '|ERROR|CODE|', + T_BASE_MESSAGE type string value '|', + T_RT_RESPONSE_TYPE_SUGGESTION type string value '|', + T_ENTITY_MENTION_COLLECTION type string value '|EXAMPLES|PAGINATION|', + T_UPDATE_SYNONYM type string value '|', + T_BASE_INTENT type string value '|', + T_RT_ENTTY_INTRPRTTN_SYS_DATE type string value '|', T_DIA_ND_OUTPUT_RESP_TYPE_OPT type string value '|', T_BASE_COUNTEREXAMPLE type string value '|', T_RUNTIME_RESPONSE_TYPE_IMAGE type string value '|', - T_CREATE_INTENT type string value '|INTENT|', - T_CREATE_ENTITY type string value '|ENTITY|', T_UPDATE_WORKSPACE type string value '|', - T_DIALOG_NODE_COLLECTION type string value '|DIALOG_NODES|PAGINATION|', T_BASE_DIALOG_NODE type string value '|', - T_MESSAGE_RESPONSE type string value '|INPUT|INTENTS|ENTITIES|CONTEXT|OUTPUT|', - T_BASE_VALUE type string value '|', T_MESSAGE_REQUEST type string value '|', T_LOG type string value '|REQUEST|RESPONSE|LOG_ID|REQUEST_TIMESTAMP|RESPONSE_TIMESTAMP|WORKSPACE_ID|LANGUAGE|', - T_UPDATE_ENTITY type string value '|', T_BASE_OUTPUT type string value '|', - T_UPDATE_DIALOG_NODE type string value '|', - T_RUNTIME_RESPONSE_TYPE_PAUSE type string value '|', T_LOG_COLLECTION type string value '|LOGS|PAGINATION|', - T_DIA_ND_OTPT_RESP_TYP_CNNCT_1 type string value '|', T_AUDIT_PROPERTIES type string value '|', - T_CREATE_WORKSPACE type string value '|', - T_COUNTEREXAMPLE_COLLECTION type string value '|COUNTEREXAMPLES|PAGINATION|', T_WORKSPACE_COLLECTION type string value '|WORKSPACES|PAGINATION|', T_BASE_SYNONYM type string value '|', - T_BASE_EXAMPLE type string value '|', __DUMMY type string value SPACE, end of C_REQUIRED_FIELDS . @@ -1031,6 +1998,7 @@ constants: DIGRESS_OUT type string value 'digress_out', DIGRESS_OUT_SLOTS type string value 'digress_out_slots', USER_LABEL type string value 'user_label', + DISAMBIGUATION_OPT_OUT type string value 'disambiguation_opt_out', DISABLED type string value 'disabled', ENTITY type string value 'entity', FUZZY_MATCH type string value 'fuzzy_match', @@ -1040,6 +2008,10 @@ constants: INTENTS type string value 'intents', ENTITIES type string value 'entities', ALTERNATE_INTENTS type string value 'alternate_intents', + NODES_VISITED type string value 'nodes_visited', + NODESVISITED type string value 'nodesVisited', + NODES_VISITED_DETAILS type string value 'nodes_visited_details', + NODESVISITEDDETAILS type string value 'nodesVisitedDetails', SYNONYM type string value 'synonym', VALUE type string value 'value', SYNONYMS type string value 'synonyms', @@ -1063,12 +2035,15 @@ constants: DIALOG_NODES type string value 'dialog_nodes', DIALOGNODE type string value 'dialogNode', COUNTEREXAMPLE type string value 'counterexample', + WEBHOOKS type string value 'webhooks', PARAMETERS type string value 'parameters', RESULT_VARIABLE type string value 'result_variable', CREDENTIALS type string value 'credentials', + DIALOGNODES type string value 'dialogNodes', + BEHAVIOR type string value 'behavior', + SELECTOR type string value 'selector', GENERIC type string value 'generic', MODIFIERS type string value 'modifiers', - OVERWRITE type string value 'overwrite', RESPONSE_TYPE type string value 'response_type', SELECTION_POLICY type string value 'selection_policy', DELIMITER type string value 'delimiter', @@ -1082,29 +2057,22 @@ constants: QUERY_TYPE type string value 'query_type', FILTER type string value 'filter', DISCOVERY_VERSION type string value 'discovery_version', - TOPIC type string value 'topic', - SUGGESTIONS type string value 'suggestions', + OVERWRITE type string value 'overwrite', LABEL type string value 'label', - NODES_VISITED type string value 'nodes_visited', - NODESVISITED type string value 'nodesVisited', - NODES_VISITED_DETAILS type string value 'nodes_visited_details', - NODESVISITEDDETAILS type string value 'nodesVisitedDetails', - DIALOGNODES type string value 'dialogNodes', - BEHAVIOR type string value 'behavior', - SELECTOR type string value 'selector', + TOPIC type string value 'topic', MESSAGE type string value 'message', PATH type string value 'path', ERROR type string value 'error', ERRORS type string value 'errors', CODE type string value 'code', - LOGS type string value 'logs', - LEVEL type string value 'level', - MSG type string value 'msg', REQUEST type string value 'request', RESPONSE type string value 'response', LOG_ID type string value 'log_id', REQUEST_TIMESTAMP type string value 'request_timestamp', RESPONSE_TIMESTAMP type string value 'response_timestamp', + LOGS type string value 'logs', + LEVEL type string value 'level', + MSG type string value 'msg', NEXT_URL type string value 'next_url', MATCHED type string value 'matched', NEXT_CURSOR type string value 'next_cursor', @@ -1117,6 +2085,8 @@ constants: REFRESH_CURSOR type string value 'refresh_cursor', CONFIDENCE type string value 'confidence', GROUPS type string value 'groups', + INTERPRETATION type string value 'interpretation', + ROLE type string value 'role', CALENDAR_TYPE type string value 'calendar_type', DATETIME_LINK type string value 'datetime_link', FESTIVAL type string value 'festival', @@ -1143,15 +2113,23 @@ constants: SPECIFIC_MINUTE type string value 'specific_minute', SPECIFIC_SECOND type string value 'specific_second', TIMEZONE type string value 'timezone', + SUGGESTIONS type string value 'suggestions', + URL type string value 'url', + HEADERS type string value 'headers', + WORKSPACES type string value 'workspaces', TOOLING type string value 'tooling', DISAMBIGUATION type string value 'disambiguation', HUMAN_AGENT_ASSIST type string value 'human_agent_assist', - ENABLED type string value 'enabled', - STORE_GENERIC_RESPONSES type string value 'store_generic_responses', + SYSTEM_ENTITIES type string value 'system_entities', + OFF_TOPIC type string value 'off_topic', PROMPT type string value 'prompt', NONE_OF_THE_ABOVE_PROMPT type string value 'none_of_the_above_prompt', + ENABLED type string value 'enabled', SENSITIVITY type string value 'sensitivity', - WORKSPACES type string value 'workspaces', + RANDOMIZE type string value 'randomize', + MAX_SUGGESTIONS type string value 'max_suggestions', + SUGGESTION_TEXT_POLICY type string value 'suggestion_text_policy', + STORE_GENERIC_RESPONSES type string value 'store_generic_responses', end of C_ABAPNAME_DICTIONARY . @@ -1165,22 +2143,23 @@ constants: "! Get response to user input. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_body | + "! @parameter I_BODY | "! The message to be sent. This includes the user's input, along with optional "! intents, entities, and context from the last response. - "! @parameter I_nodes_visited_details | + "! @parameter I_NODES_VISITED_DETAILS | "! Whether to include additional diagnostic information about the dialog nodes that "! were visited during processing of the message. "! @parameter E_RESPONSE | "! Service return value of type T_MESSAGE_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods MESSAGE importing - !I_workspace_id type STRING - !I_body type T_MESSAGE_REQUEST optional - !I_nodes_visited_details type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_BODY type T_MESSAGE_REQUEST optional + !I_NODES_VISITED_DETAILS type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1190,25 +2169,26 @@ constants: "! List workspaces. "! - "! @parameter I_page_limit | + "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. - "! @parameter I_sort | + "! @parameter I_SORT | "! The attribute by which returned workspaces will be sorted. To reverse the sort "! order, prefix the value with a minus sign (`-`). - "! @parameter I_cursor | + "! @parameter I_CURSOR | "! A token identifying the page of results to retrieve. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_WORKSPACE_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_WORKSPACES importing - !I_page_limit type INTEGER optional - !I_sort type STRING optional - !I_cursor type STRING optional - !I_include_audit type BOOLEAN default c_boolean_false + !I_PAGE_LIMIT type INTEGER optional + !I_SORT type STRING optional + !I_CURSOR type STRING optional + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_WORKSPACE_COLLECTION @@ -1216,18 +2196,23 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create workspace. "! - "! @parameter I_body | - "! The content of the new workspace. - "! + "! @parameter I_BODY | + "! The content of the new workspace.
+ "!
"! The maximum size for this data is 50MB. If you need to import a larger "! workspace, consider importing the workspace without intents and entities and "! then adding them separately. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_WORKSPACE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_WORKSPACE importing - !I_body type T_CREATE_WORKSPACE optional + !I_BODY type T_CREATE_WORKSPACE optional + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1236,29 +2221,30 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get information about a workspace. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_export | + "! @parameter I_EXPORT | "! Whether to include all element content in the returned data. If "! **export**=`false`, the returned data includes only information about the "! element itself. If **export**=`true`, all content, including subelements, is "! included. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. - "! @parameter I_sort | + "! @parameter I_SORT | "! Indicates how the returned workspace data will be sorted. This parameter is "! valid only if **export**=`true`. Specify `sort=stable` to sort all workspace "! objects by unique identifier, in ascending alphabetical order. "! @parameter E_RESPONSE | "! Service return value of type T_WORKSPACE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_WORKSPACE importing - !I_workspace_id type STRING - !I_export type BOOLEAN default c_boolean_false - !I_include_audit type BOOLEAN default c_boolean_false - !I_sort type STRING optional + !I_WORKSPACE_ID type STRING + !I_EXPORT type BOOLEAN default c_boolean_false + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false + !I_SORT type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_WORKSPACE @@ -1266,32 +2252,38 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update workspace. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_body | - "! Valid data defining the new and updated workspace content. - "! + "! @parameter I_BODY | + "! Valid data defining the new and updated workspace content.
+ "!
"! The maximum size for this data is 50MB. If you need to import a larger amount of "! workspace data, consider importing components such as intents and entities "! using separate operations. - "! @parameter I_append | - "! Whether the new data is to be appended to the existing data in the workspace. If + "! @parameter I_APPEND | + "! Whether the new data is to be appended to the existing data in the object. If "! **append**=`false`, elements included in the new data completely replace the "! corresponding existing elements, including all subelements. For example, if the - "! new data includes **entities** and **append**=`false`, all existing entities in - "! the workspace are discarded and replaced with the new entities. - "! + "! new data for a workspace includes **entities** and **append**=`false`, all + "! existing entities in the workspace are discarded and replaced with the new + "! entities.
+ "!
"! If **append**=`true`, existing elements are preserved, and the new elements are "! added. If any elements in the new data collide with existing elements, the "! update request fails. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_WORKSPACE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_WORKSPACE importing - !I_workspace_id type STRING - !I_body type T_UPDATE_WORKSPACE optional - !I_append type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_BODY type T_UPDATE_WORKSPACE optional + !I_APPEND type BOOLEAN default c_boolean_false + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1300,46 +2292,48 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete workspace. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_WORKSPACE importing - !I_workspace_id type STRING + !I_WORKSPACE_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List intents. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_export | + "! @parameter I_EXPORT | "! Whether to include all element content in the returned data. If "! **export**=`false`, the returned data includes only information about the "! element itself. If **export**=`true`, all content, including subelements, is "! included. - "! @parameter I_page_limit | + "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. - "! @parameter I_sort | + "! @parameter I_SORT | "! The attribute by which returned intents will be sorted. To reverse the sort "! order, prefix the value with a minus sign (`-`). - "! @parameter I_cursor | + "! @parameter I_CURSOR | "! A token identifying the page of results to retrieve. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_INTENT_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_INTENTS importing - !I_workspace_id type STRING - !I_export type BOOLEAN default c_boolean_false - !I_page_limit type INTEGER optional - !I_sort type STRING optional - !I_cursor type STRING optional - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_EXPORT type BOOLEAN default c_boolean_false + !I_PAGE_LIMIT type INTEGER optional + !I_SORT type STRING optional + !I_CURSOR type STRING optional + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_INTENT_COLLECTION @@ -1347,17 +2341,22 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create intent. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_body | + "! @parameter I_BODY | "! The content of the new intent. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_INTENT + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_INTENT importing - !I_workspace_id type STRING - !I_body type T_CREATE_INTENT + !I_WORKSPACE_ID type STRING + !I_BODY type T_CREATE_INTENT + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1366,27 +2365,28 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get intent. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_intent | + "! @parameter I_INTENT | "! The intent name. - "! @parameter I_export | + "! @parameter I_EXPORT | "! Whether to include all element content in the returned data. If "! **export**=`false`, the returned data includes only information about the "! element itself. If **export**=`true`, all content, including subelements, is "! included. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_INTENT + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_INTENT importing - !I_workspace_id type STRING - !I_intent type STRING - !I_export type BOOLEAN default c_boolean_false - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_INTENT type STRING + !I_EXPORT type BOOLEAN default c_boolean_false + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_INTENT @@ -1394,27 +2394,44 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update intent. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_intent | + "! @parameter I_INTENT | "! The intent name. - "! @parameter I_body | - "! The updated content of the intent. - "! + "! @parameter I_BODY | + "! The updated content of the intent.
+ "!
"! Any elements included in the new data will completely replace the equivalent "! existing elements, including all subelements. (Previously existing subelements "! are not retained unless they are also included in the new data.) For example, "! if you update the user input examples for an intent, the previously existing "! examples are discarded and replaced with the new examples specified in the "! update. + "! @parameter I_APPEND | + "! Whether the new data is to be appended to the existing data in the object. If + "! **append**=`false`, elements included in the new data completely replace the + "! corresponding existing elements, including all subelements. For example, if the + "! new data for the intent includes **examples** and **append**=`false`, all + "! existing examples for the intent are discarded and replaced with the new + "! examples.
+ "!
+ "! If **append**=`true`, existing elements are preserved, and the new elements are + "! added. If any elements in the new data collide with existing elements, the + "! update request fails. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_INTENT + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_INTENT importing - !I_workspace_id type STRING - !I_intent type STRING - !I_body type T_UPDATE_INTENT + !I_WORKSPACE_ID type STRING + !I_INTENT type STRING + !I_BODY type T_UPDATE_INTENT + !I_APPEND type BOOLEAN default c_boolean_false + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1423,46 +2440,48 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete intent. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_intent | + "! @parameter I_INTENT | "! The intent name. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_INTENT importing - !I_workspace_id type STRING - !I_intent type STRING + !I_WORKSPACE_ID type STRING + !I_INTENT type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List user input examples. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_intent | + "! @parameter I_INTENT | "! The intent name. - "! @parameter I_page_limit | + "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. - "! @parameter I_sort | + "! @parameter I_SORT | "! The attribute by which returned examples will be sorted. To reverse the sort "! order, prefix the value with a minus sign (`-`). - "! @parameter I_cursor | + "! @parameter I_CURSOR | "! A token identifying the page of results to retrieve. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_EXAMPLE_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_EXAMPLES importing - !I_workspace_id type STRING - !I_intent type STRING - !I_page_limit type INTEGER optional - !I_sort type STRING optional - !I_cursor type STRING optional - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_INTENT type STRING + !I_PAGE_LIMIT type INTEGER optional + !I_SORT type STRING optional + !I_CURSOR type STRING optional + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_EXAMPLE_COLLECTION @@ -1470,20 +2489,25 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create user input example. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_intent | + "! @parameter I_INTENT | "! The intent name. - "! @parameter I_body | + "! @parameter I_BODY | "! The content of the new user input example. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_EXAMPLE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_EXAMPLE importing - !I_workspace_id type STRING - !I_intent type STRING - !I_body type T_EXAMPLE + !I_WORKSPACE_ID type STRING + !I_INTENT type STRING + !I_BODY type T_EXAMPLE + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1492,24 +2516,25 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get user input example. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_intent | + "! @parameter I_INTENT | "! The intent name. - "! @parameter I_text | + "! @parameter I_TEXT | "! The text of the user input example. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_EXAMPLE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_EXAMPLE importing - !I_workspace_id type STRING - !I_intent type STRING - !I_text type STRING - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_INTENT type STRING + !I_TEXT type STRING + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_EXAMPLE @@ -1517,23 +2542,28 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update user input example. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_intent | + "! @parameter I_INTENT | "! The intent name. - "! @parameter I_text | + "! @parameter I_TEXT | "! The text of the user input example. - "! @parameter I_body | + "! @parameter I_BODY | "! The new text of the user input example. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_EXAMPLE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_EXAMPLE importing - !I_workspace_id type STRING - !I_intent type STRING - !I_text type STRING - !I_body type T_UPDATE_EXAMPLE + !I_WORKSPACE_ID type STRING + !I_INTENT type STRING + !I_TEXT type STRING + !I_BODY type T_UPDATE_EXAMPLE + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1542,46 +2572,48 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete user input example. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_intent | + "! @parameter I_INTENT | "! The intent name. - "! @parameter I_text | + "! @parameter I_TEXT | "! The text of the user input example. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_EXAMPLE importing - !I_workspace_id type STRING - !I_intent type STRING - !I_text type STRING + !I_WORKSPACE_ID type STRING + !I_INTENT type STRING + !I_TEXT type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List counterexamples. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_page_limit | + "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. - "! @parameter I_sort | + "! @parameter I_SORT | "! The attribute by which returned counterexamples will be sorted. To reverse the "! sort order, prefix the value with a minus sign (`-`). - "! @parameter I_cursor | + "! @parameter I_CURSOR | "! A token identifying the page of results to retrieve. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_COUNTEREXAMPLE_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_COUNTEREXAMPLES importing - !I_workspace_id type STRING - !I_page_limit type INTEGER optional - !I_sort type STRING optional - !I_cursor type STRING optional - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_PAGE_LIMIT type INTEGER optional + !I_SORT type STRING optional + !I_CURSOR type STRING optional + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_COUNTEREXAMPLE_COLLECTION @@ -1589,17 +2621,22 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create counterexample. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_body | + "! @parameter I_BODY | "! The content of the new counterexample. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_COUNTEREXAMPLE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_COUNTEREXAMPLE importing - !I_workspace_id type STRING - !I_body type T_COUNTEREXAMPLE + !I_WORKSPACE_ID type STRING + !I_BODY type T_COUNTEREXAMPLE + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1608,21 +2645,22 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get counterexample. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_text | + "! @parameter I_TEXT | "! The text of a user input counterexample (for example, `What are you wearing?`). - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_COUNTEREXAMPLE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_COUNTEREXAMPLE importing - !I_workspace_id type STRING - !I_text type STRING - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_TEXT type STRING + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_COUNTEREXAMPLE @@ -1630,20 +2668,25 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update counterexample. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_text | + "! @parameter I_TEXT | "! The text of a user input counterexample (for example, `What are you wearing?`). - "! @parameter I_body | + "! @parameter I_BODY | "! The text of the counterexample. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_COUNTEREXAMPLE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_COUNTEREXAMPLE importing - !I_workspace_id type STRING - !I_text type STRING - !I_body type T_UPDATE_COUNTEREXAMPLE + !I_WORKSPACE_ID type STRING + !I_TEXT type STRING + !I_BODY type T_UPDATE_COUNTEREXAMPLE + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1652,49 +2695,51 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete counterexample. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_text | + "! @parameter I_TEXT | "! The text of a user input counterexample (for example, `What are you wearing?`). + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_COUNTEREXAMPLE importing - !I_workspace_id type STRING - !I_text type STRING + !I_WORKSPACE_ID type STRING + !I_TEXT type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List entities. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_export | + "! @parameter I_EXPORT | "! Whether to include all element content in the returned data. If "! **export**=`false`, the returned data includes only information about the "! element itself. If **export**=`true`, all content, including subelements, is "! included. - "! @parameter I_page_limit | + "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. - "! @parameter I_sort | + "! @parameter I_SORT | "! The attribute by which returned entities will be sorted. To reverse the sort "! order, prefix the value with a minus sign (`-`). - "! @parameter I_cursor | + "! @parameter I_CURSOR | "! A token identifying the page of results to retrieve. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_ENTITY_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_ENTITIES importing - !I_workspace_id type STRING - !I_export type BOOLEAN default c_boolean_false - !I_page_limit type INTEGER optional - !I_sort type STRING optional - !I_cursor type STRING optional - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_EXPORT type BOOLEAN default c_boolean_false + !I_PAGE_LIMIT type INTEGER optional + !I_SORT type STRING optional + !I_CURSOR type STRING optional + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_ENTITY_COLLECTION @@ -1702,17 +2747,22 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create entity. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_body | + "! @parameter I_BODY | "! The content of the new entity. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_ENTITY + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_ENTITY importing - !I_workspace_id type STRING - !I_body type T_CREATE_ENTITY + !I_WORKSPACE_ID type STRING + !I_BODY type T_CREATE_ENTITY + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1721,27 +2771,28 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get entity. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_export | + "! @parameter I_EXPORT | "! Whether to include all element content in the returned data. If "! **export**=`false`, the returned data includes only information about the "! element itself. If **export**=`true`, all content, including subelements, is "! included. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_ENTITY + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_ENTITY importing - !I_workspace_id type STRING - !I_entity type STRING - !I_export type BOOLEAN default c_boolean_false - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_EXPORT type BOOLEAN default c_boolean_false + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_ENTITY @@ -1749,25 +2800,42 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update entity. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_body | + "! @parameter I_BODY | "! The updated content of the entity. Any elements included in the new data will "! completely replace the equivalent existing elements, including all subelements. "! (Previously existing subelements are not retained unless they are also included "! in the new data.) For example, if you update the values for an entity, the "! previously existing values are discarded and replaced with the new values "! specified in the update. + "! @parameter I_APPEND | + "! Whether the new data is to be appended to the existing data in the entity. If + "! **append**=`false`, elements included in the new data completely replace the + "! corresponding existing elements, including all subelements. For example, if the + "! new data for the entity includes **values** and **append**=`false`, all + "! existing values for the entity are discarded and replaced with the new + "! values.
+ "!
+ "! If **append**=`true`, existing elements are preserved, and the new elements are + "! added. If any elements in the new data collide with existing elements, the + "! update request fails. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_ENTITY + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_ENTITY importing - !I_workspace_id type STRING - !I_entity type STRING - !I_body type T_UPDATE_ENTITY + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_BODY type T_UPDATE_ENTITY + !I_APPEND type BOOLEAN default c_boolean_false + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1776,42 +2844,44 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete entity. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_ENTITY importing - !I_workspace_id type STRING - !I_entity type STRING + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List entity mentions. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_export | + "! @parameter I_EXPORT | "! Whether to include all element content in the returned data. If "! **export**=`false`, the returned data includes only information about the "! element itself. If **export**=`true`, all content, including subelements, is "! included. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_ENTITY_MENTION_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_MENTIONS importing - !I_workspace_id type STRING - !I_entity type STRING - !I_export type BOOLEAN default c_boolean_false - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_EXPORT type BOOLEAN default c_boolean_false + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_ENTITY_MENTION_COLLECTION @@ -1820,37 +2890,38 @@ constants: "! List entity values. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_export | + "! @parameter I_EXPORT | "! Whether to include all element content in the returned data. If "! **export**=`false`, the returned data includes only information about the "! element itself. If **export**=`true`, all content, including subelements, is "! included. - "! @parameter I_page_limit | + "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. - "! @parameter I_sort | + "! @parameter I_SORT | "! The attribute by which returned entity values will be sorted. To reverse the "! sort order, prefix the value with a minus sign (`-`). - "! @parameter I_cursor | + "! @parameter I_CURSOR | "! A token identifying the page of results to retrieve. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_VALUE_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_VALUES importing - !I_workspace_id type STRING - !I_entity type STRING - !I_export type BOOLEAN default c_boolean_false - !I_page_limit type INTEGER optional - !I_sort type STRING optional - !I_cursor type STRING optional - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_EXPORT type BOOLEAN default c_boolean_false + !I_PAGE_LIMIT type INTEGER optional + !I_SORT type STRING optional + !I_CURSOR type STRING optional + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_VALUE_COLLECTION @@ -1858,20 +2929,25 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create entity value. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_body | + "! @parameter I_BODY | "! The new entity value. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_VALUE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_VALUE importing - !I_workspace_id type STRING - !I_entity type STRING - !I_body type T_CREATE_VALUE + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_BODY type T_CREATE_VALUE + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1880,30 +2956,31 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get entity value. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_value | + "! @parameter I_VALUE | "! The text of the entity value. - "! @parameter I_export | + "! @parameter I_EXPORT | "! Whether to include all element content in the returned data. If "! **export**=`false`, the returned data includes only information about the "! element itself. If **export**=`true`, all content, including subelements, is "! included. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_VALUE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_VALUE importing - !I_workspace_id type STRING - !I_entity type STRING - !I_value type STRING - !I_export type BOOLEAN default c_boolean_false - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_VALUE type STRING + !I_EXPORT type BOOLEAN default c_boolean_false + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_VALUE @@ -1911,30 +2988,47 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update entity value. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_value | + "! @parameter I_VALUE | "! The text of the entity value. - "! @parameter I_body | - "! The updated content of the entity value. - "! + "! @parameter I_BODY | + "! The updated content of the entity value.
+ "!
"! Any elements included in the new data will completely replace the equivalent "! existing elements, including all subelements. (Previously existing subelements "! are not retained unless they are also included in the new data.) For example, "! if you update the synonyms for an entity value, the previously existing "! synonyms are discarded and replaced with the new synonyms specified in the "! update. + "! @parameter I_APPEND | + "! Whether the new data is to be appended to the existing data in the entity value. + "! If **append**=`false`, elements included in the new data completely replace the + "! corresponding existing elements, including all subelements. For example, if the + "! new data for the entity value includes **synonyms** and **append**=`false`, all + "! existing synonyms for the entity value are discarded and replaced with the new + "! synonyms.
+ "!
+ "! If **append**=`true`, existing elements are preserved, and the new elements are + "! added. If any elements in the new data collide with existing elements, the + "! update request fails. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_VALUE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_VALUE importing - !I_workspace_id type STRING - !I_entity type STRING - !I_value type STRING - !I_body type T_UPDATE_VALUE + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_VALUE type STRING + !I_BODY type T_UPDATE_VALUE + !I_APPEND type BOOLEAN default c_boolean_false + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1943,52 +3037,54 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete entity value. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_value | + "! @parameter I_VALUE | "! The text of the entity value. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_VALUE importing - !I_workspace_id type STRING - !I_entity type STRING - !I_value type STRING + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_VALUE type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List entity value synonyms. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_value | + "! @parameter I_VALUE | "! The text of the entity value. - "! @parameter I_page_limit | + "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. - "! @parameter I_sort | + "! @parameter I_SORT | "! The attribute by which returned entity value synonyms will be sorted. To reverse "! the sort order, prefix the value with a minus sign (`-`). - "! @parameter I_cursor | + "! @parameter I_CURSOR | "! A token identifying the page of results to retrieve. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_SYNONYM_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_SYNONYMS importing - !I_workspace_id type STRING - !I_entity type STRING - !I_value type STRING - !I_page_limit type INTEGER optional - !I_sort type STRING optional - !I_cursor type STRING optional - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_VALUE type STRING + !I_PAGE_LIMIT type INTEGER optional + !I_SORT type STRING optional + !I_CURSOR type STRING optional + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_SYNONYM_COLLECTION @@ -1996,23 +3092,28 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create entity value synonym. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_value | + "! @parameter I_VALUE | "! The text of the entity value. - "! @parameter I_body | + "! @parameter I_BODY | "! The new synonym. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_SYNONYM + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_SYNONYM importing - !I_workspace_id type STRING - !I_entity type STRING - !I_value type STRING - !I_body type T_SYNONYM + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_VALUE type STRING + !I_BODY type T_SYNONYM + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2021,27 +3122,28 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get entity value synonym. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_value | + "! @parameter I_VALUE | "! The text of the entity value. - "! @parameter I_synonym | + "! @parameter I_SYNONYM | "! The text of the synonym. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_SYNONYM + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_SYNONYM importing - !I_workspace_id type STRING - !I_entity type STRING - !I_value type STRING - !I_synonym type STRING - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_VALUE type STRING + !I_SYNONYM type STRING + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_SYNONYM @@ -2049,26 +3151,31 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update entity value synonym. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_value | + "! @parameter I_VALUE | "! The text of the entity value. - "! @parameter I_synonym | + "! @parameter I_SYNONYM | "! The text of the synonym. - "! @parameter I_body | + "! @parameter I_BODY | "! The updated entity value synonym. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_SYNONYM + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_SYNONYM importing - !I_workspace_id type STRING - !I_entity type STRING - !I_value type STRING - !I_synonym type STRING - !I_body type T_UPDATE_SYNONYM + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_VALUE type STRING + !I_SYNONYM type STRING + !I_BODY type T_UPDATE_SYNONYM + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2077,49 +3184,51 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete entity value synonym. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_entity | + "! @parameter I_ENTITY | "! The name of the entity. - "! @parameter I_value | + "! @parameter I_VALUE | "! The text of the entity value. - "! @parameter I_synonym | + "! @parameter I_SYNONYM | "! The text of the synonym. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_SYNONYM importing - !I_workspace_id type STRING - !I_entity type STRING - !I_value type STRING - !I_synonym type STRING + !I_WORKSPACE_ID type STRING + !I_ENTITY type STRING + !I_VALUE type STRING + !I_SYNONYM type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List dialog nodes. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_page_limit | + "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. - "! @parameter I_sort | + "! @parameter I_SORT | "! The attribute by which returned dialog nodes will be sorted. To reverse the sort "! order, prefix the value with a minus sign (`-`). - "! @parameter I_cursor | + "! @parameter I_CURSOR | "! A token identifying the page of results to retrieve. - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_DIALOG_NODE_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_DIALOG_NODES importing - !I_workspace_id type STRING - !I_page_limit type INTEGER optional - !I_sort type STRING optional - !I_cursor type STRING optional - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_PAGE_LIMIT type INTEGER optional + !I_SORT type STRING optional + !I_CURSOR type STRING optional + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_DIALOG_NODE_COLLECTION @@ -2127,17 +3236,22 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create dialog node. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_body | + "! @parameter I_BODY | "! A CreateDialogNode object defining the content of the new dialog node. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_DIALOG_NODE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_DIALOG_NODE importing - !I_workspace_id type STRING - !I_body type T_DIALOG_NODE + !I_WORKSPACE_ID type STRING + !I_BODY type T_DIALOG_NODE + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2146,21 +3260,22 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get dialog node. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_dialog_node | + "! @parameter I_DIALOG_NODE | "! The dialog node ID (for example, `get_order`). - "! @parameter I_include_audit | + "! @parameter I_INCLUDE_AUDIT | "! Whether to include the audit properties (`created` and `updated` timestamps) in "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_DIALOG_NODE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_DIALOG_NODE importing - !I_workspace_id type STRING - !I_dialog_node type STRING - !I_include_audit type BOOLEAN default c_boolean_false + !I_WORKSPACE_ID type STRING + !I_DIALOG_NODE type STRING + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_DIALOG_NODE @@ -2168,26 +3283,31 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update dialog node. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_dialog_node | + "! @parameter I_DIALOG_NODE | "! The dialog node ID (for example, `get_order`). - "! @parameter I_body | - "! The updated content of the dialog node. - "! + "! @parameter I_BODY | + "! The updated content of the dialog node.
+ "!
"! Any elements included in the new data will completely replace the equivalent "! existing elements, including all subelements. (Previously existing subelements "! are not retained unless they are also included in the new data.) For example, "! if you update the actions for a dialog node, the previously existing actions "! are discarded and replaced with the new actions specified in the update. + "! @parameter I_INCLUDE_AUDIT | + "! Whether to include the audit properties (`created` and `updated` timestamps) in + "! the response. "! @parameter E_RESPONSE | "! Service return value of type T_DIALOG_NODE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_DIALOG_NODE importing - !I_workspace_id type STRING - !I_dialog_node type STRING - !I_body type T_UPDATE_DIALOG_NODE + !I_WORKSPACE_ID type STRING + !I_DIALOG_NODE type STRING + !I_BODY type T_UPDATE_DIALOG_NODE + !I_INCLUDE_AUDIT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2196,45 +3316,47 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete dialog node. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_dialog_node | + "! @parameter I_DIALOG_NODE | "! The dialog node ID (for example, `get_order`). + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_DIALOG_NODE importing - !I_workspace_id type STRING - !I_dialog_node type STRING + !I_WORKSPACE_ID type STRING + !I_DIALOG_NODE type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List log events in a workspace. "! - "! @parameter I_workspace_id | + "! @parameter I_WORKSPACE_ID | "! Unique identifier of the workspace. - "! @parameter I_sort | + "! @parameter I_SORT | "! How to sort the returned log events. You can sort by **request_timestamp**. To "! reverse the sort order, prefix the parameter value with a minus sign (`-`). - "! @parameter I_filter | + "! @parameter I_FILTER | "! A cacheable parameter that limits the results to those matching the specified "! filter. For more information, see the - "! [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-f - "! ilter-reference#filter-reference). - "! @parameter I_page_limit | + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-ref + "! erence#filter-reference). + "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. - "! @parameter I_cursor | + "! @parameter I_CURSOR | "! A token identifying the page of results to retrieve. "! @parameter E_RESPONSE | "! Service return value of type T_LOG_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_LOGS importing - !I_workspace_id type STRING - !I_sort type STRING optional - !I_filter type STRING optional - !I_page_limit type INTEGER optional - !I_cursor type STRING optional + !I_WORKSPACE_ID type STRING + !I_SORT type STRING optional + !I_FILTER type STRING optional + !I_PAGE_LIMIT type INTEGER optional + !I_CURSOR type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_LOG_COLLECTION @@ -2242,29 +3364,30 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! List log events in all workspaces. "! - "! @parameter I_filter | + "! @parameter I_FILTER | "! A cacheable parameter that limits the results to those matching the specified "! filter. You must specify a filter query that includes a value for `language`, - "! as well as a value for `workspace_id` or `request.context.metadata.deployment`. - "! For more information, see the - "! [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-f - "! ilter-reference#filter-reference). - "! @parameter I_sort | + "! as well as a value for `request.context.system.assistant_id`, `workspace_id`, + "! or `request.context.metadata.deployment`. For more information, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-ref + "! erence#filter-reference). + "! @parameter I_SORT | "! How to sort the returned log events. You can sort by **request_timestamp**. To "! reverse the sort order, prefix the parameter value with a minus sign (`-`). - "! @parameter I_page_limit | + "! @parameter I_PAGE_LIMIT | "! The number of records to return in each page of results. - "! @parameter I_cursor | + "! @parameter I_CURSOR | "! A token identifying the page of results to retrieve. "! @parameter E_RESPONSE | "! Service return value of type T_LOG_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_ALL_LOGS importing - !I_filter type STRING - !I_sort type STRING optional - !I_page_limit type INTEGER optional - !I_cursor type STRING optional + !I_FILTER type STRING + !I_SORT type STRING optional + !I_PAGE_LIMIT type INTEGER optional + !I_CURSOR type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_LOG_COLLECTION @@ -2273,12 +3396,13 @@ constants: "! Delete labeled data. "! - "! @parameter I_customer_id | + "! @parameter I_CUSTOMER_ID | "! The customer ID for which all data is to be deleted. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_USER_DATA importing - !I_customer_id type STRING + !I_CUSTOMER_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . @@ -2319,7 +3443,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -2360,7 +3484,7 @@ endmethod. * +-------------------------------------------------------------------------------------- method get_sdk_version_date. - e_sdk_version_date = '20191002122834'. + e_sdk_version_date = '20200210092810'. endmethod. @@ -2369,9 +3493,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->MESSAGE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_body TYPE T_MESSAGE_REQUEST(optional) -* | [--->] I_nodes_visited_details TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_BODY TYPE T_MESSAGE_REQUEST(optional) +* | [--->] I_NODES_VISITED_DETAILS TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_MESSAGE_RESPONSE @@ -2387,7 +3511,7 @@ method MESSAGE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/message'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -2400,8 +3524,8 @@ method MESSAGE. data: lv_queryparam type string. - if i_nodes_visited_details is supplied. - lv_queryparam = i_nodes_visited_details. + if i_NODES_VISITED_DETAILS is supplied. + lv_queryparam = i_NODES_VISITED_DETAILS. add_query_parameter( exporting i_parameter = `nodes_visited_details` @@ -2422,21 +3546,21 @@ method MESSAGE. field-symbols: type any. lv_separator = ''. - if not i_body is initial. - lv_datatype = get_datatype( i_body ). + if not i_BODY is initial. + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -2472,10 +3596,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->LIST_WORKSPACES * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_page_limit TYPE INTEGER(optional) -* | [--->] I_sort TYPE STRING(optional) -* | [--->] I_cursor TYPE STRING(optional) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_SORT TYPE STRING(optional) +* | [--->] I_CURSOR TYPE STRING(optional) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_WORKSPACE_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2501,8 +3625,8 @@ method LIST_WORKSPACES. data: lv_queryparam type string. - if i_page_limit is supplied. - lv_queryparam = i_page_limit. + if i_PAGE_LIMIT is supplied. + lv_queryparam = i_PAGE_LIMIT. add_query_parameter( exporting i_parameter = `page_limit` @@ -2511,8 +3635,8 @@ method LIST_WORKSPACES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -2521,8 +3645,8 @@ method LIST_WORKSPACES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_cursor is supplied. - lv_queryparam = escape( val = i_cursor format = cl_abap_format=>e_uri_full ). + if i_CURSOR is supplied. + lv_queryparam = escape( val = i_CURSOR format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `cursor` @@ -2531,8 +3655,8 @@ method LIST_WORKSPACES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -2565,7 +3689,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->CREATE_WORKSPACE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_body TYPE T_CREATE_WORKSPACE(optional) +* | [--->] I_BODY TYPE T_CREATE_WORKSPACE(optional) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_WORKSPACE @@ -2589,7 +3714,20 @@ method CREATE_WORKSPACE. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -2602,21 +3740,21 @@ method CREATE_WORKSPACE. field-symbols: type any. lv_separator = ''. - if not i_body is initial. - lv_datatype = get_datatype( i_body ). + if not i_BODY is initial. + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -2651,10 +3789,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->GET_WORKSPACE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_export TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_sort TYPE STRING(optional) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_EXPORT TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_SORT TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_WORKSPACE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2669,7 +3807,7 @@ method GET_WORKSPACE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -2681,8 +3819,8 @@ method GET_WORKSPACE. data: lv_queryparam type string. - if i_export is supplied. - lv_queryparam = i_export. + if i_EXPORT is supplied. + lv_queryparam = i_EXPORT. add_query_parameter( exporting i_parameter = `export` @@ -2692,8 +3830,8 @@ method GET_WORKSPACE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -2703,8 +3841,8 @@ method GET_WORKSPACE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -2736,9 +3874,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->UPDATE_WORKSPACE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_body TYPE T_UPDATE_WORKSPACE(optional) -* | [--->] I_append TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_BODY TYPE T_UPDATE_WORKSPACE(optional) +* | [--->] I_APPEND TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_WORKSPACE @@ -2754,7 +3893,7 @@ method UPDATE_WORKSPACE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -2767,8 +3906,8 @@ method UPDATE_WORKSPACE. data: lv_queryparam type string. - if i_append is supplied. - lv_queryparam = i_append. + if i_APPEND is supplied. + lv_queryparam = i_APPEND. add_query_parameter( exporting i_parameter = `append` @@ -2778,6 +3917,17 @@ method UPDATE_WORKSPACE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + @@ -2789,21 +3939,21 @@ method UPDATE_WORKSPACE. field-symbols: type any. lv_separator = ''. - if not i_body is initial. - lv_datatype = get_datatype( i_body ). + if not i_BODY is initial. + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -2838,7 +3988,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->DELETE_WORKSPACE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING +* | [--->] I_WORKSPACE_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -2852,7 +4002,7 @@ method DELETE_WORKSPACE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -2878,12 +4028,12 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->LIST_INTENTS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_export TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_page_limit TYPE INTEGER(optional) -* | [--->] I_sort TYPE STRING(optional) -* | [--->] I_cursor TYPE STRING(optional) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_EXPORT TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_SORT TYPE STRING(optional) +* | [--->] I_CURSOR TYPE STRING(optional) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_INTENT_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2898,7 +4048,7 @@ method LIST_INTENTS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/intents'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -2910,8 +4060,8 @@ method LIST_INTENTS. data: lv_queryparam type string. - if i_export is supplied. - lv_queryparam = i_export. + if i_EXPORT is supplied. + lv_queryparam = i_EXPORT. add_query_parameter( exporting i_parameter = `export` @@ -2921,8 +4071,8 @@ method LIST_INTENTS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_page_limit is supplied. - lv_queryparam = i_page_limit. + if i_PAGE_LIMIT is supplied. + lv_queryparam = i_PAGE_LIMIT. add_query_parameter( exporting i_parameter = `page_limit` @@ -2931,8 +4081,8 @@ method LIST_INTENTS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -2941,8 +4091,8 @@ method LIST_INTENTS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_cursor is supplied. - lv_queryparam = escape( val = i_cursor format = cl_abap_format=>e_uri_full ). + if i_CURSOR is supplied. + lv_queryparam = escape( val = i_CURSOR format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `cursor` @@ -2951,8 +4101,8 @@ method LIST_INTENTS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -2985,8 +4135,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->CREATE_INTENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_body TYPE T_CREATE_INTENT +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_BODY TYPE T_CREATE_INTENT +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_INTENT @@ -3002,7 +4153,7 @@ method CREATE_INTENT. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/intents'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3011,7 +4162,20 @@ method CREATE_INTENT. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -3024,20 +4188,20 @@ method CREATE_INTENT. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3071,10 +4235,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->GET_INTENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_intent TYPE STRING -* | [--->] I_export TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_INTENT TYPE STRING +* | [--->] I_EXPORT TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_INTENT * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3089,8 +4253,8 @@ method GET_INTENT. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/intents/{intent}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{intent}` in ls_request_prop-url-path with i_intent ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{intent}` in ls_request_prop-url-path with i_INTENT ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3102,8 +4266,8 @@ method GET_INTENT. data: lv_queryparam type string. - if i_export is supplied. - lv_queryparam = i_export. + if i_EXPORT is supplied. + lv_queryparam = i_EXPORT. add_query_parameter( exporting i_parameter = `export` @@ -3113,8 +4277,8 @@ method GET_INTENT. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -3147,9 +4311,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->UPDATE_INTENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_intent TYPE STRING -* | [--->] I_body TYPE T_UPDATE_INTENT +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_INTENT TYPE STRING +* | [--->] I_BODY TYPE T_UPDATE_INTENT +* | [--->] I_APPEND TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_INTENT @@ -3165,8 +4331,8 @@ method UPDATE_INTENT. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/intents/{intent}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{intent}` in ls_request_prop-url-path with i_intent ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{intent}` in ls_request_prop-url-path with i_INTENT ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3175,7 +4341,31 @@ method UPDATE_INTENT. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + + if i_APPEND is supplied. + lv_queryparam = i_APPEND. + add_query_parameter( + exporting + i_parameter = `append` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -3188,20 +4378,20 @@ method UPDATE_INTENT. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3235,8 +4425,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->DELETE_INTENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_intent TYPE STRING +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_INTENT TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -3250,8 +4440,8 @@ method DELETE_INTENT. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/intents/{intent}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{intent}` in ls_request_prop-url-path with i_intent ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{intent}` in ls_request_prop-url-path with i_INTENT ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3277,12 +4467,12 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->LIST_EXAMPLES * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_intent TYPE STRING -* | [--->] I_page_limit TYPE INTEGER(optional) -* | [--->] I_sort TYPE STRING(optional) -* | [--->] I_cursor TYPE STRING(optional) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_INTENT TYPE STRING +* | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_SORT TYPE STRING(optional) +* | [--->] I_CURSOR TYPE STRING(optional) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_EXAMPLE_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3297,8 +4487,8 @@ method LIST_EXAMPLES. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/intents/{intent}/examples'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{intent}` in ls_request_prop-url-path with i_intent ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{intent}` in ls_request_prop-url-path with i_INTENT ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3310,8 +4500,8 @@ method LIST_EXAMPLES. data: lv_queryparam type string. - if i_page_limit is supplied. - lv_queryparam = i_page_limit. + if i_PAGE_LIMIT is supplied. + lv_queryparam = i_PAGE_LIMIT. add_query_parameter( exporting i_parameter = `page_limit` @@ -3320,8 +4510,8 @@ method LIST_EXAMPLES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -3330,8 +4520,8 @@ method LIST_EXAMPLES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_cursor is supplied. - lv_queryparam = escape( val = i_cursor format = cl_abap_format=>e_uri_full ). + if i_CURSOR is supplied. + lv_queryparam = escape( val = i_CURSOR format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `cursor` @@ -3340,8 +4530,8 @@ method LIST_EXAMPLES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -3374,9 +4564,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->CREATE_EXAMPLE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_intent TYPE STRING -* | [--->] I_body TYPE T_EXAMPLE +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_INTENT TYPE STRING +* | [--->] I_BODY TYPE T_EXAMPLE +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_EXAMPLE @@ -3392,8 +4583,8 @@ method CREATE_EXAMPLE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/intents/{intent}/examples'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{intent}` in ls_request_prop-url-path with i_intent ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{intent}` in ls_request_prop-url-path with i_INTENT ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3402,7 +4593,20 @@ method CREATE_EXAMPLE. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -3415,20 +4619,20 @@ method CREATE_EXAMPLE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3462,10 +4666,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->GET_EXAMPLE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_intent TYPE STRING -* | [--->] I_text TYPE STRING -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_INTENT TYPE STRING +* | [--->] I_TEXT TYPE STRING +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_EXAMPLE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3480,9 +4684,9 @@ method GET_EXAMPLE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/intents/{intent}/examples/{text}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{intent}` in ls_request_prop-url-path with i_intent ignoring case. - replace all occurrences of `{text}` in ls_request_prop-url-path with i_text ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{intent}` in ls_request_prop-url-path with i_INTENT ignoring case. + replace all occurrences of `{text}` in ls_request_prop-url-path with i_TEXT ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3494,8 +4698,8 @@ method GET_EXAMPLE. data: lv_queryparam type string. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -3528,10 +4732,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->UPDATE_EXAMPLE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_intent TYPE STRING -* | [--->] I_text TYPE STRING -* | [--->] I_body TYPE T_UPDATE_EXAMPLE +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_INTENT TYPE STRING +* | [--->] I_TEXT TYPE STRING +* | [--->] I_BODY TYPE T_UPDATE_EXAMPLE +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_EXAMPLE @@ -3547,9 +4752,9 @@ method UPDATE_EXAMPLE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/intents/{intent}/examples/{text}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{intent}` in ls_request_prop-url-path with i_intent ignoring case. - replace all occurrences of `{text}` in ls_request_prop-url-path with i_text ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{intent}` in ls_request_prop-url-path with i_INTENT ignoring case. + replace all occurrences of `{text}` in ls_request_prop-url-path with i_TEXT ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3558,7 +4763,20 @@ method UPDATE_EXAMPLE. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -3571,20 +4789,20 @@ method UPDATE_EXAMPLE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3618,9 +4836,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->DELETE_EXAMPLE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_intent TYPE STRING -* | [--->] I_text TYPE STRING +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_INTENT TYPE STRING +* | [--->] I_TEXT TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -3634,9 +4852,9 @@ method DELETE_EXAMPLE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/intents/{intent}/examples/{text}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{intent}` in ls_request_prop-url-path with i_intent ignoring case. - replace all occurrences of `{text}` in ls_request_prop-url-path with i_text ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{intent}` in ls_request_prop-url-path with i_INTENT ignoring case. + replace all occurrences of `{text}` in ls_request_prop-url-path with i_TEXT ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3662,11 +4880,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->LIST_COUNTEREXAMPLES * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_page_limit TYPE INTEGER(optional) -* | [--->] I_sort TYPE STRING(optional) -* | [--->] I_cursor TYPE STRING(optional) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_SORT TYPE STRING(optional) +* | [--->] I_CURSOR TYPE STRING(optional) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COUNTEREXAMPLE_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3681,7 +4899,7 @@ method LIST_COUNTEREXAMPLES. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/counterexamples'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3693,8 +4911,8 @@ method LIST_COUNTEREXAMPLES. data: lv_queryparam type string. - if i_page_limit is supplied. - lv_queryparam = i_page_limit. + if i_PAGE_LIMIT is supplied. + lv_queryparam = i_PAGE_LIMIT. add_query_parameter( exporting i_parameter = `page_limit` @@ -3703,8 +4921,8 @@ method LIST_COUNTEREXAMPLES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -3713,8 +4931,8 @@ method LIST_COUNTEREXAMPLES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_cursor is supplied. - lv_queryparam = escape( val = i_cursor format = cl_abap_format=>e_uri_full ). + if i_CURSOR is supplied. + lv_queryparam = escape( val = i_CURSOR format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `cursor` @@ -3723,8 +4941,8 @@ method LIST_COUNTEREXAMPLES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -3757,8 +4975,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->CREATE_COUNTEREXAMPLE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_body TYPE T_COUNTEREXAMPLE +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_BODY TYPE T_COUNTEREXAMPLE +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COUNTEREXAMPLE @@ -3774,7 +4993,7 @@ method CREATE_COUNTEREXAMPLE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/counterexamples'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3783,7 +5002,20 @@ method CREATE_COUNTEREXAMPLE. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -3796,20 +5028,20 @@ method CREATE_COUNTEREXAMPLE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3843,9 +5075,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->GET_COUNTEREXAMPLE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_text TYPE STRING -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_TEXT TYPE STRING +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COUNTEREXAMPLE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3860,8 +5092,8 @@ method GET_COUNTEREXAMPLE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/counterexamples/{text}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{text}` in ls_request_prop-url-path with i_text ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{text}` in ls_request_prop-url-path with i_TEXT ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3873,8 +5105,8 @@ method GET_COUNTEREXAMPLE. data: lv_queryparam type string. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -3907,9 +5139,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->UPDATE_COUNTEREXAMPLE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_text TYPE STRING -* | [--->] I_body TYPE T_UPDATE_COUNTEREXAMPLE +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_TEXT TYPE STRING +* | [--->] I_BODY TYPE T_UPDATE_COUNTEREXAMPLE +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COUNTEREXAMPLE @@ -3925,8 +5158,8 @@ method UPDATE_COUNTEREXAMPLE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/counterexamples/{text}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{text}` in ls_request_prop-url-path with i_text ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{text}` in ls_request_prop-url-path with i_TEXT ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3935,7 +5168,20 @@ method UPDATE_COUNTEREXAMPLE. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -3948,20 +5194,20 @@ method UPDATE_COUNTEREXAMPLE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3995,8 +5241,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->DELETE_COUNTEREXAMPLE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_text TYPE STRING +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_TEXT TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -4010,8 +5256,8 @@ method DELETE_COUNTEREXAMPLE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/counterexamples/{text}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{text}` in ls_request_prop-url-path with i_text ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{text}` in ls_request_prop-url-path with i_TEXT ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4037,12 +5283,12 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->LIST_ENTITIES * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_export TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_page_limit TYPE INTEGER(optional) -* | [--->] I_sort TYPE STRING(optional) -* | [--->] I_cursor TYPE STRING(optional) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_EXPORT TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_SORT TYPE STRING(optional) +* | [--->] I_CURSOR TYPE STRING(optional) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ENTITY_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4057,7 +5303,7 @@ method LIST_ENTITIES. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4069,8 +5315,8 @@ method LIST_ENTITIES. data: lv_queryparam type string. - if i_export is supplied. - lv_queryparam = i_export. + if i_EXPORT is supplied. + lv_queryparam = i_EXPORT. add_query_parameter( exporting i_parameter = `export` @@ -4080,8 +5326,8 @@ method LIST_ENTITIES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_page_limit is supplied. - lv_queryparam = i_page_limit. + if i_PAGE_LIMIT is supplied. + lv_queryparam = i_PAGE_LIMIT. add_query_parameter( exporting i_parameter = `page_limit` @@ -4090,8 +5336,8 @@ method LIST_ENTITIES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -4100,8 +5346,8 @@ method LIST_ENTITIES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_cursor is supplied. - lv_queryparam = escape( val = i_cursor format = cl_abap_format=>e_uri_full ). + if i_CURSOR is supplied. + lv_queryparam = escape( val = i_CURSOR format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `cursor` @@ -4110,8 +5356,8 @@ method LIST_ENTITIES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -4144,8 +5390,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->CREATE_ENTITY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_body TYPE T_CREATE_ENTITY +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_BODY TYPE T_CREATE_ENTITY +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ENTITY @@ -4161,7 +5408,7 @@ method CREATE_ENTITY. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -4170,7 +5417,20 @@ method CREATE_ENTITY. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -4183,20 +5443,20 @@ method CREATE_ENTITY. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -4230,10 +5490,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->GET_ENTITY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_export TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_EXPORT TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ENTITY * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4248,8 +5508,8 @@ method GET_ENTITY. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4261,8 +5521,8 @@ method GET_ENTITY. data: lv_queryparam type string. - if i_export is supplied. - lv_queryparam = i_export. + if i_EXPORT is supplied. + lv_queryparam = i_EXPORT. add_query_parameter( exporting i_parameter = `export` @@ -4272,8 +5532,8 @@ method GET_ENTITY. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -4306,9 +5566,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->UPDATE_ENTITY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_body TYPE T_UPDATE_ENTITY +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_BODY TYPE T_UPDATE_ENTITY +* | [--->] I_APPEND TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ENTITY @@ -4324,8 +5586,8 @@ method UPDATE_ENTITY. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -4334,7 +5596,31 @@ method UPDATE_ENTITY. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + + if i_APPEND is supplied. + lv_queryparam = i_APPEND. + add_query_parameter( + exporting + i_parameter = `append` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -4347,20 +5633,20 @@ method UPDATE_ENTITY. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -4394,8 +5680,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->DELETE_ENTITY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -4409,8 +5695,8 @@ method DELETE_ENTITY. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4436,10 +5722,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->LIST_MENTIONS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_export TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_EXPORT TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ENTITY_MENTION_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4454,8 +5740,8 @@ method LIST_MENTIONS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}/mentions'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4467,8 +5753,8 @@ method LIST_MENTIONS. data: lv_queryparam type string. - if i_export is supplied. - lv_queryparam = i_export. + if i_EXPORT is supplied. + lv_queryparam = i_EXPORT. add_query_parameter( exporting i_parameter = `export` @@ -4478,8 +5764,8 @@ method LIST_MENTIONS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -4513,13 +5799,13 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->LIST_VALUES * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_export TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_page_limit TYPE INTEGER(optional) -* | [--->] I_sort TYPE STRING(optional) -* | [--->] I_cursor TYPE STRING(optional) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_EXPORT TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_SORT TYPE STRING(optional) +* | [--->] I_CURSOR TYPE STRING(optional) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_VALUE_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4534,8 +5820,8 @@ method LIST_VALUES. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}/values'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4547,8 +5833,8 @@ method LIST_VALUES. data: lv_queryparam type string. - if i_export is supplied. - lv_queryparam = i_export. + if i_EXPORT is supplied. + lv_queryparam = i_EXPORT. add_query_parameter( exporting i_parameter = `export` @@ -4558,8 +5844,8 @@ method LIST_VALUES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_page_limit is supplied. - lv_queryparam = i_page_limit. + if i_PAGE_LIMIT is supplied. + lv_queryparam = i_PAGE_LIMIT. add_query_parameter( exporting i_parameter = `page_limit` @@ -4568,8 +5854,8 @@ method LIST_VALUES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -4578,8 +5864,8 @@ method LIST_VALUES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_cursor is supplied. - lv_queryparam = escape( val = i_cursor format = cl_abap_format=>e_uri_full ). + if i_CURSOR is supplied. + lv_queryparam = escape( val = i_CURSOR format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `cursor` @@ -4588,8 +5874,8 @@ method LIST_VALUES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -4622,9 +5908,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->CREATE_VALUE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_body TYPE T_CREATE_VALUE +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_BODY TYPE T_CREATE_VALUE +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_VALUE @@ -4640,8 +5927,8 @@ method CREATE_VALUE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}/values'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -4650,7 +5937,20 @@ method CREATE_VALUE. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -4663,20 +5963,20 @@ method CREATE_VALUE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -4710,11 +6010,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->GET_VALUE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_value TYPE STRING -* | [--->] I_export TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_VALUE TYPE STRING +* | [--->] I_EXPORT TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_VALUE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4729,9 +6029,9 @@ method GET_VALUE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. - replace all occurrences of `{value}` in ls_request_prop-url-path with i_value ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. + replace all occurrences of `{value}` in ls_request_prop-url-path with i_VALUE ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4743,8 +6043,8 @@ method GET_VALUE. data: lv_queryparam type string. - if i_export is supplied. - lv_queryparam = i_export. + if i_EXPORT is supplied. + lv_queryparam = i_EXPORT. add_query_parameter( exporting i_parameter = `export` @@ -4754,8 +6054,8 @@ method GET_VALUE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -4788,10 +6088,12 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->UPDATE_VALUE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_value TYPE STRING -* | [--->] I_body TYPE T_UPDATE_VALUE +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_VALUE TYPE STRING +* | [--->] I_BODY TYPE T_UPDATE_VALUE +* | [--->] I_APPEND TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_VALUE @@ -4807,9 +6109,9 @@ method UPDATE_VALUE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. - replace all occurrences of `{value}` in ls_request_prop-url-path with i_value ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. + replace all occurrences of `{value}` in ls_request_prop-url-path with i_VALUE ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -4818,7 +6120,31 @@ method UPDATE_VALUE. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + + if i_APPEND is supplied. + lv_queryparam = i_APPEND. + add_query_parameter( + exporting + i_parameter = `append` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -4831,20 +6157,20 @@ method UPDATE_VALUE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -4878,9 +6204,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->DELETE_VALUE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_value TYPE STRING +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_VALUE TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -4894,9 +6220,9 @@ method DELETE_VALUE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. - replace all occurrences of `{value}` in ls_request_prop-url-path with i_value ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. + replace all occurrences of `{value}` in ls_request_prop-url-path with i_VALUE ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4922,13 +6248,13 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->LIST_SYNONYMS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_value TYPE STRING -* | [--->] I_page_limit TYPE INTEGER(optional) -* | [--->] I_sort TYPE STRING(optional) -* | [--->] I_cursor TYPE STRING(optional) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_VALUE TYPE STRING +* | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_SORT TYPE STRING(optional) +* | [--->] I_CURSOR TYPE STRING(optional) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_SYNONYM_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4943,9 +6269,9 @@ method LIST_SYNONYMS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}/synonyms'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. - replace all occurrences of `{value}` in ls_request_prop-url-path with i_value ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. + replace all occurrences of `{value}` in ls_request_prop-url-path with i_VALUE ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4957,8 +6283,8 @@ method LIST_SYNONYMS. data: lv_queryparam type string. - if i_page_limit is supplied. - lv_queryparam = i_page_limit. + if i_PAGE_LIMIT is supplied. + lv_queryparam = i_PAGE_LIMIT. add_query_parameter( exporting i_parameter = `page_limit` @@ -4967,8 +6293,8 @@ method LIST_SYNONYMS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -4977,8 +6303,8 @@ method LIST_SYNONYMS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_cursor is supplied. - lv_queryparam = escape( val = i_cursor format = cl_abap_format=>e_uri_full ). + if i_CURSOR is supplied. + lv_queryparam = escape( val = i_CURSOR format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `cursor` @@ -4987,8 +6313,8 @@ method LIST_SYNONYMS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -5021,10 +6347,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->CREATE_SYNONYM * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_value TYPE STRING -* | [--->] I_body TYPE T_SYNONYM +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_VALUE TYPE STRING +* | [--->] I_BODY TYPE T_SYNONYM +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_SYNONYM @@ -5040,9 +6367,9 @@ method CREATE_SYNONYM. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}/synonyms'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. - replace all occurrences of `{value}` in ls_request_prop-url-path with i_value ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. + replace all occurrences of `{value}` in ls_request_prop-url-path with i_VALUE ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -5051,7 +6378,20 @@ method CREATE_SYNONYM. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -5064,20 +6404,20 @@ method CREATE_SYNONYM. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -5111,11 +6451,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->GET_SYNONYM * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_value TYPE STRING -* | [--->] I_synonym TYPE STRING -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_VALUE TYPE STRING +* | [--->] I_SYNONYM TYPE STRING +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_SYNONYM * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -5130,10 +6470,10 @@ method GET_SYNONYM. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}/synonyms/{synonym}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. - replace all occurrences of `{value}` in ls_request_prop-url-path with i_value ignoring case. - replace all occurrences of `{synonym}` in ls_request_prop-url-path with i_synonym ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. + replace all occurrences of `{value}` in ls_request_prop-url-path with i_VALUE ignoring case. + replace all occurrences of `{synonym}` in ls_request_prop-url-path with i_SYNONYM ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -5145,8 +6485,8 @@ method GET_SYNONYM. data: lv_queryparam type string. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -5179,11 +6519,12 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->UPDATE_SYNONYM * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_value TYPE STRING -* | [--->] I_synonym TYPE STRING -* | [--->] I_body TYPE T_UPDATE_SYNONYM +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_VALUE TYPE STRING +* | [--->] I_SYNONYM TYPE STRING +* | [--->] I_BODY TYPE T_UPDATE_SYNONYM +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_SYNONYM @@ -5199,10 +6540,10 @@ method UPDATE_SYNONYM. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}/synonyms/{synonym}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. - replace all occurrences of `{value}` in ls_request_prop-url-path with i_value ignoring case. - replace all occurrences of `{synonym}` in ls_request_prop-url-path with i_synonym ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. + replace all occurrences of `{value}` in ls_request_prop-url-path with i_VALUE ignoring case. + replace all occurrences of `{synonym}` in ls_request_prop-url-path with i_SYNONYM ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -5211,7 +6552,20 @@ method UPDATE_SYNONYM. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -5224,20 +6578,20 @@ method UPDATE_SYNONYM. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -5271,10 +6625,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->DELETE_SYNONYM * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_entity TYPE STRING -* | [--->] I_value TYPE STRING -* | [--->] I_synonym TYPE STRING +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_ENTITY TYPE STRING +* | [--->] I_VALUE TYPE STRING +* | [--->] I_SYNONYM TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -5288,10 +6642,10 @@ method DELETE_SYNONYM. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}/synonyms/{synonym}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{entity}` in ls_request_prop-url-path with i_entity ignoring case. - replace all occurrences of `{value}` in ls_request_prop-url-path with i_value ignoring case. - replace all occurrences of `{synonym}` in ls_request_prop-url-path with i_synonym ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{entity}` in ls_request_prop-url-path with i_ENTITY ignoring case. + replace all occurrences of `{value}` in ls_request_prop-url-path with i_VALUE ignoring case. + replace all occurrences of `{synonym}` in ls_request_prop-url-path with i_SYNONYM ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -5317,11 +6671,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->LIST_DIALOG_NODES * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_page_limit TYPE INTEGER(optional) -* | [--->] I_sort TYPE STRING(optional) -* | [--->] I_cursor TYPE STRING(optional) -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_SORT TYPE STRING(optional) +* | [--->] I_CURSOR TYPE STRING(optional) +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DIALOG_NODE_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -5336,7 +6690,7 @@ method LIST_DIALOG_NODES. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/dialog_nodes'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -5348,8 +6702,8 @@ method LIST_DIALOG_NODES. data: lv_queryparam type string. - if i_page_limit is supplied. - lv_queryparam = i_page_limit. + if i_PAGE_LIMIT is supplied. + lv_queryparam = i_PAGE_LIMIT. add_query_parameter( exporting i_parameter = `page_limit` @@ -5358,8 +6712,8 @@ method LIST_DIALOG_NODES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -5368,8 +6722,8 @@ method LIST_DIALOG_NODES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_cursor is supplied. - lv_queryparam = escape( val = i_cursor format = cl_abap_format=>e_uri_full ). + if i_CURSOR is supplied. + lv_queryparam = escape( val = i_CURSOR format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `cursor` @@ -5378,8 +6732,8 @@ method LIST_DIALOG_NODES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -5412,8 +6766,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->CREATE_DIALOG_NODE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_body TYPE T_DIALOG_NODE +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_BODY TYPE T_DIALOG_NODE +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DIALOG_NODE @@ -5429,7 +6784,7 @@ method CREATE_DIALOG_NODE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/dialog_nodes'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -5438,7 +6793,20 @@ method CREATE_DIALOG_NODE. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -5451,20 +6819,20 @@ method CREATE_DIALOG_NODE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -5498,9 +6866,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->GET_DIALOG_NODE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_dialog_node TYPE STRING -* | [--->] I_include_audit TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_DIALOG_NODE TYPE STRING +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DIALOG_NODE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -5515,8 +6883,8 @@ method GET_DIALOG_NODE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/dialog_nodes/{dialog_node}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{dialog_node}` in ls_request_prop-url-path with i_dialog_node ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{dialog_node}` in ls_request_prop-url-path with i_DIALOG_NODE ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -5528,8 +6896,8 @@ method GET_DIALOG_NODE. data: lv_queryparam type string. - if i_include_audit is supplied. - lv_queryparam = i_include_audit. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. add_query_parameter( exporting i_parameter = `include_audit` @@ -5562,9 +6930,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->UPDATE_DIALOG_NODE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_dialog_node TYPE STRING -* | [--->] I_body TYPE T_UPDATE_DIALOG_NODE +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_DIALOG_NODE TYPE STRING +* | [--->] I_BODY TYPE T_UPDATE_DIALOG_NODE +* | [--->] I_INCLUDE_AUDIT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DIALOG_NODE @@ -5580,8 +6949,8 @@ method UPDATE_DIALOG_NODE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/dialog_nodes/{dialog_node}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{dialog_node}` in ls_request_prop-url-path with i_dialog_node ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{dialog_node}` in ls_request_prop-url-path with i_DIALOG_NODE ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -5590,7 +6959,20 @@ method UPDATE_DIALOG_NODE. changing c_url = ls_request_prop-url ). + " process query parameters + data: + lv_queryparam type string. + if i_INCLUDE_AUDIT is supplied. + lv_queryparam = i_INCLUDE_AUDIT. + add_query_parameter( + exporting + i_parameter = `include_audit` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. @@ -5603,20 +6985,20 @@ method UPDATE_DIALOG_NODE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -5650,8 +7032,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->DELETE_DIALOG_NODE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_dialog_node TYPE STRING +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_DIALOG_NODE TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -5665,8 +7047,8 @@ method DELETE_DIALOG_NODE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/dialog_nodes/{dialog_node}'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. - replace all occurrences of `{dialog_node}` in ls_request_prop-url-path with i_dialog_node ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. + replace all occurrences of `{dialog_node}` in ls_request_prop-url-path with i_DIALOG_NODE ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -5692,11 +7074,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->LIST_LOGS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_workspace_id TYPE STRING -* | [--->] I_sort TYPE STRING(optional) -* | [--->] I_filter TYPE STRING(optional) -* | [--->] I_page_limit TYPE INTEGER(optional) -* | [--->] I_cursor TYPE STRING(optional) +* | [--->] I_WORKSPACE_ID TYPE STRING +* | [--->] I_SORT TYPE STRING(optional) +* | [--->] I_FILTER TYPE STRING(optional) +* | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_CURSOR TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_LOG_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -5711,7 +7093,7 @@ method LIST_LOGS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/workspaces/{workspace_id}/logs'. - replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_workspace_id ignoring case. + replace all occurrences of `{workspace_id}` in ls_request_prop-url-path with i_WORKSPACE_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -5723,8 +7105,8 @@ method LIST_LOGS. data: lv_queryparam type string. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -5733,8 +7115,8 @@ method LIST_LOGS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_filter is supplied. - lv_queryparam = escape( val = i_filter format = cl_abap_format=>e_uri_full ). + if i_FILTER is supplied. + lv_queryparam = escape( val = i_FILTER format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `filter` @@ -5743,8 +7125,8 @@ method LIST_LOGS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_page_limit is supplied. - lv_queryparam = i_page_limit. + if i_PAGE_LIMIT is supplied. + lv_queryparam = i_PAGE_LIMIT. add_query_parameter( exporting i_parameter = `page_limit` @@ -5753,8 +7135,8 @@ method LIST_LOGS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_cursor is supplied. - lv_queryparam = escape( val = i_cursor format = cl_abap_format=>e_uri_full ). + if i_CURSOR is supplied. + lv_queryparam = escape( val = i_CURSOR format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `cursor` @@ -5786,10 +7168,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->LIST_ALL_LOGS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_filter TYPE STRING -* | [--->] I_sort TYPE STRING(optional) -* | [--->] I_page_limit TYPE INTEGER(optional) -* | [--->] I_cursor TYPE STRING(optional) +* | [--->] I_FILTER TYPE STRING +* | [--->] I_SORT TYPE STRING(optional) +* | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_CURSOR TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_LOG_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -5815,7 +7197,7 @@ method LIST_ALL_LOGS. data: lv_queryparam type string. - lv_queryparam = escape( val = i_filter format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_FILTER format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `filter` @@ -5823,8 +7205,8 @@ method LIST_ALL_LOGS. changing c_url = ls_request_prop-url ) ##NO_TEXT. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -5833,8 +7215,8 @@ method LIST_ALL_LOGS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_page_limit is supplied. - lv_queryparam = i_page_limit. + if i_PAGE_LIMIT is supplied. + lv_queryparam = i_PAGE_LIMIT. add_query_parameter( exporting i_parameter = `page_limit` @@ -5843,8 +7225,8 @@ method LIST_ALL_LOGS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_cursor is supplied. - lv_queryparam = escape( val = i_cursor format = cl_abap_format=>e_uri_full ). + if i_CURSOR is supplied. + lv_queryparam = escape( val = i_CURSOR format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `cursor` @@ -5877,7 +7259,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V1->DELETE_USER_DATA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customer_id TYPE STRING +* | [--->] I_CUSTOMER_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -5902,7 +7284,7 @@ method DELETE_USER_DATA. data: lv_queryparam type string. - lv_queryparam = escape( val = i_customer_id format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_CUSTOMER_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `customer_id` diff --git a/src/zcl_ibmc_assistant_v2.clas.abap b/src/zcl_ibmc_assistant_v2.clas.abap index da00af5..469d2d8 100644 --- a/src/zcl_ibmc_assistant_v2.clas.abap +++ b/src/zcl_ibmc_assistant_v2.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,8 +14,8 @@ "!

Watson Assistant v2

"! The IBM Watson™ Assistant service combines machine learning, natural "! language understanding, and an integrated dialog editor to create conversation -"! flows between your apps and your users. -"! +"! flows between your apps and your users.
+"!
"! The Assistant v2 API provides runtime methods your client application can use to "! send user input to an assistant and receive a response.
class ZCL_IBMC_ASSISTANT_V2 DEFINITION @@ -27,342 +27,709 @@ public section. types: "! Dialog log message details. begin of T_DIALOG_LOG_MESSAGE, + "! The severity of the log message. LEVEL type STRING, + "! The text of the log message. MESSAGE type STRING, end of T_DIALOG_LOG_MESSAGE. types: - "! + "! No documentation available. begin of T_DIALOG_NODES_VISITED, + "! A dialog node that was triggered during processing of the input message. DIALOG_NODE type STRING, + "! The title of the dialog node. TITLE type STRING, + "! The conditions that trigger the dialog node. CONDITIONS type STRING, end of T_DIALOG_NODES_VISITED. types: "! Additional detailed information about a message response and how it was "! generated. begin of T_MESSAGE_OUTPUT_DEBUG, + "! An array of objects containing detailed diagnostic information about the nodes + "! that were triggered during processing of the input message. NODES_VISITED type STANDARD TABLE OF T_DIALOG_NODES_VISITED WITH NON-UNIQUE DEFAULT KEY, + "! An array of up to 50 messages logged with the request. LOG_MESSAGES type STANDARD TABLE OF T_DIALOG_LOG_MESSAGE WITH NON-UNIQUE DEFAULT KEY, + "! Assistant sets this to true when this message response concludes or interrupts a + "! dialog. BRANCH_EXITED type BOOLEAN, + "! When `branch_exited` is set to `true` by the Assistant, the + "! `branch_exited_reason` specifies whether the dialog completed by itself or got + "! interrupted. BRANCH_EXITED_REASON type STRING, end of T_MESSAGE_OUTPUT_DEBUG. types: - "! + "! No documentation available. T_EMPTY_RESPONSE type JSONOBJECT. types: - "! + "! No documentation available. begin of T_SESSION_RESPONSE, + "! The session ID. SESSION_ID type STRING, end of T_SESSION_RESPONSE. types: - "! + "! No documentation available. begin of T_RT_ENTTY_INTRPRTTN_SYS_NUM, + "! A recognized numeric value, represented as an integer or double. NUMERIC_VALUE type NUMBER, + "! A unique identifier used to associate multiple recognized `@sys-date`, + "! `@sys-time`, or `@sys-number` entities that are recognized as a range of values + "! in the user's input (for example, `from July 4 until July 14` or `from 20 to + "! 25`). RANGE_LINK type STRING, + "! The type of numeric value recognized in the user input (`integer` or + "! `rational`). SUBTYPE type STRING, end of T_RT_ENTTY_INTRPRTTN_SYS_NUM. types: "! An alternative value for the recognized entity. begin of T_RUNTIME_ENTITY_ALTERNATIVE, + "! The entity value that was recognized in the user input. VALUE type STRING, + "! A decimal percentage that represents Watson's confidence in the recognized + "! entity. CONFIDENCE type NUMBER, end of T_RUNTIME_ENTITY_ALTERNATIVE. + types: + "! An object describing the role played by a system entity that is specifies the + "! beginning or end of a range recognized in the user input. This property is + "! included only if the new system entities are enabled for the skill. + begin of T_RUNTIME_ENTITY_ROLE, + "! The relationship of the entity to the range. + TYPE type STRING, + end of T_RUNTIME_ENTITY_ROLE. + types: + "! No documentation available. + begin of T_RT_ENTITY_INTERPRETATION, + "! The calendar used to represent a recognized date (for example, `Gregorian`). + CALENDAR_TYPE type STRING, + "! A unique identifier used to associate a recognized time and date. If the user + "! input contains a date and time that are mentioned together (for example, `Today + "! at 5`, the same **datetime_link** value is returned for both the `@sys-date` + "! and `@sys-time` entities). + DATETIME_LINK type STRING, + "! A locale-specific holiday name (such as `thanksgiving` or `christmas`). This + "! property is included when a `@sys-date` entity is recognized based on a holiday + "! name in the user input. + FESTIVAL type STRING, + "! The precision or duration of a time range specified by a recognized `@sys-time` + "! or `@sys-date` entity. + GRANULARITY type STRING, + "! A unique identifier used to associate multiple recognized `@sys-date`, + "! `@sys-time`, or `@sys-number` entities that are recognized as a range of values + "! in the user's input (for example, `from July 4 until July 14` or `from 20 to + "! 25`). + RANGE_LINK type STRING, + "! The word in the user input that indicates that a `sys-date` or `sys-time` entity + "! is part of an implied range where only one date or time is specified (for + "! example, `since` or `until`). + RANGE_MODIFIER type STRING, + "! A recognized mention of a relative day, represented numerically as an offset + "! from the current date (for example, `-1` for `yesterday` or `10` for `in ten + "! days`). + RELATIVE_DAY type NUMBER, + "! A recognized mention of a relative month, represented numerically as an offset + "! from the current month (for example, `1` for `next month` or `-3` for `three + "! months ago`). + RELATIVE_MONTH type NUMBER, + "! A recognized mention of a relative week, represented numerically as an offset + "! from the current week (for example, `2` for `in two weeks` or `-1` for `last + "! week). + RELATIVE_WEEK type NUMBER, + "! A recognized mention of a relative date range for a weekend, represented + "! numerically as an offset from the current weekend (for example, `0` for `this + "! weekend` or `-1` for `last weekend`). + RELATIVE_WEEKEND type NUMBER, + "! A recognized mention of a relative year, represented numerically as an offset + "! from the current year (for example, `1` for `next year` or `-5` for `five years + "! ago`). + RELATIVE_YEAR type NUMBER, + "! A recognized mention of a specific date, represented numerically as the date + "! within the month (for example, `30` for `June 30`.). + SPECIFIC_DAY type NUMBER, + "! A recognized mention of a specific day of the week as a lowercase string (for + "! example, `monday`). + SPECIFIC_DAY_OF_WEEK type STRING, + "! A recognized mention of a specific month, represented numerically (for example, + "! `7` for `July`). + SPECIFIC_MONTH type NUMBER, + "! A recognized mention of a specific quarter, represented numerically (for + "! example, `3` for `the third quarter`). + SPECIFIC_QUARTER type NUMBER, + "! A recognized mention of a specific year (for example, `2016`). + SPECIFIC_YEAR type NUMBER, + "! A recognized numeric value, represented as an integer or double. + NUMERIC_VALUE type NUMBER, + "! The type of numeric value recognized in the user input (`integer` or + "! `rational`). + SUBTYPE type STRING, + "! A recognized term for a time that was mentioned as a part of the day in the + "! user's input (for example, `morning` or `afternoon`). + PART_OF_DAY type STRING, + "! A recognized mention of a relative hour, represented numerically as an offset + "! from the current hour (for example, `3` for `in three hours` or `-1` for `an + "! hour ago`). + RELATIVE_HOUR type NUMBER, + "! A recognized mention of a relative time, represented numerically as an offset in + "! minutes from the current time (for example, `5` for `in five minutes` or `-15` + "! for `fifteen minutes ago`). + RELATIVE_MINUTE type NUMBER, + "! A recognized mention of a relative time, represented numerically as an offset in + "! seconds from the current time (for example, `10` for `in ten seconds` or `-30` + "! for `thirty seconds ago`). + RELATIVE_SECOND type NUMBER, + "! A recognized specific hour mentioned as part of a time value (for example, `10` + "! for `10:15 AM`.). + SPECIFIC_HOUR type NUMBER, + "! A recognized specific minute mentioned as part of a time value (for example, + "! `15` for `10:15 AM`.). + SPECIFIC_MINUTE type NUMBER, + "! A recognized specific second mentioned as part of a time value (for example, + "! `30` for `10:15:30 AM`.). + SPECIFIC_SECOND type NUMBER, + "! A recognized time zone mentioned as part of a time value (for example, `EST`). + TIMEZONE type STRING, + end of T_RT_ENTITY_INTERPRETATION. types: "! Optional properties that control how the assistant responds. begin of T_MESSAGE_INPUT_OPTIONS, + "! Whether to return additional diagnostic information. Set to `true` to return + "! additional information under the `output.debug` key. DEBUG type BOOLEAN, + "! Whether to restart dialog processing at the root of the dialog, regardless of + "! any previously visited nodes. **Note:** This does not affect `turn_count` or + "! any other context variables. RESTART type BOOLEAN, + "! Whether to return more than one intent. Set to `true` to return all matching + "! intents. ALTERNATE_INTENTS type BOOLEAN, + "! Whether to return session context with the response. If you specify `true`, the + "! response will include the `context` property. RETURN_CONTEXT type BOOLEAN, end of T_MESSAGE_INPUT_OPTIONS. types: "! An intent identified in the user input. begin of T_RUNTIME_INTENT, + "! The name of the recognized intent. INTENT type STRING, + "! A decimal percentage that represents Watson's confidence in the intent. CONFIDENCE type DOUBLE, end of T_RUNTIME_INTENT. types: - "! + "! No documentation available. begin of T_CAPTURE_GROUP, + "! A recognized capture group for the entity. GROUP type STRING, + "! Zero-based character offsets that indicate where the entity value begins and + "! ends in the input text. LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, end of T_CAPTURE_GROUP. types: "! The entity value that was recognized in the user input. begin of T_RUNTIME_ENTITY, + "! An entity detected in the input. ENTITY type STRING, + "! An array of zero-based character offsets that indicate where the detected entity + "! values begin and end in the input text. LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, + "! The term in the input text that was recognized as an entity value. VALUE type STRING, + "! A decimal percentage that represents Watson's confidence in the recognized + "! entity. CONFIDENCE type NUMBER, + "! Any metadata for the entity. METADATA type MAP, + "! The recognized capture groups for the entity, as defined by the entity pattern. GROUPS type STANDARD TABLE OF T_CAPTURE_GROUP WITH NON-UNIQUE DEFAULT KEY, + "! An object containing detailed information about the entity recognized in the + "! user input. This property is included only if the new system entities are + "! enabled for the skill.
+ "!
+ "! For more information about how the new system entities are interpreted, see the + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-beta-syste + "! m-entities). + INTERPRETATION type T_RT_ENTITY_INTERPRETATION, + "! An array of possible alternative values that the user might have intended + "! instead of the value returned in the **value** property. This property is + "! returned only for `@sys-time` and `@sys-date` entities when the user's input is + "! ambiguous.
+ "!
+ "! This property is included only if the new system entities are enabled for the + "! skill. + ALTERNATIVES type STANDARD TABLE OF T_RUNTIME_ENTITY_ALTERNATIVE WITH NON-UNIQUE DEFAULT KEY, + "! An object describing the role played by a system entity that is specifies the + "! beginning or end of a range recognized in the user input. This property is + "! included only if the new system entities are enabled for the skill. + ROLE type T_RUNTIME_ENTITY_ROLE, end of T_RUNTIME_ENTITY. types: "! An input object that includes the input text. begin of T_MESSAGE_INPUT, + "! The type of user input. Currently, only text input is supported. MESSAGE_TYPE type STRING, + "! The text of the user input. This string cannot contain carriage return, newline, + "! or tab characters. TEXT type STRING, + "! Optional properties that control how the assistant responds. OPTIONS type T_MESSAGE_INPUT_OPTIONS, + "! Intents to use when evaluating the user input. Include intents from the previous + "! response to continue using those intents rather than trying to recognize + "! intents in the new input. INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! Entities to use when evaluating the message. Include entities from the previous + "! response to continue using those entities rather than detecting entities in the + "! new input. ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! For internal use only. SUGGESTION_ID type STRING, end of T_MESSAGE_INPUT. types: "! An object defining the message input to be sent to the assistant if the user "! selects the corresponding option. begin of T_DIA_ND_OUTPUT_OPT_ELEM_VALUE, + "! An input object that includes the input text. INPUT type T_MESSAGE_INPUT, end of T_DIA_ND_OUTPUT_OPT_ELEM_VALUE. types: - "! + "! No documentation available. begin of T_DIA_NODE_OUTPUT_OPT_ELEMENT, + "! The user-facing label for the option. LABEL type STRING, + "! An object defining the message input to be sent to the assistant if the user + "! selects the corresponding option. VALUE type T_DIA_ND_OUTPUT_OPT_ELEM_VALUE, end of T_DIA_NODE_OUTPUT_OPT_ELEMENT. types: - "! + "! No documentation available. begin of T_RUNTIME_RESPONSE_TYPE_OPTION, + "! The title or introductory text to show before the response. TITLE type STRING, + "! The description to show with the the response. DESCRIPTION type STRING, + "! The preferred type of control to display. PREFERENCE type STRING, + "! An array of objects describing the options from which the user can choose. OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, end of T_RUNTIME_RESPONSE_TYPE_OPTION. types: - "! + "! No documentation available. begin of T_RT_ENTTY_INTRPRTTN_SYS_DATE, + "! The calendar used to represent a recognized date (for example, `Gregorian`). CALENDAR_TYPE type STRING, + "! A unique identifier used to associate a time and date. If the user input + "! contains a date and time that are mentioned together (for example, `Today at + "! 5`, the same **datetime_link** value is returned for both the `@sys-date` and + "! `@sys-time` entities). DATETIME_LINK type STRING, + "! A locale-specific holiday name (such as `thanksgiving` or `christmas`). This + "! property is included when a `@sys-date` entity is recognized based on a holiday + "! name in the user input. FESTIVAL type STRING, + "! The precision or duration of a time range specified by a recognized `@sys-time` + "! or `@sys-date` entity. GRANULARITY type STRING, + "! A unique identifier used to associate multiple recognized `@sys-date`, + "! `@sys-time`, or `@sys-number` entities that are recognized as a range of values + "! in the user's input (for example, `from July 4 until July 14` or `from 20 to + "! 25`). RANGE_LINK type STRING, + "! The word in the user input that indicates that a `sys-date` or `sys-time` entity + "! is part of an implied range where only one date or time is specified (for + "! example, `since` or `until`). RANGE_MODIFIER type STRING, + "! A recognized mention of a relative day, represented numerically as an offset + "! from the current date (for example, `-1` for `yesterday` or `10` for `in ten + "! days`). RELATIVE_DAY type NUMBER, + "! A recognized mention of a relative month, represented numerically as an offset + "! from the current month (for example, `1` for `next month` or `-3` for `three + "! months ago`). RELATIVE_MONTH type NUMBER, + "! A recognized mention of a relative week, represented numerically as an offset + "! from the current week (for example, `2` for `in two weeks` or `-1` for `last + "! week). RELATIVE_WEEK type NUMBER, + "! A recognized mention of a relative date range for a weekend, represented + "! numerically as an offset from the current weekend (for example, `0` for `this + "! weekend` or `-1` for `last weekend`). RELATIVE_WEEKEND type NUMBER, + "! A recognized mention of a relative year, represented numerically as an offset + "! from the current year (for example, `1` for `next year` or `-5` for `five years + "! ago`). RELATIVE_YEAR type NUMBER, + "! A recognized mention of a specific date, represented numerically as the date + "! within the month (for example, `30` for `June 30`.). SPECIFIC_DAY type NUMBER, + "! A recognized mention of a specific day of the week as a lowercase string (for + "! example, `monday`). SPECIFIC_DAY_OF_WEEK type STRING, + "! A recognized mention of a specific month, represented numerically (for example, + "! `7` for `July`). SPECIFIC_MONTH type NUMBER, + "! A recognized mention of a specific quarter, represented numerically (for + "! example, `3` for `the third quarter`). SPECIFIC_QUARTER type NUMBER, + "! A recognized mention of a specific year (for example, `2016`). SPECIFIC_YEAR type NUMBER, end of T_RT_ENTTY_INTRPRTTN_SYS_DATE. types: "! An object containing segments of text from search results with query-matching - "! text highlighted using HTML tags. + "! text highlighted using HTML <em> tags. begin of T_SEARCH_RESULT_HIGHLIGHT, + "! An array of strings containing segments taken from body text in the search + "! results, with query-matching substrings highlighted. BODY type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array of strings containing segments taken from title text in the search + "! results, with query-matching substrings highlighted. TITLE type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array of strings containing segments taken from URLs in the search results, + "! with query-matching substrings highlighted. URL type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_SEARCH_RESULT_HIGHLIGHT. types: "! An object defining the message input to be sent to the assistant if the user "! selects the corresponding disambiguation option. begin of T_DIALOG_SUGGESTION_VALUE, + "! An input object that includes the input text. INPUT type T_MESSAGE_INPUT, end of T_DIALOG_SUGGESTION_VALUE. types: "! An object containing search result metadata from the Discovery service. begin of T_SEARCH_RESULT_METADATA, + "! The confidence score for the given result. For more information about how the + "! confidence is calculated, see the Discovery service + "! [documentation](../discovery#query-your-collection). CONFIDENCE type DOUBLE, + "! An unbounded measure of the relevance of a particular result, dependent on the + "! query and matching document. A higher score indicates a greater match to the + "! query parameters. SCORE type DOUBLE, end of T_SEARCH_RESULT_METADATA. types: - "! + "! No documentation available. begin of T_SEARCH_RESULT, + "! The unique identifier of the document in the Discovery service collection.
+ "!
+ "! This property is included in responses from search skills, which are a beta + "! feature available only to Plus or Premium plan users. ID type STRING, + "! An object containing search result metadata from the Discovery service. RESULT_METADATA type T_SEARCH_RESULT_METADATA, + "! A description of the search result. This is taken from an abstract, summary, or + "! highlight field in the Discovery service response, as specified in the search + "! skill configuration. BODY type STRING, + "! The title of the search result. This is taken from a title or name field in the + "! Discovery service response, as specified in the search skill configuration. TITLE type STRING, + "! The URL of the original data object in its native data source. URL type STRING, + "! An object containing segments of text from search results with query-matching + "! text highlighted using HTML <em> tags. HIGHLIGHT type T_SEARCH_RESULT_HIGHLIGHT, end of T_SEARCH_RESULT. types: - "! + "! No documentation available. begin of T_DIALOG_SUGGESTION, + "! The user-facing label for the disambiguation option. This label is taken from + "! the **title** or **user_label** property of the corresponding dialog node, + "! depending on the disambiguation options. LABEL type STRING, + "! An object defining the message input to be sent to the assistant if the user + "! selects the corresponding disambiguation option. VALUE type T_DIALOG_SUGGESTION_VALUE, + "! The dialog output that will be returned from the Watson Assistant service if the + "! user selects the corresponding option. OUTPUT type MAP, end of T_DIALOG_SUGGESTION. types: - "! + "! No documentation available. begin of T_RUNTIME_RESPONSE_GENERIC, + "! The type of response returned by the dialog node. The specified response type + "! must be supported by the client application or channel.
+ "!
+ "! **Note:** The **suggestion** response type is part of the disambiguation + "! feature, which is only available for Premium users. RESPONSE_TYPE type STRING, + "! The text of the response. TEXT type STRING, + "! How long to pause, in milliseconds. TIME type INTEGER, + "! Whether to send a "user is typing" event during the pause. TYPING type BOOLEAN, + "! The URL of the image. SOURCE type STRING, + "! The title or introductory text to show before the response. TITLE type STRING, + "! The description to show with the the response. DESCRIPTION type STRING, + "! The preferred type of control to display. PREFERENCE type STRING, + "! An array of objects describing the options from which the user can choose. OPTIONS type STANDARD TABLE OF T_DIA_NODE_OUTPUT_OPT_ELEMENT WITH NON-UNIQUE DEFAULT KEY, + "! A message to be sent to the human agent who will be taking over the + "! conversation. MESSAGE_TO_HUMAN_AGENT type STRING, + "! A label identifying the topic of the conversation, derived from the + "! **user_label** property of the relevant node. TOPIC type STRING, + "! An array of objects describing the possible matching dialog nodes from which the + "! user can choose.
+ "!
+ "! **Note:** The **suggestions** property is part of the disambiguation feature, + "! which is only available for Premium users. SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, + "! The title or introductory text to show before the response. This text is defined + "! in the search skill configuration. HEADER type STRING, + "! An array of objects containing search results. RESULTS type STANDARD TABLE OF T_SEARCH_RESULT WITH NON-UNIQUE DEFAULT KEY, end of T_RUNTIME_RESPONSE_GENERIC. types: - "! An object describing the role played by a system entity that is specifies the - "! beginning or end of a range recognized in the user input. - "! - "! This property is part of the new system entities, which are a beta feature. - begin of T_RUNTIME_ENTITY_ROLE, - TYPE type STRING, - end of T_RUNTIME_ENTITY_ROLE. - types: - "! + "! No documentation available. begin of T_ERROR_DETAIL, + "! Description of a specific constraint violation. MESSAGE type STRING, + "! The location of the constraint violation. PATH type STRING, end of T_ERROR_DETAIL. types: - "! + "! No documentation available. begin of T_ERROR_RESPONSE, + "! General description of an error. ERROR type STRING, + "! Collection of specific constraint violations associated with the error. ERRORS type STANDARD TABLE OF T_ERROR_DETAIL WITH NON-UNIQUE DEFAULT KEY, + "! HTTP status code for the error response. CODE type INTEGER, end of T_ERROR_RESPONSE. types: - "! - begin of T_RT_ENTITY_INTERPRETATION, - CALENDAR_TYPE type STRING, - DATETIME_LINK type STRING, - FESTIVAL type STRING, - GRANULARITY type STRING, - RANGE_LINK type STRING, - RANGE_MODIFIER type STRING, - RELATIVE_DAY type NUMBER, - RELATIVE_MONTH type NUMBER, - RELATIVE_WEEK type NUMBER, - RELATIVE_WEEKEND type NUMBER, - RELATIVE_YEAR type NUMBER, - SPECIFIC_DAY type NUMBER, - SPECIFIC_DAY_OF_WEEK type STRING, - SPECIFIC_MONTH type NUMBER, - SPECIFIC_QUARTER type NUMBER, - SPECIFIC_YEAR type NUMBER, - NUMERIC_VALUE type NUMBER, - SUBTYPE type STRING, - PART_OF_DAY type STRING, - RELATIVE_HOUR type NUMBER, - RELATIVE_MINUTE type NUMBER, - RELATIVE_SECOND type NUMBER, - SPECIFIC_HOUR type NUMBER, - SPECIFIC_MINUTE type NUMBER, - SPECIFIC_SECOND type NUMBER, - TIMEZONE type STRING, - end of T_RT_ENTITY_INTERPRETATION. - types: - "! + "! No documentation available. begin of T_RUNTIME_RESPONSE_TYPE_IMAGE, + "! The URL of the image. SOURCE type STRING, + "! The title to show before the response. TITLE type STRING, + "! The description to show with the the response. DESCRIPTION type STRING, end of T_RUNTIME_RESPONSE_TYPE_IMAGE. types: - "! + "! No documentation available. begin of T_DIALOG_NODE_ACTION, + "! The name of the action. NAME type STRING, + "! The type of action to invoke. TYPE type STRING, + "! A map of key/value pairs to be provided to the action. PARAMETERS type MAP, + "! The location in the dialog context where the result of the action is stored. RESULT_VARIABLE type STRING, + "! The name of the context variable that the client application will use to pass in + "! credentials for the action. CREDENTIALS type STRING, end of T_DIALOG_NODE_ACTION. types: "! Built-in system properties that apply to all skills used by the assistant. begin of T_MSSG_CONTEXT_GLOBAL_SYSTEM, + "! The user time zone. The assistant uses the time zone to correctly resolve + "! relative time references. TIMEZONE type STRING, + "! A string value that identifies the user who is interacting with the assistant. + "! The client must provide a unique identifier for each individual end user who + "! accesses the application. For Plus and Premium plans, this user ID is used to + "! identify unique users for billing purposes. This string cannot contain carriage + "! return, newline, or tab characters. USER_ID type STRING, + "! A counter that is automatically incremented with each turn of the conversation. + "! A value of 1 indicates that this is the the first turn of a new conversation, + "! which can affect the behavior of some skills (for example, triggering the start + "! node of a dialog). TURN_COUNT type INTEGER, + "! The language code for localization in the user input. The specified locale + "! overrides the default for the assistant, and is used for interpreting entity + "! values in user input such as date values. For example, `04/03/2018` might be + "! interpreted either as April 3 or March 4, depending on the locale.
+ "!
+ "! This property is included only if the new system entities are enabled for the + "! skill. + LOCALE type STRING, + "! The base time for interpreting any relative time mentions in the user input. The + "! specified time overrides the current server time, and is used to calculate + "! times mentioned in relative terms such as `now` or `tomorrow`. This can be + "! useful for simulating past or future times for testing purposes, or when + "! analyzing documents such as news articles.
+ "!
+ "! This value must be a UTC time value formatted according to ISO 8601 (for + "! example, `2019-06-26T12:00:00Z` for noon on 26 June 2019.
+ "!
+ "! This property is included only if the new system entities are enabled for the + "! skill. + REFERENCE_TIME type STRING, end of T_MSSG_CONTEXT_GLOBAL_SYSTEM. types: "! Information that is shared by all skills used by the Assistant. begin of T_MESSAGE_CONTEXT_GLOBAL, + "! Built-in system properties that apply to all skills used by the assistant. SYSTEM type T_MSSG_CONTEXT_GLOBAL_SYSTEM, end of T_MESSAGE_CONTEXT_GLOBAL. types: - "! Information specific to particular skills used by the Assistant. - "! + "! Information specific to particular skills used by the Assistant.
+ "!
"! **Note:** Currently, only a single property named `main skill` is supported. "! This object contains variables that apply to the dialog skill used by the "! assistant. T_MESSAGE_CONTEXT_SKILLS type MAP. types: - "! + "! No documentation available. begin of T_MESSAGE_CONTEXT, + "! Information that is shared by all skills used by the Assistant. GLOBAL type T_MESSAGE_CONTEXT_GLOBAL, + "! Information specific to particular skills used by the Assistant.
+ "!
+ "! **Note:** Currently, only a single property named `main skill` is supported. + "! This object contains variables that apply to the dialog skill used by the + "! assistant. SKILLS type T_MESSAGE_CONTEXT_SKILLS, end of T_MESSAGE_CONTEXT. types: "! Assistant output to be rendered or processed by the client. begin of T_MESSAGE_OUTPUT, + "! Output intended for any channel. It is the responsibility of the client + "! application to implement the supported response types. GENERIC type STANDARD TABLE OF T_RUNTIME_RESPONSE_GENERIC WITH NON-UNIQUE DEFAULT KEY, + "! An array of intents recognized in the user input, sorted in descending order of + "! confidence. INTENTS type STANDARD TABLE OF T_RUNTIME_INTENT WITH NON-UNIQUE DEFAULT KEY, + "! An array of entities identified in the user input. ENTITIES type STANDARD TABLE OF T_RUNTIME_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects describing any actions requested by the dialog node. ACTIONS type STANDARD TABLE OF T_DIALOG_NODE_ACTION WITH NON-UNIQUE DEFAULT KEY, + "! Additional detailed information about a message response and how it was + "! generated. DEBUG type T_MESSAGE_OUTPUT_DEBUG, + "! An object containing any custom properties included in the response. This object + "! includes any arbitrary properties defined in the dialog JSON editor as part of + "! the dialog node output. USER_DEFINED type MAP, end of T_MESSAGE_OUTPUT. types: "! A response from the Watson Assistant service. begin of T_MESSAGE_RESPONSE, + "! Assistant output to be rendered or processed by the client. OUTPUT type T_MESSAGE_OUTPUT, + "! State information for the conversation. The context is stored by the assistant + "! on a per-session basis. You can use this property to access context + "! variables.
+ "!
+ "! **Note:** The context is included in message responses only if + "! **return_context**=`true` in the message request. CONTEXT type T_MESSAGE_CONTEXT, end of T_MESSAGE_RESPONSE. types: - "! + "! No documentation available. begin of T_RUNTIME_RESPONSE_TYPE_TEXT, + "! The text of the response. TEXT type STRING, end of T_RUNTIME_RESPONSE_TYPE_TEXT. types: - "! + "! No documentation available. begin of T_RT_ENTTY_INTRPRTTN_SYS_TIME, + "! A unique identifier used to associate a recognized time and date. If the user + "! input contains a date and time that are mentioned together (for example, `Today + "! at 5`, the same **datetime_link** value is returned for both the `@sys-date` + "! and `@sys-time` entities). DATETIME_LINK type STRING, + "! The precision or duration of a time range specified by a recognized `@sys-time` + "! or `@sys-date` entity. GRANULARITY type STRING, + "! A recognized term for a time that was mentioned as a part of the day in the + "! user's input (for example, `morning` or `afternoon`). PART_OF_DAY type STRING, + "! A unique identifier used to associate multiple recognized `@sys-date`, + "! `@sys-time`, or `@sys-number` entities that are recognized as a range of values + "! in the user's input (for example, `from July 4 until July 14` or `from 20 to + "! 25`). RANGE_LINK type STRING, + "! A recognized mention of a relative hour, represented numerically as an offset + "! from the current hour (for example, `3` for `in three hours` or `-1` for `an + "! hour ago`). RELATIVE_HOUR type NUMBER, + "! A recognized mention of a relative time, represented numerically as an offset in + "! minutes from the current time (for example, `5` for `in five minutes` or `-15` + "! for `fifteen minutes ago`). RELATIVE_MINUTE type NUMBER, + "! A recognized mention of a relative time, represented numerically as an offset in + "! seconds from the current time (for example, `10` for `in ten seconds` or `-30` + "! for `thirty seconds ago`). RELATIVE_SECOND type NUMBER, + "! A recognized specific hour mentioned as part of a time value (for example, `10` + "! for `10:15 AM`.). SPECIFIC_HOUR type NUMBER, + "! A recognized specific minute mentioned as part of a time value (for example, + "! `15` for `10:15 AM`.). SPECIFIC_MINUTE type NUMBER, + "! A recognized specific second mentioned as part of a time value (for example, + "! `30` for `10:15:30 AM`.). SPECIFIC_SECOND type NUMBER, + "! A recognized time zone mentioned as part of a time value (for example, `EST`). TIMEZONE type STRING, end of T_RT_ENTTY_INTRPRTTN_SYS_TIME. types: - "! + "! No documentation available. begin of T_RUNTIME_RESPONSE_TYPE_PAUSE, + "! How long to pause, in milliseconds. TIME type INTEGER, + "! Whether to send a "user is typing" event during the pause. TYPING type BOOLEAN, end of T_RUNTIME_RESPONSE_TYPE_PAUSE. types: - "! + "! No documentation available. begin of T_RUNTIME_RESPONSE_TYPE_SEARCH, + "! The title or introductory text to show before the response. This text is defined + "! in the search skill configuration. HEADER type STRING, + "! An array of objects containing search results. RESULTS type STANDARD TABLE OF T_SEARCH_RESULT WITH NON-UNIQUE DEFAULT KEY, end of T_RUNTIME_RESPONSE_TYPE_SEARCH. types: - "! + "! No documentation available. begin of T_RT_RESPONSE_TYPE_SUGGESTION, + "! The title or introductory text to show before the response. TITLE type STRING, + "! An array of objects describing the possible matching dialog nodes from which the + "! user can choose.
+ "!
+ "! **Note:** The **suggestions** property is part of the disambiguation feature, + "! which is only available for Premium users. SUGGESTIONS type STANDARD TABLE OF T_DIALOG_SUGGESTION WITH NON-UNIQUE DEFAULT KEY, end of T_RT_RESPONSE_TYPE_SUGGESTION. types: "! Contains information specific to a particular skill used by the Assistant. begin of T_MESSAGE_CONTEXT_SKILL, + "! Arbitrary variables that can be read and written by a particular skill. USER_DEFINED type MAP, + "! For internal use only. + SYSTEM type MAP, end of T_MESSAGE_CONTEXT_SKILL. types: - "! + "! No documentation available. begin of T_RT_RESP_TYP_CONNECT_TO_AGENT, + "! A message to be sent to the human agent who will be taking over the + "! conversation. MESSAGE_TO_HUMAN_AGENT type STRING, + "! A label identifying the topic of the conversation, derived from the + "! **user_label** property of the relevant node. TOPIC type STRING, end of T_RT_RESP_TYP_CONNECT_TO_AGENT. types: "! A request formatted for the Watson Assistant service. begin of T_MESSAGE_REQUEST, + "! An input object that includes the input text. INPUT type T_MESSAGE_INPUT, + "! State information for the conversation. The context is stored by the assistant + "! on a per-session basis. You can use this property to set or modify context + "! variables, which can also be accessed by dialog nodes. CONTEXT type T_MESSAGE_CONTEXT, end of T_MESSAGE_REQUEST. @@ -374,6 +741,8 @@ constants: T_SESSION_RESPONSE type string value '|SESSION_ID|', T_RT_ENTTY_INTRPRTTN_SYS_NUM type string value '|', T_RUNTIME_ENTITY_ALTERNATIVE type string value '|', + T_RUNTIME_ENTITY_ROLE type string value '|', + T_RT_ENTITY_INTERPRETATION type string value '|', T_MESSAGE_INPUT_OPTIONS type string value '|', T_RUNTIME_INTENT type string value '|INTENT|CONFIDENCE|', T_CAPTURE_GROUP type string value '|GROUP|', @@ -389,10 +758,8 @@ constants: T_SEARCH_RESULT type string value '|ID|RESULT_METADATA|', T_DIALOG_SUGGESTION type string value '|LABEL|VALUE|', T_RUNTIME_RESPONSE_GENERIC type string value '|RESPONSE_TYPE|', - T_RUNTIME_ENTITY_ROLE type string value '|', T_ERROR_DETAIL type string value '|MESSAGE|', T_ERROR_RESPONSE type string value '|ERROR|CODE|', - T_RT_ENTITY_INTERPRETATION type string value '|', T_RUNTIME_RESPONSE_TYPE_IMAGE type string value '|', T_DIALOG_NODE_ACTION type string value '|NAME|RESULT_VARIABLE|', T_MSSG_CONTEXT_GLOBAL_SYSTEM type string value '|', @@ -425,6 +792,9 @@ constants: METADATA type string value 'metadata', INNER type string value 'inner', GROUPS type string value 'groups', + INTERPRETATION type string value 'interpretation', + ALTERNATIVES type string value 'alternatives', + ROLE type string value 'role', CALENDAR_TYPE type string value 'calendar_type', DATETIME_LINK type string value 'datetime_link', FESTIVAL type string value 'festival', @@ -460,6 +830,8 @@ constants: SUGGESTION_ID type string value 'suggestion_id', USER_ID type string value 'user_id', TURN_COUNT type string value 'turn_count', + LOCALE type string value 'locale', + REFERENCE_TIME type string value 'reference_time', SYSTEM type string value 'system', USER_DEFINED type string value 'user_defined', GLOBAL type string value 'global', @@ -521,20 +893,21 @@ constants: "! Create a session. "! - "! @parameter I_assistant_id | + "! @parameter I_ASSISTANT_ID | "! Unique identifier of the assistant. To find the assistant ID in the Watson "! Assistant user interface, open the assistant settings and click **API "! Details**. For information about creating assistants, see the - "! [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-a - "! ssistant-add#assistant-add-task). - "! + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant- + "! add#assistant-add-task).
+ "!
"! **Note:** Currently, the v2 API does not support creating assistants. "! @parameter E_RESPONSE | "! Service return value of type T_SESSION_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_SESSION importing - !I_assistant_id type STRING + !I_ASSISTANT_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_SESSION_RESPONSE @@ -542,48 +915,50 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete session. "! - "! @parameter I_assistant_id | + "! @parameter I_ASSISTANT_ID | "! Unique identifier of the assistant. To find the assistant ID in the Watson "! Assistant user interface, open the assistant settings and click **API "! Details**. For information about creating assistants, see the - "! [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-a - "! ssistant-add#assistant-add-task). - "! + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant- + "! add#assistant-add-task).
+ "!
"! **Note:** Currently, the v2 API does not support creating assistants. - "! @parameter I_session_id | + "! @parameter I_SESSION_ID | "! Unique identifier of the session. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_SESSION importing - !I_assistant_id type STRING - !I_session_id type STRING + !I_ASSISTANT_ID type STRING + !I_SESSION_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Send user input to assistant. "! - "! @parameter I_assistant_id | + "! @parameter I_ASSISTANT_ID | "! Unique identifier of the assistant. To find the assistant ID in the Watson "! Assistant user interface, open the assistant settings and click **API "! Details**. For information about creating assistants, see the - "! [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-a - "! ssistant-add#assistant-add-task). - "! + "! [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant- + "! add#assistant-add-task).
+ "!
"! **Note:** Currently, the v2 API does not support creating assistants. - "! @parameter I_session_id | + "! @parameter I_SESSION_ID | "! Unique identifier of the session. - "! @parameter I_request | + "! @parameter I_REQUEST | "! The message to be sent. This includes the user's input, along with optional "! content such as intents and entities. "! @parameter E_RESPONSE | "! Service return value of type T_MESSAGE_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods MESSAGE importing - !I_assistant_id type STRING - !I_session_id type STRING - !I_request type T_MESSAGE_REQUEST optional + !I_ASSISTANT_ID type STRING + !I_SESSION_ID type STRING + !I_REQUEST type T_MESSAGE_REQUEST optional !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -627,7 +1002,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -668,7 +1043,7 @@ endmethod. * +--------------------------------------------------------------------------------------
method get_sdk_version_date. - e_sdk_version_date = '20191002122836'. + e_sdk_version_date = '20200210092813'. endmethod. @@ -677,7 +1052,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V2->CREATE_SESSION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_assistant_id TYPE STRING +* | [--->] I_ASSISTANT_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_SESSION_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -692,7 +1067,7 @@ method CREATE_SESSION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v2/assistants/{assistant_id}/sessions'. - replace all occurrences of `{assistant_id}` in ls_request_prop-url-path with i_assistant_id ignoring case. + replace all occurrences of `{assistant_id}` in ls_request_prop-url-path with i_ASSISTANT_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -725,8 +1100,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V2->DELETE_SESSION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_assistant_id TYPE STRING -* | [--->] I_session_id TYPE STRING +* | [--->] I_ASSISTANT_ID TYPE STRING +* | [--->] I_SESSION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -740,8 +1115,8 @@ method DELETE_SESSION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v2/assistants/{assistant_id}/sessions/{session_id}'. - replace all occurrences of `{assistant_id}` in ls_request_prop-url-path with i_assistant_id ignoring case. - replace all occurrences of `{session_id}` in ls_request_prop-url-path with i_session_id ignoring case. + replace all occurrences of `{assistant_id}` in ls_request_prop-url-path with i_ASSISTANT_ID ignoring case. + replace all occurrences of `{session_id}` in ls_request_prop-url-path with i_SESSION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -767,9 +1142,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_ASSISTANT_V2->MESSAGE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_assistant_id TYPE STRING -* | [--->] I_session_id TYPE STRING -* | [--->] I_request TYPE T_MESSAGE_REQUEST(optional) +* | [--->] I_ASSISTANT_ID TYPE STRING +* | [--->] I_SESSION_ID TYPE STRING +* | [--->] I_REQUEST TYPE T_MESSAGE_REQUEST(optional) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_MESSAGE_RESPONSE @@ -785,8 +1160,8 @@ method MESSAGE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v2/assistants/{assistant_id}/sessions/{session_id}/message'. - replace all occurrences of `{assistant_id}` in ls_request_prop-url-path with i_assistant_id ignoring case. - replace all occurrences of `{session_id}` in ls_request_prop-url-path with i_session_id ignoring case. + replace all occurrences of `{assistant_id}` in ls_request_prop-url-path with i_ASSISTANT_ID ignoring case. + replace all occurrences of `{session_id}` in ls_request_prop-url-path with i_SESSION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -808,21 +1183,21 @@ method MESSAGE. field-symbols: type any. lv_separator = ''. - if not i_request is initial. - lv_datatype = get_datatype( i_request ). + if not i_REQUEST is initial. + lv_datatype = get_datatype( i_REQUEST ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_request i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_REQUEST i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'request' i_value = i_request ). + lv_bodyparam = abap_to_json( i_name = 'request' i_value = i_REQUEST ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_request to . + assign i_REQUEST to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. diff --git a/src/zcl_ibmc_compare_comply_v1.clas.abap b/src/zcl_ibmc_compare_comply_v1.clas.abap index aaa9802..9f9f440 100644 --- a/src/zcl_ibmc_compare_comply_v1.clas.abap +++ b/src/zcl_ibmc_compare_comply_v1.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,9 @@ public section. "! The numeric location of the identified element in the document, represented with "! two integers labeled `begin` and `end`. begin of T_LOCATION, + "! The element's `begin` index. BEGIN type LONG, + "! The element's `end` index. END type LONG, end of T_LOCATION. types: @@ -32,109 +34,174 @@ public section. "! effect of the element on the identified `party`, and the `party` object "! identifies the affected party. begin of T_LABEL, + "! The identified `nature` of the element. NATURE type STRING, + "! The identified `party` of the element. PARTY type STRING, end of T_LABEL. types: "! Identification of a specific type. begin of T_TYPE_LABEL_COMPARISON, + "! A pair of `nature` and `party` objects. The `nature` object identifies the + "! effect of the element on the identified `party`, and the `party` object + "! identifies the affected party. LABEL type T_LABEL, end of T_TYPE_LABEL_COMPARISON. types: "! The locations of each paragraph in the input document. begin of T_PARAGRAPHS, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_PARAGRAPHS. types: "! Document counts. begin of T_DOC_COUNTS, + "! Total number of documents. TOTAL type INTEGER, + "! Number of pending documents. PENDING type INTEGER, + "! Number of documents successfully processed. SUCCESSFUL type INTEGER, + "! Number of documents not successfully processed. FAILED type INTEGER, end of T_DOC_COUNTS. types: "! Identification of a specific type. begin of T_TYPE_LABEL, + "! A pair of `nature` and `party` objects. The `nature` object identifies the + "! effect of the element on the identified `party`, and the `party` object + "! identifies the affected party. LABEL type T_LABEL, + "! Hashed values that you can send to IBM to provide feedback or receive support. PROVENANCE_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_TYPE_LABEL. types: "! Brief information about the input document. begin of T_SHORT_DOC, + "! The title of the input document, if identified. TITLE type STRING, + "! The MD5 hash of the input document. HASH type STRING, end of T_SHORT_DOC. types: "! Information defining an element's subject matter. begin of T_CATEGORY, + "! The category of the associated element. LABEL type STRING, + "! Hashed values that you can send to IBM to provide feedback or receive support. PROVENANCE_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_CATEGORY. types: "! The original labeling from the input document, without the submitted feedback. begin of T_ORIGINAL_LABELS_OUT, + "! Description of the action specified by the element and whom it affects. TYPES type STANDARD TABLE OF T_TYPE_LABEL WITH NON-UNIQUE DEFAULT KEY, + "! List of functional categories into which the element falls; in other words, the + "! subject matter of the element. CATEGORIES type STANDARD TABLE OF T_CATEGORY WITH NON-UNIQUE DEFAULT KEY, + "! A string identifying the type of modification the feedback entry in the + "! `updated_labels` array. Possible values are `added`, `not_changed`, and + "! `removed`. MODIFICATION type STRING, end of T_ORIGINAL_LABELS_OUT. types: "! The updated labeling from the input document, accounting for the submitted "! feedback. begin of T_UPDATED_LABELS_OUT, + "! Description of the action specified by the element and whom it affects. TYPES type STANDARD TABLE OF T_TYPE_LABEL WITH NON-UNIQUE DEFAULT KEY, + "! List of functional categories into which the element falls; in other words, the + "! subject matter of the element. CATEGORIES type STANDARD TABLE OF T_CATEGORY WITH NON-UNIQUE DEFAULT KEY, + "! The type of modification the feedback entry in the `updated_labels` array. + "! Possible values are `added`, `not_changed`, and `removed`. MODIFICATION type STRING, end of T_UPDATED_LABELS_OUT. types: "! Pagination details, if required by the length of the output. begin of T_PAGINATION, + "! A token identifying the current page of results. REFRESH_CURSOR type STRING, + "! A token identifying the next page of results. NEXT_CURSOR type STRING, + "! The URL that returns the current page of results. REFRESH_URL type STRING, + "! The URL that returns the next page of results. NEXT_URL type STRING, + "! Reserved for future use. TOTAL type LONG, end of T_PAGINATION. types: "! Information returned from the **Add Feedback** method. begin of T_FEEDBACK_DATA_OUTPUT, + "! A string identifying the user adding the feedback. The only permitted value is + "! `element_classification`. FEEDBACK_TYPE type STRING, + "! Brief information about the input document. DOCUMENT type T_SHORT_DOC, + "! An optional string identifying the model ID. The only permitted value is + "! `contracts`. MODEL_ID type STRING, + "! An optional string identifying the version of the model used. MODEL_VERSION type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! The text to which the feedback applies. TEXT type STRING, + "! The original labeling from the input document, without the submitted feedback. ORIGINAL_LABELS type T_ORIGINAL_LABELS_OUT, + "! The updated labeling from the input document, accounting for the submitted + "! feedback. UPDATED_LABELS type T_UPDATED_LABELS_OUT, + "! Pagination details, if required by the length of the output. PAGINATION type T_PAGINATION, end of T_FEEDBACK_DATA_OUTPUT. types: "! List of document attributes. begin of T_ATTRIBUTE, + "! The type of attribute. TYPE type STRING, + "! The text associated with the attribute. TEXT type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_ATTRIBUTE. types: "! Information defining an element's subject matter. begin of T_CATEGORY_COMPARISON, + "! The category of the associated element. LABEL type STRING, end of T_CATEGORY_COMPARISON. types: "! Element that does not align semantically between two compared documents. begin of T_UNALIGNED_ELEMENT, + "! The label assigned to the document by the value of the `file_1_label` or + "! `file_2_label` parameters on the **Compare two documents** method. DOCUMENT_LABEL type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! The text of the element. TEXT type STRING, + "! Description of the action specified by the element and whom it affects. TYPES type STANDARD TABLE OF T_TYPE_LABEL_COMPARISON WITH NON-UNIQUE DEFAULT KEY, + "! List of functional categories into which the element falls; in other words, the + "! subject matter of the element. CATEGORIES type STANDARD TABLE OF T_CATEGORY_COMPARISON WITH NON-UNIQUE DEFAULT KEY, + "! List of document attributes. ATTRIBUTES type STANDARD TABLE OF T_ATTRIBUTE WITH NON-UNIQUE DEFAULT KEY, end of T_UNALIGNED_ELEMENT. types: "! The updated labeling from the input document, accounting for the submitted "! feedback. begin of T_UPDATED_LABELS_IN, + "! Description of the action specified by the element and whom it affects. TYPES type STANDARD TABLE OF T_TYPE_LABEL WITH NON-UNIQUE DEFAULT KEY, + "! List of functional categories into which the element falls; in other words, the + "! subject matter of the element. CATEGORIES type STANDARD TABLE OF T_CATEGORY WITH NON-UNIQUE DEFAULT KEY, end of T_UPDATED_LABELS_IN. types: @@ -145,14 +212,23 @@ public section. "! A list of `begin` and `end` indexes that indicate the locations of the elements "! in the input document. begin of T_ELEMENT_LOCATIONS, + "! An integer that indicates the starting position of the element in the input + "! document. BEGIN type INTEGER, + "! An integer that indicates the ending position of the element in the input + "! document. END type INTEGER, end of T_ELEMENT_LOCATIONS. types: "! The leading sentences in a section or subsection of the input document. begin of T_LEADING_SENTENCE, + "! The text of the leading sentence. TEXT type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! An array of `location` objects that lists the locations of detected leading + "! sentences. ELEMENT_LOCATIONS type STANDARD TABLE OF T_ELEMENT_LOCATIONS WITH NON-UNIQUE DEFAULT KEY, end of T_LEADING_SENTENCE. types: @@ -161,16 +237,31 @@ public section. "! out and can be placed back in order by using the `begin` and `end` values of "! the element and the `level` value of the section. begin of T_SECTION_TITLES, + "! The text of the section title, if identified. TEXT type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! An integer indicating the level at which the section is located in the input + "! document. For example, `1` represents a top-level section, `2` represents a + "! subsection within the level `1` section, and so forth. LEVEL type INTEGER, + "! An array of `location` objects that lists the locations of detected section + "! titles. ELEMENT_LOCATIONS type STANDARD TABLE OF T_ELEMENT_LOCATIONS WITH NON-UNIQUE DEFAULT KEY, end of T_SECTION_TITLES. types: "! The structure of the input document. begin of T_DOC_STRUCTURE, + "! An array containing one object per section or subsection identified in the input + "! document. SECTION_TITLES type STANDARD TABLE OF T_SECTION_TITLES WITH NON-UNIQUE DEFAULT KEY, + "! An array containing one object per section or subsection, in parallel with the + "! `section_titles` array, that details the leading sentences in the corresponding + "! section or subsection. LEADING_SENTENCES type STANDARD TABLE OF T_LEADING_SENTENCE WITH NON-UNIQUE DEFAULT KEY, + "! An array containing one object per paragraph, in parallel with the + "! `section_titles` and `leading_sentences` arrays. PARAGRAPHS type STANDARD TABLE OF T_PARAGRAPHS WITH NON-UNIQUE DEFAULT KEY, end of T_DOC_STRUCTURE. types: @@ -179,41 +270,62 @@ public section. "! `column_header_texts`. T_COLUMN_HEADER_TEXTS_NORM type TT_String. types: - "! + "! No documentation available. begin of T_ERROR_RESPONSE, + "! The HTTP error status code. CODE type INTEGER, + "! A message describing the error. ERROR type STRING, end of T_ERROR_RESPONSE. types: "! A contact. begin of T_CONTACT, + "! A string listing the name of the contact. NAME type STRING, + "! A string listing the role of the contact. ROLE type STRING, end of T_CONTACT. types: "! The table's section title, if identified. begin of T_SECTION_TITLE, + "! The text of the section title, if identified. TEXT type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_SECTION_TITLE. types: "! Column-level cells, each applicable as a header to other cells in the same "! column as itself, of the current table. begin of T_COLUMN_HEADERS, + "! The unique ID of the cell in the current table. CELL_ID type STRING, + "! The location of the column header cell in the current table as defined by its + "! `begin` and `end` offsets, respectfully, in the input document. LOCATION type JSONOBJECT, + "! The textual contents of this cell from the input document without associated + "! markup content. TEXT type STRING, + "! If you provide customization input, the normalized version of the cell text + "! according to the customization; otherwise, the same value as `text`. TEXT_NORMALIZED type STRING, + "! The `begin` index of this cell's `row` location in the current table. ROW_INDEX_BEGIN type LONG, + "! The `end` index of this cell's `row` location in the current table. ROW_INDEX_END type LONG, + "! The `begin` index of this cell's `column` location in the current table. COLUMN_INDEX_BEGIN type LONG, + "! The `end` index of this cell's `column` location in the current table. COLUMN_INDEX_END type LONG, end of T_COLUMN_HEADERS. types: "! Text that is related to the contents of the table and that precedes or follows "! the current table. begin of T_CONTEXTS, + "! The related text. TEXT type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_CONTEXTS. types: @@ -221,292 +333,533 @@ public section. "! ...`. Empty when no title is identified. When exposed, the `title` is also "! excluded from the `contexts` array of the same table. begin of T_TABLE_TITLE, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! The text of the identified table title or caption. TEXT type STRING, end of T_TABLE_TITLE. types: "! Cells that are not table header, column header, or row header cells. begin of T_BODY_CELLS, + "! The unique ID of the cell in the current table. CELL_ID type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! The textual contents of this cell from the input document without associated + "! markup content. TEXT type STRING, + "! The `begin` index of this cell's `row` location in the current table. ROW_INDEX_BEGIN type LONG, + "! The `end` index of this cell's `row` location in the current table. ROW_INDEX_END type LONG, + "! The `begin` index of this cell's `column` location in the current table. COLUMN_INDEX_BEGIN type LONG, + "! The `end` index of this cell's `column` location in the current table. COLUMN_INDEX_END type LONG, + "! An array that contains the `id` value of a row header that is applicable to this + "! body cell. ROW_HEADER_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array that contains the `text` value of a row header that is applicable to + "! this body cell. ROW_HEADER_TEXTS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! If you provide customization input, the normalized version of the row header + "! texts according to the customization; otherwise, the same value as + "! `row_header_texts`. ROW_HEADER_TEXTS_NORMALIZED type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array that contains the `id` value of a column header that is applicable to + "! the current cell. COLUMN_HEADER_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array that contains the `text` value of a column header that is applicable to + "! the current cell. COLUMN_HEADER_TEXTS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! If you provide customization input, the normalized version of the column header + "! texts according to the customization; otherwise, the same value as + "! `column_header_texts`. COLUMN_HEADER_TEXTS_NORMALIZED type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! No documentation available. ATTRIBUTES type STANDARD TABLE OF T_ATTRIBUTE WITH NON-UNIQUE DEFAULT KEY, end of T_BODY_CELLS. types: "! A key in a key-value pair. begin of T_KEY, + "! The unique ID of the key in the table. CELL_ID type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! The text content of the table cell without HTML markup. TEXT type STRING, end of T_KEY. types: "! A value in a key-value pair. begin of T_VALUE, + "! The unique ID of the value in the table. CELL_ID type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! The text content of the table cell without HTML markup. TEXT type STRING, end of T_VALUE. types: "! Key-value pairs detected across cell boundaries. begin of T_KEY_VALUE_PAIR, + "! A key in a key-value pair. KEY type T_KEY, + "! A list of values in a key-value pair. VALUE type STANDARD TABLE OF T_VALUE WITH NON-UNIQUE DEFAULT KEY, end of T_KEY_VALUE_PAIR. types: "! The contents of the current table's header. begin of T_TABLE_HEADERS, + "! The unique ID of the cell in the current table. CELL_ID type STRING, + "! The location of the table header cell in the current table as defined by its + "! `begin` and `end` offsets, respectfully, in the input document. LOCATION type JSONOBJECT, + "! The textual contents of the cell from the input document without associated + "! markup content. TEXT type STRING, + "! The `begin` index of this cell's `row` location in the current table. ROW_INDEX_BEGIN type LONG, + "! The `end` index of this cell's `row` location in the current table. ROW_INDEX_END type LONG, + "! The `begin` index of this cell's `column` location in the current table. COLUMN_INDEX_BEGIN type LONG, + "! The `end` index of this cell's `column` location in the current table. COLUMN_INDEX_END type LONG, end of T_TABLE_HEADERS. types: "! Row-level cells, each applicable as a header to other cells in the same row as "! itself, of the current table. begin of T_ROW_HEADERS, + "! The unique ID of the cell in the current table. CELL_ID type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! The textual contents of this cell from the input document without associated + "! markup content. TEXT type STRING, + "! If you provide customization input, the normalized version of the cell text + "! according to the customization; otherwise, the same value as `text`. TEXT_NORMALIZED type STRING, + "! The `begin` index of this cell's `row` location in the current table. ROW_INDEX_BEGIN type LONG, + "! The `end` index of this cell's `row` location in the current table. ROW_INDEX_END type LONG, + "! The `begin` index of this cell's `column` location in the current table. COLUMN_INDEX_BEGIN type LONG, + "! The `end` index of this cell's `column` location in the current table. COLUMN_INDEX_END type LONG, end of T_ROW_HEADERS. types: "! The contents of the tables extracted from a document. begin of T_TABLES, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! The textual contents of the current table from the input document without + "! associated markup content. TEXT type STRING, + "! The table's section title, if identified. SECTION_TITLE type T_SECTION_TITLE, + "! If identified, the title or caption of the current table of the form `Table x.: + "! ...`. Empty when no title is identified. When exposed, the `title` is also + "! excluded from the `contexts` array of the same table. TITLE type T_TABLE_TITLE, + "! An array of table-level cells that apply as headers to all the other cells in + "! the current table. TABLE_HEADERS type STANDARD TABLE OF T_TABLE_HEADERS WITH NON-UNIQUE DEFAULT KEY, + "! An array of row-level cells, each applicable as a header to other cells in the + "! same row as itself, of the current table. ROW_HEADERS type STANDARD TABLE OF T_ROW_HEADERS WITH NON-UNIQUE DEFAULT KEY, + "! An array of column-level cells, each applicable as a header to other cells in + "! the same column as itself, of the current table. COLUMN_HEADERS type STANDARD TABLE OF T_COLUMN_HEADERS WITH NON-UNIQUE DEFAULT KEY, + "! An array of cells that are neither table header nor column header nor row header + "! cells, of the current table with corresponding row and column header + "! associations. BODY_CELLS type STANDARD TABLE OF T_BODY_CELLS WITH NON-UNIQUE DEFAULT KEY, + "! An array of objects that list text that is related to the table contents and + "! that precedes or follows the current table. CONTEXTS type STANDARD TABLE OF T_CONTEXTS WITH NON-UNIQUE DEFAULT KEY, + "! An array of key-value pairs identified in the current table. KEY_VALUE_PAIRS type STANDARD TABLE OF T_KEY_VALUE_PAIR WITH NON-UNIQUE DEFAULT KEY, end of T_TABLES. types: "! Information about the parsed input document. begin of T_DOC_INFO, + "! The full text of the parsed document in HTML format. HTML type STRING, + "! The title of the parsed document. If the service did not detect a title, the + "! value of this element is `null`. TITLE type STRING, + "! The MD5 hash of the input document. HASH type STRING, end of T_DOC_INFO. types: "! The analysis of the document's tables. begin of T_TABLE_RETURN, + "! Information about the parsed input document. DOCUMENT type T_DOC_INFO, + "! The ID of the model used to extract the table contents. The value for table + "! extraction is `tables`. MODEL_ID type STRING, + "! The version of the `tables` model ID. MODEL_VERSION type STRING, + "! Definitions of the tables identified in the input document. TABLES type STANDARD TABLE OF T_TABLES WITH NON-UNIQUE DEFAULT KEY, end of T_TABLE_RETURN. types: "! Information about the document and the submitted feedback. begin of T_FEEDBACK_RETURN, + "! The unique ID of the feedback object. FEEDBACK_ID type STRING, + "! An optional string identifying the person submitting feedback. USER_ID type STRING, + "! An optional comment from the person submitting the feedback. COMMENT type STRING, + "! Timestamp listing the creation time of the feedback submission. CREATED type DATETIME, + "! Information returned from the **Add Feedback** method. FEEDBACK_DATA type T_FEEDBACK_DATA_OUTPUT, end of T_FEEDBACK_RETURN. types: "! The details of the normalized text, if applicable. This element is optional; it "! is returned only if normalized text exists. begin of T_INTERPRETATION, + "! The value that was located in the normalized text. VALUE type STRING, + "! An integer or float expressing the numeric value of the `value` key. NUMERIC_VALUE type NUMBER, + "! A string listing the unit of the value that was found in the normalized + "! text.
+ "!
+ "! **Note:** The value of `unit` is the [ISO-4217 currency + "! code](https://www.iso.org/iso-4217-currency-codes.html) identified for the + "! currency amount (for example, `USD` or `EUR`). If the service cannot + "! disambiguate a currency symbol (for example, `$` or `£`), the value of `unit` + "! contains the ambiguous symbol as-is. UNIT type STRING, end of T_INTERPRETATION. types: "! A monetary amount identified in the input document. begin of T_CONTRACT_AMTS, + "! The confidence level in the identification of the contract amount. CONFIDENCE_LEVEL type STRING, + "! The monetary amount. TEXT type STRING, + "! The normalized form of the amount, which is listed as a string. This element is + "! optional; it is returned only if normalized text exists. TEXT_NORMALIZED type STRING, + "! The details of the normalized text, if applicable. This element is optional; it + "! is returned only if normalized text exists. INTERPRETATION type T_INTERPRETATION, + "! Hashed values that you can send to IBM to provide feedback or receive support. PROVENANCE_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_CONTRACT_AMTS. types: "! The contract currencies that are declared in the document. begin of T_CONTRACT_CURRENCIES, + "! The confidence level in the identification of the contract currency. CONFIDENCE_LEVEL type STRING, + "! The contract currency. TEXT type STRING, + "! The normalized form of the contract currency, which is listed as a string in + "! [ISO-4217](https://www.iso.org/iso-4217-currency-codes.html) format. This + "! element is optional; it is returned only if normalized text exists. TEXT_NORMALIZED type STRING, + "! Hashed values that you can send to IBM to provide feedback or receive support. PROVENANCE_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_CONTRACT_CURRENCIES. types: "! The document's payment duration or durations. begin of T_PAYMENT_TERMS, + "! The confidence level in the identification of the payment term. CONFIDENCE_LEVEL type STRING, + "! The payment term (duration). TEXT type STRING, + "! The normalized form of the payment term, which is listed as a string. This + "! element is optional; it is returned only if normalized text exists. TEXT_NORMALIZED type STRING, + "! The details of the normalized text, if applicable. This element is optional; it + "! is returned only if normalized text exists. INTERPRETATION type T_INTERPRETATION, + "! Hashed values that you can send to IBM to provide feedback or receive support. PROVENANCE_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_PAYMENT_TERMS. types: "! A component part of the document. begin of T_ELEMENT, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! The text of the element. TEXT type STRING, + "! Description of the action specified by the element and whom it affects. TYPES type STANDARD TABLE OF T_TYPE_LABEL WITH NON-UNIQUE DEFAULT KEY, + "! List of functional categories into which the element falls; in other words, the + "! subject matter of the element. CATEGORIES type STANDARD TABLE OF T_CATEGORY WITH NON-UNIQUE DEFAULT KEY, + "! List of document attributes. ATTRIBUTES type STANDARD TABLE OF T_ATTRIBUTE WITH NON-UNIQUE DEFAULT KEY, end of T_ELEMENT. types: "! Termination dates identified in the input document. begin of T_TERMINATION_DATES, + "! The confidence level in the identification of the termination date. CONFIDENCE_LEVEL type STRING, + "! The termination date. TEXT type STRING, + "! The normalized form of the termination date, which is listed as a string. This + "! element is optional; it is returned only if normalized text exists. TEXT_NORMALIZED type STRING, + "! Hashed values that you can send to IBM to provide feedback or receive support. PROVENANCE_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_TERMINATION_DATES. types: "! The contract type identified in the input document. begin of T_CONTRACT_TYPES, + "! The confidence level in the identification of the contract type. CONFIDENCE_LEVEL type STRING, + "! The contract type. TEXT type STRING, + "! Hashed values that you can send to IBM to provide feedback or receive support. PROVENANCE_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_CONTRACT_TYPES. types: "! An effective date. begin of T_EFFECTIVE_DATES, + "! The confidence level in the identification of the effective date. CONFIDENCE_LEVEL type STRING, + "! The effective date, listed as a string. TEXT type STRING, + "! The normalized form of the effective date, which is listed as a string. This + "! element is optional; it is returned only if normalized text exists. TEXT_NORMALIZED type STRING, + "! Hashed values that you can send to IBM to provide feedback or receive support. PROVENANCE_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_EFFECTIVE_DATES. types: "! A mention of a party. begin of T_MENTION, + "! The name of the party. TEXT type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_MENTION. types: "! A party's address. begin of T_ADDRESS, + "! A string listing the address. TEXT type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_ADDRESS. types: "! A party and its corresponding role, including address and contact information if "! identified. begin of T_PARTIES, + "! The normalized form of the party's name. PARTY type STRING, + "! A string identifying the party's role. ROLE type STRING, + "! A string that identifies the importance of the party. IMPORTANCE type STRING, + "! A list of the party's address or addresses. ADDRESSES type STANDARD TABLE OF T_ADDRESS WITH NON-UNIQUE DEFAULT KEY, + "! A list of the names and roles of contacts identified in the input document. CONTACTS type STANDARD TABLE OF T_CONTACT WITH NON-UNIQUE DEFAULT KEY, + "! A list of the party's mentions in the input document. MENTIONS type STANDARD TABLE OF T_MENTION WITH NON-UNIQUE DEFAULT KEY, end of T_PARTIES. types: "! Basic information about the input document. begin of T_DOCUMENT, + "! Document title, if detected. TITLE type STRING, + "! The input document converted into HTML format. HTML type STRING, + "! The MD5 hash value of the input document. HASH type STRING, + "! The label applied to the input document with the calling method's `file_1_label` + "! or `file_2_label` value. This field is specified only in the output of the + "! **Comparing two documents** method. LABEL type STRING, end of T_DOCUMENT. types: "! The duration or durations of the contract. begin of T_CONTRACT_TERMS, + "! The confidence level in the identification of the contract term. CONFIDENCE_LEVEL type STRING, + "! The contract term (duration). TEXT type STRING, + "! The normalized form of the contract term, which is listed as a string. This + "! element is optional; it is returned only if normalized text exists. TEXT_NORMALIZED type STRING, + "! The details of the normalized text, if applicable. This element is optional; it + "! is returned only if normalized text exists. INTERPRETATION type T_INTERPRETATION, + "! Hashed values that you can send to IBM to provide feedback or receive support. PROVENANCE_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, end of T_CONTRACT_TERMS. types: "! The analysis of objects returned by the **Element classification** method. begin of T_CLASSIFY_RETURN, + "! Basic information about the input document. DOCUMENT type T_DOCUMENT, + "! The analysis model used to classify the input document. For the **Element + "! classification** method, the only valid value is `contracts`. MODEL_ID type STRING, + "! The version of the analysis model identified by the value of the `model_id` key. + "! MODEL_VERSION type STRING, + "! Document elements identified by the service. ELEMENTS type STANDARD TABLE OF T_ELEMENT WITH NON-UNIQUE DEFAULT KEY, + "! The date or dates on which the document becomes effective. EFFECTIVE_DATES type STANDARD TABLE OF T_EFFECTIVE_DATES WITH NON-UNIQUE DEFAULT KEY, + "! The monetary amounts that identify the total amount of the contract that needs + "! to be paid from one party to another. CONTRACT_AMOUNTS type STANDARD TABLE OF T_CONTRACT_AMTS WITH NON-UNIQUE DEFAULT KEY, + "! The dates on which the document is to be terminated. TERMINATION_DATES type STANDARD TABLE OF T_TERMINATION_DATES WITH NON-UNIQUE DEFAULT KEY, + "! The contract type as declared in the document. CONTRACT_TYPES type STANDARD TABLE OF T_CONTRACT_TYPES WITH NON-UNIQUE DEFAULT KEY, + "! The durations of the contract. CONTRACT_TERMS type STANDARD TABLE OF T_CONTRACT_TERMS WITH NON-UNIQUE DEFAULT KEY, + "! The document's payment durations. PAYMENT_TERMS type STANDARD TABLE OF T_PAYMENT_TERMS WITH NON-UNIQUE DEFAULT KEY, + "! The contract currencies as declared in the document. CONTRACT_CURRENCIES type STANDARD TABLE OF T_CONTRACT_CURRENCIES WITH NON-UNIQUE DEFAULT KEY, + "! Definition of tables identified in the input document. TABLES type STANDARD TABLE OF T_TABLES WITH NON-UNIQUE DEFAULT KEY, + "! The structure of the input document. DOCUMENT_STRUCTURE type T_DOC_STRUCTURE, + "! Definitions of the parties identified in the input document. PARTIES type STANDARD TABLE OF T_PARTIES WITH NON-UNIQUE DEFAULT KEY, end of T_CLASSIFY_RETURN. types: "! The original labeling from the input document, without the submitted feedback. begin of T_ORIGINAL_LABELS_IN, + "! Description of the action specified by the element and whom it affects. TYPES type STANDARD TABLE OF T_TYPE_LABEL WITH NON-UNIQUE DEFAULT KEY, + "! List of functional categories into which the element falls; in other words, the + "! subject matter of the element. CATEGORIES type STANDARD TABLE OF T_CATEGORY WITH NON-UNIQUE DEFAULT KEY, end of T_ORIGINAL_LABELS_IN. types: "! Details of semantically aligned elements. begin of T_ELEMENT_PAIR, + "! The label of the document (that is, the value of either the `file_1_label` or + "! `file_2_label` parameters) in which the element occurs. DOCUMENT_LABEL type STRING, + "! The contents of the element. TEXT type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! Description of the action specified by the element and whom it affects. TYPES type STANDARD TABLE OF T_TYPE_LABEL_COMPARISON WITH NON-UNIQUE DEFAULT KEY, + "! List of functional categories into which the element falls; in other words, the + "! subject matter of the element. CATEGORIES type STANDARD TABLE OF T_CATEGORY_COMPARISON WITH NON-UNIQUE DEFAULT KEY, + "! List of document attributes. ATTRIBUTES type STANDARD TABLE OF T_ATTRIBUTE WITH NON-UNIQUE DEFAULT KEY, end of T_ELEMENT_PAIR. types: - "! + "! No documentation available. begin of T_ALIGNED_ELEMENT, + "! Identifies two elements that semantically align between the compared documents. ELEMENT_PAIR type STANDARD TABLE OF T_ELEMENT_PAIR WITH NON-UNIQUE DEFAULT KEY, + "! Specifies whether the aligned element is identical. Elements are considered + "! identical despite minor differences such as leading punctuation, + "! end-of-sentence punctuation, whitespace, the presence or absence of definite or + "! indefinite articles, and others. IDENTICAL_TEXT type BOOLEAN, + "! Hashed values that you can send to IBM to provide feedback or receive support. PROVENANCE_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! Indicates that the elements aligned are contractual clauses of significance. SIGNIFICANT_ELEMENTS type BOOLEAN, end of T_ALIGNED_ELEMENT. types: "! The comparison of the two submitted documents. begin of T_COMPARE_RETURN, + "! The analysis model used to compare the input documents. For the **Compare two + "! documents** method, the only valid value is `contracts`. MODEL_ID type STRING, + "! The version of the analysis model identified by the value of the `model_id` key. + "! MODEL_VERSION type STRING, + "! Information about the documents being compared. DOCUMENTS type STANDARD TABLE OF T_DOCUMENT WITH NON-UNIQUE DEFAULT KEY, + "! A list of pairs of elements that semantically align between the compared + "! documents. ALIGNED_ELEMENTS type STANDARD TABLE OF T_ALIGNED_ELEMENT WITH NON-UNIQUE DEFAULT KEY, + "! A list of elements that do not semantically align between the compared + "! documents. UNALIGNED_ELEMENTS type STANDARD TABLE OF T_UNALIGNED_ELEMENT WITH NON-UNIQUE DEFAULT KEY, end of T_COMPARE_RETURN. types: "! The HTML converted from an input document. begin of T_HTMLRETURN, + "! The number of pages in the input document. NUM_PAGES type STRING, + "! The author of the input document, if identified. AUTHOR type STRING, + "! The publication date of the input document, if identified. PUBLICATION_DATE type STRING, + "! The title of the input document, if identified. TITLE type STRING, + "! The HTML version of the input document. HTML type STRING, end of T_HTMLRETURN. types: "! Feedback data for submission. begin of T_FEEDBACK_DATA_INPUT, + "! The type of feedback. The only permitted value is `element_classification`. FEEDBACK_TYPE type STRING, + "! Brief information about the input document. DOCUMENT type T_SHORT_DOC, + "! An optional string identifying the model ID. The only permitted value is + "! `contracts`. MODEL_ID type STRING, + "! An optional string identifying the version of the model used. MODEL_VERSION type STRING, + "! The numeric location of the identified element in the document, represented with + "! two integers labeled `begin` and `end`. LOCATION type T_LOCATION, + "! The text on which to submit feedback. TEXT type STRING, + "! The original labeling from the input document, without the submitted feedback. ORIGINAL_LABELS type T_ORIGINAL_LABELS_IN, + "! The updated labeling from the input document, accounting for the submitted + "! feedback. UPDATED_LABELS type T_UPDATED_LABELS_IN, end of T_FEEDBACK_DATA_INPUT. types: @@ -516,25 +869,42 @@ public section. types: "! The batch-request status. begin of T_BATCH_STATUS, + "! The method to be run against the documents. Possible values are + "! `html_conversion`, `element_classification`, and `tables`. FUNCTION type STRING, + "! The geographical location of the Cloud Object Storage input bucket as listed on + "! the **Endpoint** tab of your COS instance; for example, `us-geo`, `eu-geo`, or + "! `ap-geo`. INPUT_BUCKET_LOCATION type STRING, + "! The name of the Cloud Object Storage input bucket. INPUT_BUCKET_NAME type STRING, + "! The geographical location of the Cloud Object Storage output bucket as listed on + "! the **Endpoint** tab of your COS instance; for example, `us-geo`, `eu-geo`, or + "! `ap-geo`. OUTPUT_BUCKET_LOCATION type STRING, + "! The name of the Cloud Object Storage output bucket. OUTPUT_BUCKET_NAME type STRING, + "! The unique identifier for the batch request. BATCH_ID type STRING, + "! Document counts. DOCUMENT_COUNTS type T_DOC_COUNTS, + "! The status of the batch request. STATUS type STRING, + "! The creation time of the batch request. CREATED type DATETIME, + "! The time of the most recent update to the batch request. UPDATED type DATETIME, end of T_BATCH_STATUS. types: "! The results of a successful **List Batches** request. begin of T_BATCHES, + "! A list of the status of all batch requests. BATCHES type STANDARD TABLE OF T_BATCH_STATUS WITH NON-UNIQUE DEFAULT KEY, end of T_BATCHES. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT, + "! The document to convert. FILE type FILE, end of T_INLINE_OBJECT. types: @@ -553,54 +923,82 @@ public section. types: "! The status and message of the deletion request. begin of T_FEEDBACK_DELETED, + "! HTTP return code. STATUS type INTEGER, + "! Status message returned from the service. MESSAGE type STRING, end of T_FEEDBACK_DELETED. types: "! The feedback to be added to an element in the document. begin of T_FEEDBACK_INPUT, + "! An optional string identifying the user. USER_ID type STRING, + "! An optional comment on or description of the feedback. COMMENT type STRING, + "! Feedback data for submission. FEEDBACK_DATA type T_FEEDBACK_DATA_INPUT, end of T_FEEDBACK_INPUT. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT1, + "! The document to classify. FILE type FILE, end of T_INLINE_OBJECT1. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT2, + "! The document on which to run table extraction. FILE type FILE, end of T_INLINE_OBJECT2. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT3, + "! The first document to compare. FILE_1 type FILE, + "! The second document to compare. FILE_2 type FILE, end of T_INLINE_OBJECT3. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT4, + "! A JSON file containing the input Cloud Object Storage credentials. At a minimum, + "! the credentials must enable `READ` permissions on the bucket defined by the + "! `input_bucket_name` parameter. INPUT_CREDENTIALS_FILE type FILE, + "! The geographical location of the Cloud Object Storage input bucket as listed on + "! the **Endpoint** tab of your Cloud Object Storage instance; for example, + "! `us-geo`, `eu-geo`, or `ap-geo`. INPUT_BUCKET_LOCATION type STRING, + "! The name of the Cloud Object Storage input bucket. INPUT_BUCKET_NAME type STRING, + "! A JSON file that lists the Cloud Object Storage output credentials. At a + "! minimum, the credentials must enable `READ` and `WRITE` permissions on the + "! bucket defined by the `output_bucket_name` parameter. OUTPUT_CREDENTIALS_FILE type FILE, + "! The geographical location of the Cloud Object Storage output bucket as listed on + "! the **Endpoint** tab of your Cloud Object Storage instance; for example, + "! `us-geo`, `eu-geo`, or `ap-geo`. OUTPUT_BUCKET_LOCATION type STRING, + "! The name of the Cloud Object Storage output bucket. OUTPUT_BUCKET_NAME type STRING, end of T_INLINE_OBJECT4. types: "! The results of a successful **Get Feedback** request for a single feedback "! entry. begin of T_GET_FEEDBACK, + "! A string uniquely identifying the feedback entry. FEEDBACK_ID type STRING, + "! A timestamp identifying the creation time of the feedback entry. CREATED type DATETIME, + "! A string containing the user's comment about the feedback entry. COMMENT type STRING, + "! Information returned from the **Add Feedback** method. FEEDBACK_DATA type T_FEEDBACK_DATA_OUTPUT, end of T_GET_FEEDBACK. types: "! The results of a successful **List Feedback** request for all feedback. begin of T_FEEDBACK_LIST, + "! A list of all feedback for the document. FEEDBACK type STANDARD TABLE OF T_GET_FEEDBACK WITH NON-UNIQUE DEFAULT KEY, end of T_FEEDBACK_LIST. types: @@ -831,11 +1229,11 @@ constants: "! Convert document to HTML. "! - "! @parameter I_file | + "! @parameter I_FILE | "! The document to convert. - "! @parameter I_file_content_type | + "! @parameter I_FILE_CONTENT_TYPE | "! The content type of file. - "! @parameter I_model | + "! @parameter I_MODEL | "! The analysis model to be used by the service. For the **Element classification** "! and **Compare two documents** methods, the default is `contracts`. For the "! **Extract tables** method, the default is `tables`. These defaults apply to the @@ -843,12 +1241,13 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_HTMLRETURN + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CONVERT_TO_HTML importing - !I_file type FILE - !I_file_content_type type STRING optional - !I_model type STRING optional + !I_FILE type FILE + !I_FILE_CONTENT_TYPE type STRING optional + !I_MODEL type STRING optional !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -858,11 +1257,11 @@ constants: "! Classify the elements of a document. "! - "! @parameter I_file | + "! @parameter I_FILE | "! The document to classify. - "! @parameter I_file_content_type | + "! @parameter I_FILE_CONTENT_TYPE | "! The content type of file. - "! @parameter I_model | + "! @parameter I_MODEL | "! The analysis model to be used by the service. For the **Element classification** "! and **Compare two documents** methods, the default is `contracts`. For the "! **Extract tables** method, the default is `tables`. These defaults apply to the @@ -870,12 +1269,13 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_CLASSIFY_RETURN + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CLASSIFY_ELEMENTS importing - !I_file type FILE - !I_file_content_type type STRING optional - !I_model type STRING optional + !I_FILE type FILE + !I_FILE_CONTENT_TYPE type STRING optional + !I_MODEL type STRING optional !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -885,11 +1285,11 @@ constants: "! Extract a document's tables. "! - "! @parameter I_file | + "! @parameter I_FILE | "! The document on which to run table extraction. - "! @parameter I_file_content_type | + "! @parameter I_FILE_CONTENT_TYPE | "! The content type of file. - "! @parameter I_model | + "! @parameter I_MODEL | "! The analysis model to be used by the service. For the **Element classification** "! and **Compare two documents** methods, the default is `contracts`. For the "! **Extract tables** method, the default is `tables`. These defaults apply to the @@ -897,12 +1297,13 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_TABLE_RETURN + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods EXTRACT_TABLES importing - !I_file type FILE - !I_file_content_type type STRING optional - !I_model type STRING optional + !I_FILE type FILE + !I_FILE_CONTENT_TYPE type STRING optional + !I_MODEL type STRING optional !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -912,19 +1313,19 @@ constants: "! Compare two documents. "! - "! @parameter I_file_1 | + "! @parameter I_FILE_1 | "! The first document to compare. - "! @parameter I_file_2 | + "! @parameter I_FILE_2 | "! The second document to compare. - "! @parameter I_file_1_content_type | + "! @parameter I_FILE_1_CONTENT_TYPE | "! The content type of file1. - "! @parameter I_file_2_content_type | + "! @parameter I_FILE_2_CONTENT_TYPE | "! The content type of file2. - "! @parameter I_file_1_label | + "! @parameter I_FILE_1_LABEL | "! A text label for the first document. - "! @parameter I_file_2_label | + "! @parameter I_FILE_2_LABEL | "! A text label for the second document. - "! @parameter I_model | + "! @parameter I_MODEL | "! The analysis model to be used by the service. For the **Element classification** "! and **Compare two documents** methods, the default is `contracts`. For the "! **Extract tables** method, the default is `tables`. These defaults apply to the @@ -932,16 +1333,17 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_COMPARE_RETURN + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods COMPARE_DOCUMENTS importing - !I_file_1 type FILE - !I_file_2 type FILE - !I_file_1_content_type type STRING optional - !I_file_2_content_type type STRING optional - !I_file_1_label type STRING default 'file_1' - !I_file_2_label type STRING default 'file_2' - !I_model type STRING optional + !I_FILE_1 type FILE + !I_FILE_2 type FILE + !I_FILE_1_CONTENT_TYPE type STRING optional + !I_FILE_2_CONTENT_TYPE type STRING optional + !I_FILE_1_LABEL type STRING default 'file_1' + !I_FILE_2_LABEL type STRING default 'file_2' + !I_MODEL type STRING optional !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -951,14 +1353,15 @@ constants: "! Add feedback. "! - "! @parameter I_feedback_data | + "! @parameter I_FEEDBACK_DATA | "! An object that defines the feedback to be submitted. "! @parameter E_RESPONSE | "! Service return value of type T_FEEDBACK_RETURN + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ADD_FEEDBACK importing - !I_feedback_data type T_FEEDBACK_INPUT + !I_FEEDBACK_DATA type T_FEEDBACK_INPUT !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -967,84 +1370,85 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! List the feedback in a document. "! - "! @parameter I_feedback_type | + "! @parameter I_FEEDBACK_TYPE | "! An optional string that filters the output to include only feedback with the "! specified feedback type. The only permitted value is `element_classification`. - "! @parameter I_before | + "! @parameter I_BEFORE | "! An optional string in the format `YYYY-MM-DD` that filters the output to include "! only feedback that was added before the specified date. - "! @parameter I_after | + "! @parameter I_AFTER | "! An optional string in the format `YYYY-MM-DD` that filters the output to include "! only feedback that was added after the specified date. - "! @parameter I_document_title | + "! @parameter I_DOCUMENT_TITLE | "! An optional string that filters the output to include only feedback from the "! document with the specified `document_title`. - "! @parameter I_model_id | + "! @parameter I_MODEL_ID | "! An optional string that filters the output to include only feedback with the "! specified `model_id`. The only permitted value is `contracts`. - "! @parameter I_model_version | + "! @parameter I_MODEL_VERSION | "! An optional string that filters the output to include only feedback with the "! specified `model_version`. - "! @parameter I_category_removed | + "! @parameter I_CATEGORY_REMOVED | "! An optional string in the form of a comma-separated list of categories. If it is "! specified, the service filters the output to include only feedback that has at "! least one category from the list removed. - "! @parameter I_category_added | + "! @parameter I_CATEGORY_ADDED | "! An optional string in the form of a comma-separated list of categories. If this "! is specified, the service filters the output to include only feedback that has "! at least one category from the list added. - "! @parameter I_category_not_changed | + "! @parameter I_CATEGORY_NOT_CHANGED | "! An optional string in the form of a comma-separated list of categories. If this "! is specified, the service filters the output to include only feedback that has "! at least one category from the list unchanged. - "! @parameter I_type_removed | + "! @parameter I_TYPE_REMOVED | "! An optional string of comma-separated `nature`:`party` pairs. If this is "! specified, the service filters the output to include only feedback that has at "! least one `nature`:`party` pair from the list removed. - "! @parameter I_type_added | + "! @parameter I_TYPE_ADDED | "! An optional string of comma-separated `nature`:`party` pairs. If this is "! specified, the service filters the output to include only feedback that has at "! least one `nature`:`party` pair from the list removed. - "! @parameter I_type_not_changed | + "! @parameter I_TYPE_NOT_CHANGED | "! An optional string of comma-separated `nature`:`party` pairs. If this is "! specified, the service filters the output to include only feedback that has at "! least one `nature`:`party` pair from the list unchanged. - "! @parameter I_page_limit | + "! @parameter I_PAGE_LIMIT | "! An optional integer specifying the number of documents that you want the service "! to return. - "! @parameter I_cursor | + "! @parameter I_CURSOR | "! An optional string that returns the set of documents after the previous set. Use "! this parameter with the `page_limit` parameter. - "! @parameter I_sort | + "! @parameter I_SORT | "! An optional comma-separated list of fields in the document to sort on. You can "! optionally specify the sort direction by prefixing the value of the field with "! `-` for descending order or `+` for ascending order (the default). Currently "! permitted sorting fields are `created`, `user_id`, and `document_title`. - "! @parameter I_include_total | + "! @parameter I_INCLUDE_TOTAL | "! An optional boolean value. If specified as `true`, the `pagination` object in "! the output includes a value called `total` that gives the total count of "! feedback created. "! @parameter E_RESPONSE | "! Service return value of type T_FEEDBACK_LIST + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_FEEDBACK importing - !I_feedback_type type STRING optional - !I_before type DATE optional - !I_after type DATE optional - !I_document_title type STRING optional - !I_model_id type STRING optional - !I_model_version type STRING optional - !I_category_removed type STRING optional - !I_category_added type STRING optional - !I_category_not_changed type STRING optional - !I_type_removed type STRING optional - !I_type_added type STRING optional - !I_type_not_changed type STRING optional - !I_page_limit type INTEGER optional - !I_cursor type STRING optional - !I_sort type STRING optional - !I_include_total type BOOLEAN optional + !I_FEEDBACK_TYPE type STRING optional + !I_BEFORE type DATE optional + !I_AFTER type DATE optional + !I_DOCUMENT_TITLE type STRING optional + !I_MODEL_ID type STRING optional + !I_MODEL_VERSION type STRING optional + !I_CATEGORY_REMOVED type STRING optional + !I_CATEGORY_ADDED type STRING optional + !I_CATEGORY_NOT_CHANGED type STRING optional + !I_TYPE_REMOVED type STRING optional + !I_TYPE_ADDED type STRING optional + !I_TYPE_NOT_CHANGED type STRING optional + !I_PAGE_LIMIT type INTEGER optional + !I_CURSOR type STRING optional + !I_SORT type STRING optional + !I_INCLUDE_TOTAL type BOOLEAN optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_FEEDBACK_LIST @@ -1052,9 +1456,9 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get a specified feedback entry. "! - "! @parameter I_feedback_id | + "! @parameter I_FEEDBACK_ID | "! A string that specifies the feedback entry to be included in the output. - "! @parameter I_model | + "! @parameter I_MODEL | "! The analysis model to be used by the service. For the **Element classification** "! and **Compare two documents** methods, the default is `contracts`. For the "! **Extract tables** method, the default is `tables`. These defaults apply to the @@ -1062,11 +1466,12 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_GET_FEEDBACK + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_FEEDBACK importing - !I_feedback_id type STRING - !I_model type STRING optional + !I_FEEDBACK_ID type STRING + !I_MODEL type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_GET_FEEDBACK @@ -1074,9 +1479,9 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a specified feedback entry. "! - "! @parameter I_feedback_id | + "! @parameter I_FEEDBACK_ID | "! A string that specifies the feedback entry to be deleted from the document. - "! @parameter I_model | + "! @parameter I_MODEL | "! The analysis model to be used by the service. For the **Element classification** "! and **Compare two documents** methods, the default is `contracts`. For the "! **Extract tables** method, the default is `tables`. These defaults apply to the @@ -1084,11 +1489,12 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_FEEDBACK_DELETED + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_FEEDBACK importing - !I_feedback_id type STRING - !I_model type STRING optional + !I_FEEDBACK_ID type STRING + !I_MODEL type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_FEEDBACK_DELETED @@ -1097,29 +1503,29 @@ constants: "! Submit a batch-processing request. "! - "! @parameter I_function | + "! @parameter I_FUNCTION | "! The Compare and Comply method to run across the submitted input documents. - "! @parameter I_input_credentials_file | + "! @parameter I_INPUT_CREDENTIALS_FILE | "! A JSON file containing the input Cloud Object Storage credentials. At a minimum, "! the credentials must enable `READ` permissions on the bucket defined by the "! `input_bucket_name` parameter. - "! @parameter I_input_bucket_location | + "! @parameter I_INPUT_BUCKET_LOCATION | "! The geographical location of the Cloud Object Storage input bucket as listed on "! the **Endpoint** tab of your Cloud Object Storage instance; for example, "! `us-geo`, `eu-geo`, or `ap-geo`. - "! @parameter I_input_bucket_name | + "! @parameter I_INPUT_BUCKET_NAME | "! The name of the Cloud Object Storage input bucket. - "! @parameter I_output_credentials_file | + "! @parameter I_OUTPUT_CREDENTIALS_FILE | "! A JSON file that lists the Cloud Object Storage output credentials. At a "! minimum, the credentials must enable `READ` and `WRITE` permissions on the "! bucket defined by the `output_bucket_name` parameter. - "! @parameter I_output_bucket_location | + "! @parameter I_OUTPUT_BUCKET_LOCATION | "! The geographical location of the Cloud Object Storage output bucket as listed on "! the **Endpoint** tab of your Cloud Object Storage instance; for example, "! `us-geo`, `eu-geo`, or `ap-geo`. - "! @parameter I_output_bucket_name | + "! @parameter I_OUTPUT_BUCKET_NAME | "! The name of the Cloud Object Storage output bucket. - "! @parameter I_model | + "! @parameter I_MODEL | "! The analysis model to be used by the service. For the **Element classification** "! and **Compare two documents** methods, the default is `contracts`. For the "! **Extract tables** method, the default is `tables`. These defaults apply to the @@ -1127,19 +1533,20 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_BATCH_STATUS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_BATCH importing - !I_function type STRING - !I_input_credentials_file type FILE - !I_input_bucket_location type STRING - !I_input_bucket_name type STRING - !I_output_credentials_file type FILE - !I_output_bucket_location type STRING - !I_output_bucket_name type STRING - !I_model type STRING optional - !I_input_credentials_file_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL - !I_output_credentials_file_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL + !I_FUNCTION type STRING + !I_INPUT_CREDENTIALS_FILE type FILE + !I_INPUT_BUCKET_LOCATION type STRING + !I_INPUT_BUCKET_NAME type STRING + !I_OUTPUT_CREDENTIALS_FILE type FILE + !I_OUTPUT_BUCKET_LOCATION type STRING + !I_OUTPUT_BUCKET_NAME type STRING + !I_MODEL type STRING optional + !I_INPUT_CREDENTIALS_FILE_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL + !I_OUTPUT_CREDENTIALS_FILE_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -1150,6 +1557,7 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_BATCHES + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_BATCHES importing @@ -1160,14 +1568,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get information about a specific batch-processing job. "! - "! @parameter I_batch_id | + "! @parameter I_BATCH_ID | "! The ID of the batch-processing job whose information you want to retrieve. "! @parameter E_RESPONSE | "! Service return value of type T_BATCH_STATUS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_BATCH importing - !I_batch_id type STRING + !I_BATCH_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_BATCH_STATUS @@ -1175,11 +1584,11 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update a pending or active batch-processing job. "! - "! @parameter I_batch_id | + "! @parameter I_BATCH_ID | "! The ID of the batch-processing job you want to update. - "! @parameter I_action | + "! @parameter I_ACTION | "! The action you want to perform on the specified batch-processing job. - "! @parameter I_model | + "! @parameter I_MODEL | "! The analysis model to be used by the service. For the **Element classification** "! and **Compare two documents** methods, the default is `contracts`. For the "! **Extract tables** method, the default is `tables`. These defaults apply to the @@ -1187,12 +1596,13 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_BATCH_STATUS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_BATCH importing - !I_batch_id type STRING - !I_action type STRING - !I_model type STRING optional + !I_BATCH_ID type STRING + !I_ACTION type STRING + !I_MODEL type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_BATCH_STATUS @@ -1235,7 +1645,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -1276,7 +1686,7 @@ endmethod. * +--------------------------------------------------------------------------------------
method get_sdk_version_date. - e_sdk_version_date = '20191002122838'. + e_sdk_version_date = '20200210092814'. endmethod. @@ -1285,9 +1695,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_COMPARE_COMPLY_V1->CONVERT_TO_HTML * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_file TYPE FILE -* | [--->] I_file_content_type TYPE STRING(optional) -* | [--->] I_model TYPE STRING(optional) +* | [--->] I_FILE TYPE FILE +* | [--->] I_FILE_CONTENT_TYPE TYPE STRING(optional) +* | [--->] I_MODEL TYPE STRING(optional) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_HTMLRETURN @@ -1315,8 +1725,8 @@ method CONVERT_TO_HTML. data: lv_queryparam type string. - if i_model is supplied. - lv_queryparam = escape( val = i_model format = cl_abap_format=>e_uri_full ). + if i_MODEL is supplied. + lv_queryparam = escape( val = i_MODEL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `model` @@ -1341,14 +1751,14 @@ method CONVERT_TO_HTML. - if not i_file is initial. + if not i_FILE is initial. lv_extension = get_file_extension( I_file_content_type ). lv_value = `form-data; name="file"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. ls_form_part-content_type = I_file_content_type. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_file. + ls_form_part-xdata = i_FILE. append ls_form_part to lt_form_part. endif. @@ -1374,9 +1784,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_COMPARE_COMPLY_V1->CLASSIFY_ELEMENTS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_file TYPE FILE -* | [--->] I_file_content_type TYPE STRING(optional) -* | [--->] I_model TYPE STRING(optional) +* | [--->] I_FILE TYPE FILE +* | [--->] I_FILE_CONTENT_TYPE TYPE STRING(optional) +* | [--->] I_MODEL TYPE STRING(optional) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CLASSIFY_RETURN @@ -1404,8 +1814,8 @@ method CLASSIFY_ELEMENTS. data: lv_queryparam type string. - if i_model is supplied. - lv_queryparam = escape( val = i_model format = cl_abap_format=>e_uri_full ). + if i_MODEL is supplied. + lv_queryparam = escape( val = i_MODEL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `model` @@ -1430,14 +1840,14 @@ method CLASSIFY_ELEMENTS. - if not i_file is initial. + if not i_FILE is initial. lv_extension = get_file_extension( I_file_content_type ). lv_value = `form-data; name="file"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. ls_form_part-content_type = I_file_content_type. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_file. + ls_form_part-xdata = i_FILE. append ls_form_part to lt_form_part. endif. @@ -1463,9 +1873,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_COMPARE_COMPLY_V1->EXTRACT_TABLES * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_file TYPE FILE -* | [--->] I_file_content_type TYPE STRING(optional) -* | [--->] I_model TYPE STRING(optional) +* | [--->] I_FILE TYPE FILE +* | [--->] I_FILE_CONTENT_TYPE TYPE STRING(optional) +* | [--->] I_MODEL TYPE STRING(optional) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TABLE_RETURN @@ -1493,8 +1903,8 @@ method EXTRACT_TABLES. data: lv_queryparam type string. - if i_model is supplied. - lv_queryparam = escape( val = i_model format = cl_abap_format=>e_uri_full ). + if i_MODEL is supplied. + lv_queryparam = escape( val = i_MODEL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `model` @@ -1519,14 +1929,14 @@ method EXTRACT_TABLES. - if not i_file is initial. + if not i_FILE is initial. lv_extension = get_file_extension( I_file_content_type ). lv_value = `form-data; name="file"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. ls_form_part-content_type = I_file_content_type. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_file. + ls_form_part-xdata = i_FILE. append ls_form_part to lt_form_part. endif. @@ -1552,13 +1962,13 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_COMPARE_COMPLY_V1->COMPARE_DOCUMENTS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_file_1 TYPE FILE -* | [--->] I_file_2 TYPE FILE -* | [--->] I_file_1_content_type TYPE STRING(optional) -* | [--->] I_file_2_content_type TYPE STRING(optional) -* | [--->] I_file_1_label TYPE STRING (default ='file_1') -* | [--->] I_file_2_label TYPE STRING (default ='file_2') -* | [--->] I_model TYPE STRING(optional) +* | [--->] I_FILE_1 TYPE FILE +* | [--->] I_FILE_2 TYPE FILE +* | [--->] I_FILE_1_CONTENT_TYPE TYPE STRING(optional) +* | [--->] I_FILE_2_CONTENT_TYPE TYPE STRING(optional) +* | [--->] I_FILE_1_LABEL TYPE STRING (default ='file_1') +* | [--->] I_FILE_2_LABEL TYPE STRING (default ='file_2') +* | [--->] I_MODEL TYPE STRING(optional) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COMPARE_RETURN @@ -1586,8 +1996,8 @@ method COMPARE_DOCUMENTS. data: lv_queryparam type string. - if i_file_1_label is supplied. - lv_queryparam = escape( val = i_file_1_label format = cl_abap_format=>e_uri_full ). + if i_FILE_1_LABEL is supplied. + lv_queryparam = escape( val = i_FILE_1_LABEL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `file_1_label` @@ -1596,8 +2006,8 @@ method COMPARE_DOCUMENTS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_file_2_label is supplied. - lv_queryparam = escape( val = i_file_2_label format = cl_abap_format=>e_uri_full ). + if i_FILE_2_LABEL is supplied. + lv_queryparam = escape( val = i_FILE_2_LABEL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `file_2_label` @@ -1606,8 +2016,8 @@ method COMPARE_DOCUMENTS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_model is supplied. - lv_queryparam = escape( val = i_model format = cl_abap_format=>e_uri_full ). + if i_MODEL is supplied. + lv_queryparam = escape( val = i_MODEL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `model` @@ -1632,25 +2042,25 @@ method COMPARE_DOCUMENTS. - if not i_file_1 is initial. + if not i_FILE_1 is initial. lv_extension = get_file_extension( I_file_1_content_type ). lv_value = `form-data; name="file_1"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. ls_form_part-content_type = I_file_1_content_type. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_file_1. + ls_form_part-xdata = i_FILE_1. append ls_form_part to lt_form_part. endif. - if not i_file_2 is initial. + if not i_FILE_2 is initial. lv_extension = get_file_extension( I_file_2_content_type ). lv_value = `form-data; name="file_2"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. ls_form_part-content_type = I_file_2_content_type. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_file_2. + ls_form_part-xdata = i_FILE_2. append ls_form_part to lt_form_part. endif. @@ -1676,7 +2086,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_COMPARE_COMPLY_V1->ADD_FEEDBACK * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_feedback_data TYPE T_FEEDBACK_INPUT +* | [--->] I_FEEDBACK_DATA TYPE T_FEEDBACK_INPUT * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_FEEDBACK_RETURN @@ -1713,20 +2123,20 @@ method ADD_FEEDBACK. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_feedback_data ). + lv_datatype = get_datatype( i_FEEDBACK_DATA ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_feedback_data i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_FEEDBACK_DATA i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'feedback_data' i_value = i_feedback_data ). + lv_bodyparam = abap_to_json( i_name = 'feedback_data' i_value = i_FEEDBACK_DATA ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_feedback_data to . + assign i_FEEDBACK_DATA to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -1760,22 +2170,22 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_COMPARE_COMPLY_V1->LIST_FEEDBACK * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_feedback_type TYPE STRING(optional) -* | [--->] I_before TYPE DATE(optional) -* | [--->] I_after TYPE DATE(optional) -* | [--->] I_document_title TYPE STRING(optional) -* | [--->] I_model_id TYPE STRING(optional) -* | [--->] I_model_version TYPE STRING(optional) -* | [--->] I_category_removed TYPE STRING(optional) -* | [--->] I_category_added TYPE STRING(optional) -* | [--->] I_category_not_changed TYPE STRING(optional) -* | [--->] I_type_removed TYPE STRING(optional) -* | [--->] I_type_added TYPE STRING(optional) -* | [--->] I_type_not_changed TYPE STRING(optional) -* | [--->] I_page_limit TYPE INTEGER(optional) -* | [--->] I_cursor TYPE STRING(optional) -* | [--->] I_sort TYPE STRING(optional) -* | [--->] I_include_total TYPE BOOLEAN(optional) +* | [--->] I_FEEDBACK_TYPE TYPE STRING(optional) +* | [--->] I_BEFORE TYPE DATE(optional) +* | [--->] I_AFTER TYPE DATE(optional) +* | [--->] I_DOCUMENT_TITLE TYPE STRING(optional) +* | [--->] I_MODEL_ID TYPE STRING(optional) +* | [--->] I_MODEL_VERSION TYPE STRING(optional) +* | [--->] I_CATEGORY_REMOVED TYPE STRING(optional) +* | [--->] I_CATEGORY_ADDED TYPE STRING(optional) +* | [--->] I_CATEGORY_NOT_CHANGED TYPE STRING(optional) +* | [--->] I_TYPE_REMOVED TYPE STRING(optional) +* | [--->] I_TYPE_ADDED TYPE STRING(optional) +* | [--->] I_TYPE_NOT_CHANGED TYPE STRING(optional) +* | [--->] I_PAGE_LIMIT TYPE INTEGER(optional) +* | [--->] I_CURSOR TYPE STRING(optional) +* | [--->] I_SORT TYPE STRING(optional) +* | [--->] I_INCLUDE_TOTAL TYPE BOOLEAN(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_FEEDBACK_LIST * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1801,8 +2211,8 @@ method LIST_FEEDBACK. data: lv_queryparam type string. - if i_feedback_type is supplied. - lv_queryparam = escape( val = i_feedback_type format = cl_abap_format=>e_uri_full ). + if i_FEEDBACK_TYPE is supplied. + lv_queryparam = escape( val = i_FEEDBACK_TYPE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `feedback_type` @@ -1811,8 +2221,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_before is supplied. - lv_queryparam = i_before. + if i_BEFORE is supplied. + lv_queryparam = i_BEFORE. add_query_parameter( exporting i_parameter = `before` @@ -1821,8 +2231,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_after is supplied. - lv_queryparam = i_after. + if i_AFTER is supplied. + lv_queryparam = i_AFTER. add_query_parameter( exporting i_parameter = `after` @@ -1831,8 +2241,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_document_title is supplied. - lv_queryparam = escape( val = i_document_title format = cl_abap_format=>e_uri_full ). + if i_DOCUMENT_TITLE is supplied. + lv_queryparam = escape( val = i_DOCUMENT_TITLE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `document_title` @@ -1841,8 +2251,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_model_id is supplied. - lv_queryparam = escape( val = i_model_id format = cl_abap_format=>e_uri_full ). + if i_MODEL_ID is supplied. + lv_queryparam = escape( val = i_MODEL_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `model_id` @@ -1851,8 +2261,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_model_version is supplied. - lv_queryparam = escape( val = i_model_version format = cl_abap_format=>e_uri_full ). + if i_MODEL_VERSION is supplied. + lv_queryparam = escape( val = i_MODEL_VERSION format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `model_version` @@ -1861,8 +2271,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_category_removed is supplied. - lv_queryparam = escape( val = i_category_removed format = cl_abap_format=>e_uri_full ). + if i_CATEGORY_REMOVED is supplied. + lv_queryparam = escape( val = i_CATEGORY_REMOVED format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `category_removed` @@ -1871,8 +2281,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_category_added is supplied. - lv_queryparam = escape( val = i_category_added format = cl_abap_format=>e_uri_full ). + if i_CATEGORY_ADDED is supplied. + lv_queryparam = escape( val = i_CATEGORY_ADDED format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `category_added` @@ -1881,8 +2291,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_category_not_changed is supplied. - lv_queryparam = escape( val = i_category_not_changed format = cl_abap_format=>e_uri_full ). + if i_CATEGORY_NOT_CHANGED is supplied. + lv_queryparam = escape( val = i_CATEGORY_NOT_CHANGED format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `category_not_changed` @@ -1891,8 +2301,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_type_removed is supplied. - lv_queryparam = escape( val = i_type_removed format = cl_abap_format=>e_uri_full ). + if i_TYPE_REMOVED is supplied. + lv_queryparam = escape( val = i_TYPE_REMOVED format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `type_removed` @@ -1901,8 +2311,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_type_added is supplied. - lv_queryparam = escape( val = i_type_added format = cl_abap_format=>e_uri_full ). + if i_TYPE_ADDED is supplied. + lv_queryparam = escape( val = i_TYPE_ADDED format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `type_added` @@ -1911,8 +2321,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_type_not_changed is supplied. - lv_queryparam = escape( val = i_type_not_changed format = cl_abap_format=>e_uri_full ). + if i_TYPE_NOT_CHANGED is supplied. + lv_queryparam = escape( val = i_TYPE_NOT_CHANGED format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `type_not_changed` @@ -1921,8 +2331,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_page_limit is supplied. - lv_queryparam = i_page_limit. + if i_PAGE_LIMIT is supplied. + lv_queryparam = i_PAGE_LIMIT. add_query_parameter( exporting i_parameter = `page_limit` @@ -1931,8 +2341,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_cursor is supplied. - lv_queryparam = escape( val = i_cursor format = cl_abap_format=>e_uri_full ). + if i_CURSOR is supplied. + lv_queryparam = escape( val = i_CURSOR format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `cursor` @@ -1941,8 +2351,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -1951,8 +2361,8 @@ method LIST_FEEDBACK. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_include_total is supplied. - lv_queryparam = i_include_total. + if i_INCLUDE_TOTAL is supplied. + lv_queryparam = i_INCLUDE_TOTAL. add_query_parameter( exporting i_parameter = `include_total` @@ -1985,8 +2395,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_COMPARE_COMPLY_V1->GET_FEEDBACK * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_feedback_id TYPE STRING -* | [--->] I_model TYPE STRING(optional) +* | [--->] I_FEEDBACK_ID TYPE STRING +* | [--->] I_MODEL TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_GET_FEEDBACK * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2001,7 +2411,7 @@ method GET_FEEDBACK. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/feedback/{feedback_id}'. - replace all occurrences of `{feedback_id}` in ls_request_prop-url-path with i_feedback_id ignoring case. + replace all occurrences of `{feedback_id}` in ls_request_prop-url-path with i_FEEDBACK_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -2013,8 +2423,8 @@ method GET_FEEDBACK. data: lv_queryparam type string. - if i_model is supplied. - lv_queryparam = escape( val = i_model format = cl_abap_format=>e_uri_full ). + if i_MODEL is supplied. + lv_queryparam = escape( val = i_MODEL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `model` @@ -2046,8 +2456,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_COMPARE_COMPLY_V1->DELETE_FEEDBACK * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_feedback_id TYPE STRING -* | [--->] I_model TYPE STRING(optional) +* | [--->] I_FEEDBACK_ID TYPE STRING +* | [--->] I_MODEL TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_FEEDBACK_DELETED * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2062,7 +2472,7 @@ method DELETE_FEEDBACK. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/feedback/{feedback_id}'. - replace all occurrences of `{feedback_id}` in ls_request_prop-url-path with i_feedback_id ignoring case. + replace all occurrences of `{feedback_id}` in ls_request_prop-url-path with i_FEEDBACK_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -2074,8 +2484,8 @@ method DELETE_FEEDBACK. data: lv_queryparam type string. - if i_model is supplied. - lv_queryparam = escape( val = i_model format = cl_abap_format=>e_uri_full ). + if i_MODEL is supplied. + lv_queryparam = escape( val = i_MODEL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `model` @@ -2108,16 +2518,16 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_COMPARE_COMPLY_V1->CREATE_BATCH * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_function TYPE STRING -* | [--->] I_input_credentials_file TYPE FILE -* | [--->] I_input_bucket_location TYPE STRING -* | [--->] I_input_bucket_name TYPE STRING -* | [--->] I_output_credentials_file TYPE FILE -* | [--->] I_output_bucket_location TYPE STRING -* | [--->] I_output_bucket_name TYPE STRING -* | [--->] I_model TYPE STRING(optional) -* | [--->] I_input_credentials_file_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) -* | [--->] I_output_credentials_file_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) +* | [--->] I_FUNCTION TYPE STRING +* | [--->] I_INPUT_CREDENTIALS_FILE TYPE FILE +* | [--->] I_INPUT_BUCKET_LOCATION TYPE STRING +* | [--->] I_INPUT_BUCKET_NAME TYPE STRING +* | [--->] I_OUTPUT_CREDENTIALS_FILE TYPE FILE +* | [--->] I_OUTPUT_BUCKET_LOCATION TYPE STRING +* | [--->] I_OUTPUT_BUCKET_NAME TYPE STRING +* | [--->] I_MODEL TYPE STRING(optional) +* | [--->] I_INPUT_CREDENTIALS_FILE_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) +* | [--->] I_OUTPUT_CREDENTIALS_FILE_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_BATCH_STATUS @@ -2145,7 +2555,7 @@ method CREATE_BATCH. data: lv_queryparam type string. - lv_queryparam = escape( val = i_function format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_FUNCTION format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `function` @@ -2153,8 +2563,8 @@ method CREATE_BATCH. changing c_url = ls_request_prop-url ) ##NO_TEXT. - if i_model is supplied. - lv_queryparam = escape( val = i_model format = cl_abap_format=>e_uri_full ). + if i_MODEL is supplied. + lv_queryparam = escape( val = i_MODEL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `model` @@ -2177,63 +2587,63 @@ method CREATE_BATCH. lv_extension type string ##NEEDED. - if not i_input_bucket_location is initial. + if not i_INPUT_BUCKET_LOCATION is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="input_bucket_location"' ##NO_TEXT. - lv_formdata = i_input_bucket_location. + lv_formdata = i_INPUT_BUCKET_LOCATION. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_input_bucket_name is initial. + if not i_INPUT_BUCKET_NAME is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="input_bucket_name"' ##NO_TEXT. - lv_formdata = i_input_bucket_name. + lv_formdata = i_INPUT_BUCKET_NAME. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_output_bucket_location is initial. + if not i_OUTPUT_BUCKET_LOCATION is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="output_bucket_location"' ##NO_TEXT. - lv_formdata = i_output_bucket_location. + lv_formdata = i_OUTPUT_BUCKET_LOCATION. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_output_bucket_name is initial. + if not i_OUTPUT_BUCKET_NAME is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="output_bucket_name"' ##NO_TEXT. - lv_formdata = i_output_bucket_name. + lv_formdata = i_OUTPUT_BUCKET_NAME. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_input_credentials_file is initial. - lv_extension = get_file_extension( I_input_credentials_file_CT ). + if not i_INPUT_CREDENTIALS_FILE is initial. + lv_extension = get_file_extension( I_INPUT_CREDENTIALS_FILE_CT ). lv_value = `form-data; name="input_credentials_file"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. - ls_form_part-content_type = I_input_credentials_file_CT. + ls_form_part-content_type = I_INPUT_CREDENTIALS_FILE_CT. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_input_credentials_file. + ls_form_part-xdata = i_INPUT_CREDENTIALS_FILE. append ls_form_part to lt_form_part. endif. - if not i_output_credentials_file is initial. - lv_extension = get_file_extension( I_output_credentials_file_CT ). + if not i_OUTPUT_CREDENTIALS_FILE is initial. + lv_extension = get_file_extension( I_OUTPUT_CREDENTIALS_FILE_CT ). lv_value = `form-data; name="output_credentials_file"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. - ls_form_part-content_type = I_output_credentials_file_CT. + ls_form_part-content_type = I_OUTPUT_CREDENTIALS_FILE_CT. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_output_credentials_file. + ls_form_part-xdata = i_OUTPUT_CREDENTIALS_FILE. append ls_form_part to lt_form_part. endif. @@ -2304,7 +2714,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_COMPARE_COMPLY_V1->GET_BATCH * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_batch_id TYPE STRING +* | [--->] I_BATCH_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_BATCH_STATUS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2319,7 +2729,7 @@ method GET_BATCH. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/batches/{batch_id}'. - replace all occurrences of `{batch_id}` in ls_request_prop-url-path with i_batch_id ignoring case. + replace all occurrences of `{batch_id}` in ls_request_prop-url-path with i_BATCH_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -2352,9 +2762,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_COMPARE_COMPLY_V1->UPDATE_BATCH * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_batch_id TYPE STRING -* | [--->] I_action TYPE STRING -* | [--->] I_model TYPE STRING(optional) +* | [--->] I_BATCH_ID TYPE STRING +* | [--->] I_ACTION TYPE STRING +* | [--->] I_MODEL TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_BATCH_STATUS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2369,7 +2779,7 @@ method UPDATE_BATCH. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/batches/{batch_id}'. - replace all occurrences of `{batch_id}` in ls_request_prop-url-path with i_batch_id ignoring case. + replace all occurrences of `{batch_id}` in ls_request_prop-url-path with i_BATCH_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -2381,7 +2791,7 @@ method UPDATE_BATCH. data: lv_queryparam type string. - lv_queryparam = escape( val = i_action format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_ACTION format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `action` @@ -2389,8 +2799,8 @@ method UPDATE_BATCH. changing c_url = ls_request_prop-url ) ##NO_TEXT. - if i_model is supplied. - lv_queryparam = escape( val = i_model format = cl_abap_format=>e_uri_full ). + if i_MODEL is supplied. + lv_queryparam = escape( val = i_MODEL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `model` diff --git a/src/zcl_ibmc_discovery_v1.clas.abap b/src/zcl_ibmc_discovery_v1.clas.abap index 8b29df8..5a479bf 100644 --- a/src/zcl_ibmc_discovery_v1.clas.abap +++ b/src/zcl_ibmc_discovery_v1.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,35 +26,56 @@ public section. types: "! An aggregation produced by Discovery to analyze the input provided. begin of T_QUERY_AGGREGATION, + "! The type of aggregation command used. For example: term, filter, max, min, etc. TYPE type STRING, + "! Array of aggregation results. RESULTS type STANDARD TABLE OF DATA_REFERENCE WITH NON-UNIQUE DEFAULT KEY, + "! Number of matching results. MATCHING_RESULTS type INTEGER, + "! Aggregations returned by Discovery. AGGREGATIONS type STANDARD TABLE OF DATA_REFERENCE WITH NON-UNIQUE DEFAULT KEY, end of T_QUERY_AGGREGATION. types: "! Aggregation results for the specified query. begin of T_AGGREGATION_RESULT, + "! Key that matched the aggregation type. KEY type STRING, + "! Number of matching results. MATCHING_RESULTS type INTEGER, + "! Aggregations returned in the case of chained aggregations. AGGREGATIONS type STANDARD TABLE OF T_QUERY_AGGREGATION WITH NON-UNIQUE DEFAULT KEY, end of T_AGGREGATION_RESULT. types: "! Training status details. begin of T_TRAINING_STATUS, + "! The total number of training examples uploaded to this collection. TOTAL_EXAMPLES type INTEGER, + "! When `true`, the collection has been successfully trained. AVAILABLE type BOOLEAN, + "! When `true`, the collection is currently processing training. PROCESSING type BOOLEAN, + "! When `true`, the collection has a sufficent amount of queries added for training + "! to occur. MINIMUM_QUERIES_ADDED type BOOLEAN, + "! When `true`, the collection has a sufficent amount of examples added for + "! training to occur. MINIMUM_EXAMPLES_ADDED type BOOLEAN, + "! When `true`, the collection has a sufficent amount of diversity in labeled + "! results for training to occur. SUFFICIENT_LABEL_DIVERSITY type BOOLEAN, + "! The number of notices associated with this data set. NOTICES type INTEGER, + "! The timestamp of when the collection was successfully trained. SUCCESSFULLY_TRAINED type DATETIME, + "! The timestamp of when the data was uploaded. DATA_UPDATED type DATETIME, end of T_TRAINING_STATUS. types: "! Object describing the current status of the wordlist. begin of T_TOKEN_DICT_STATUS_RESPONSE, + "! Current wordlist status for the specified collection. STATUS type STRING, + "! The type for this wordlist. Can be `tokenization_dictionary` or `stopwords`. TYPE type STRING, end of T_TOKEN_DICT_STATUS_RESPONSE. types: @@ -64,590 +85,1213 @@ public section. types: "! An object specifying the relations enrichment and related parameters. begin of T_NLU_ENRICHMENT_RELATIONS, + "! *For use with `natural_language_understanding` enrichments only.* The enrichement + "! * model to use with relationship extraction. May be a custom model provided by + "! * Watson Knowledge Studio, the default public model is`en-news`. MODEL type STRING, end of T_NLU_ENRICHMENT_RELATIONS. types: "! An object specifying the sentiment extraction enrichment and related parameters. "! begin of T_NLU_ENRICHMENT_SENTIMENT, + "! When `true`, sentiment analysis is performed on the entire field. DOCUMENT type BOOLEAN, + "! A comma-separated list of target strings that will have any associated sentiment + "! analyzed. TARGETS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_NLU_ENRICHMENT_SENTIMENT. types: "! An object specifiying the semantic roles enrichment and related parameters. begin of T_NL_ENRICHMENT_SEMANTIC_ROLES, + "! When `true`, entities are extracted from the identified sentence parts. ENTITIES type BOOLEAN, + "! When `true`, keywords are extracted from the identified sentence parts. KEYWORDS type BOOLEAN, + "! The maximum number of semantic roles enrichments to extact from each instance of + "! the specified field. LIMIT type INTEGER, end of T_NL_ENRICHMENT_SEMANTIC_ROLES. types: "! An object speficying the Entities enrichment and related parameters. begin of T_NLU_ENRICHMENT_ENTITIES, + "! When `true`, sentiment analysis of entities will be performed on the specified + "! field. SENTIMENT type BOOLEAN, + "! When `true`, emotion detection of entities will be performed on the specified + "! field. EMOTION type BOOLEAN, + "! The maximum number of entities to extract for each instance of the specified + "! field. LIMIT type INTEGER, + "! When `true`, the number of mentions of each identified entity is recorded. The + "! default is `false`. MENTIONS type BOOLEAN, + "! When `true`, the types of mentions for each idetifieid entity is recorded. The + "! default is `false`. MENTION_TYPES type BOOLEAN, + "! When `true`, a list of sentence locations for each instance of each identified + "! entity is recorded. The default is `false`. SENTENCE_LOCATIONS type BOOLEAN, + "! The enrichement model to use with entity extraction. May be a custom model + "! provided by Watson Knowledge Studio, or the default public model `alchemy`. MODEL type STRING, end of T_NLU_ENRICHMENT_ENTITIES. types: "! An object specifying the emotion detection enrichment and related parameters. begin of T_NLU_ENRICHMENT_EMOTION, + "! When `true`, emotion detection is performed on the entire field. DOCUMENT type BOOLEAN, + "! A comma-separated list of target strings that will have any associated emotions + "! detected. TARGETS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_NLU_ENRICHMENT_EMOTION. types: "! An object specifiying the concepts enrichment and related parameters. begin of T_NLU_ENRICHMENT_CONCEPTS, + "! The maximum number of concepts enrichments to extact from each instance of the + "! specified field. LIMIT type INTEGER, end of T_NLU_ENRICHMENT_CONCEPTS. types: "! An object specifying the Keyword enrichment and related parameters. begin of T_NLU_ENRICHMENT_KEYWORDS, + "! When `true`, sentiment analysis of keywords will be performed on the specified + "! field. SENTIMENT type BOOLEAN, + "! When `true`, emotion detection of keywords will be performed on the specified + "! field. EMOTION type BOOLEAN, + "! The maximum number of keywords to extract for each instance of the specified + "! field. LIMIT type INTEGER, end of T_NLU_ENRICHMENT_KEYWORDS. types: "! Object containing Natural Language Understanding features to be used. begin of T_NLU_ENRICHMENT_FEATURES, + "! An object specifying the Keyword enrichment and related parameters. KEYWORDS type T_NLU_ENRICHMENT_KEYWORDS, + "! An object speficying the Entities enrichment and related parameters. ENTITIES type T_NLU_ENRICHMENT_ENTITIES, + "! An object specifying the sentiment extraction enrichment and related parameters. + "! SENTIMENT type T_NLU_ENRICHMENT_SENTIMENT, + "! An object specifying the emotion detection enrichment and related parameters. EMOTION type T_NLU_ENRICHMENT_EMOTION, + "! An object that indicates the Categories enrichment will be applied to the + "! specified field. CATEGORIES type T_NLU_ENRICHMENT_CATEGORIES, + "! An object specifiying the semantic roles enrichment and related parameters. SEMANTIC_ROLES type T_NL_ENRICHMENT_SEMANTIC_ROLES, + "! An object specifying the relations enrichment and related parameters. RELATIONS type T_NLU_ENRICHMENT_RELATIONS, + "! An object specifiying the concepts enrichment and related parameters. CONCEPTS type T_NLU_ENRICHMENT_CONCEPTS, end of T_NLU_ENRICHMENT_FEATURES. types: "! An object representing the configuration options to use for the "! `natural_language_understanding` enrichments. begin of T_NLU_ENRICHMENT_OPTIONS, + "! Object containing Natural Language Understanding features to be used. FEATURES type T_NLU_ENRICHMENT_FEATURES, + "! ISO 639-1 code indicating the language to use for the analysis. This code + "! overrides the automatic language detection performed by the service. Valid + "! codes are `ar` (Arabic), `en` (English), `fr` (French), `de` (German), `it` + "! (Italian), `pt` (Portuguese), `ru` (Russian), `es` (Spanish), and `sv` + "! (Swedish). **Note:** Not all features support all languages, automatic + "! detection is recommended. LANGUAGE type STRING, end of T_NLU_ENRICHMENT_OPTIONS. types: "! An object defining a single tokenizaion rule. begin of T_TOKEN_DICT_RULE, + "! The string to tokenize. TEXT type STRING, + "! Array of tokens that the `text` field is split into when found. TOKENS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! Array of tokens that represent the content of the `text` field in an alternate + "! character set. READINGS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The part of speech that the `text` string belongs to. For example `noun`. Custom + "! parts of speech can be specified. PART_OF_SPEECH type STRING, end of T_TOKEN_DICT_RULE. types: "! Tokenization dictionary describing how words are tokenized during ingestion and "! at query time. begin of T_TOKEN_DICT, + "! An array of tokenization rules. Each rule contains, the original `text` string, + "! component `tokens`, any alternate character set `readings`, and which + "! `part_of_speech` the text is from. TOKENIZATION_RULES type STANDARD TABLE OF T_TOKEN_DICT_RULE WITH NON-UNIQUE DEFAULT KEY, end of T_TOKEN_DICT. types: - "! + "! No documentation available. begin of T_FILTER, + "! The match the aggregated results queried for. MATCH type STRING, end of T_FILTER. types: "! Object defining which URL to crawl and how to crawl it. begin of T_SOURCE_OPTIONS_WEB_CRAWL, + "! The starting URL to crawl. URL type STRING, + "! When `true`, crawls of the specified URL are limited to the host part of the + "! **url** field. LIMIT_TO_STARTING_HOSTS type BOOLEAN, + "! The number of concurrent URLs to fetch. `gentle` means one URL is fetched at a + "! time with a delay between each call. `normal` means as many as two URLs are + "! fectched concurrently with a short delay between fetch calls. `aggressive` + "! means that up to ten URLs are fetched concurrently with a short delay between + "! fetch calls. CRAWL_SPEED type STRING, + "! When `true`, allows the crawl to interact with HTTPS sites with SSL certificates + "! with untrusted signers. ALLOW_UNTRUSTED_CERTIFICATE type BOOLEAN, + "! The maximum number of hops to make from the initial URL. When a page is crawled + "! each link on that page will also be crawled if it is within the + "! **maximum_hops** from the initial URL. The first page crawled is 0 hops, each + "! link crawled from the first page is 1 hop, each link crawled from those pages + "! is 2 hops, and so on. MAXIMUM_HOPS type INTEGER, + "! The maximum milliseconds to wait for a response from the web server. REQUEST_TIMEOUT type INTEGER, + "! When `true`, the crawler will ignore any `robots.txt` encountered by the + "! crawler. This should only ever be done when crawling a web site the user owns. + "! This must be be set to `true` when a **gateway_id** is specied in the + "! **credentials**. OVERRIDE_ROBOTS_TXT type BOOLEAN, + "! Array of URL's to be excluded while crawling. The crawler will not follow links + "! which contains this string. For example, listing `https://ibm.com/watson` also + "! excludes `https://ibm.com/watson/discovery`. BLACKLIST type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_SOURCE_OPTIONS_WEB_CRAWL. types: - "! Object containing details of the stored credentials. - "! + "! Object containing details of the stored credentials.
+ "!
"! Obtain credentials for your source from the administrator of the source. begin of T_CREDENTIAL_DETAILS, + "! The authentication method for this credentials definition. The + "! **credential_type** specified must be supported by the **source_type**. The + "! following combinations are possible:
+ "!
+ "! - `"source_type": "box"` - valid `credential_type`s: `oauth2`
+ "! - `"source_type": "salesforce"` - valid `credential_type`s: + "! `username_password`
+ "! - `"source_type": "sharepoint"` - valid `credential_type`s: `saml` with + "! **source_version** of `online`, or `ntlm_v1` with **source_version** of + "! `2016`
+ "! - `"source_type": "web_crawl"` - valid `credential_type`s: `noauth` or + "! `basic`
+ "! - "source_type": "cloud_object_storage"` - valid `credential_type`s: + "! `aws4_hmac`. CREDENTIAL_TYPE type STRING, + "! The **client_id** of the source that these credentials connect to. Only valid, + "! and required, with a **credential_type** of `oauth2`. CLIENT_ID type STRING, + "! The **enterprise_id** of the Box site that these credentials connect to. Only + "! valid, and required, with a **source_type** of `box`. ENTERPRISE_ID type STRING, + "! The **url** of the source that these credentials connect to. Only valid, and + "! required, with a **credential_type** of `username_password`, `noauth`, and + "! `basic`. URL type STRING, + "! The **username** of the source that these credentials connect to. Only valid, + "! and required, with a **credential_type** of `saml`, `username_password`, + "! `basic`, or `ntlm_v1`. USERNAME type STRING, + "! The **organization_url** of the source that these credentials connect to. Only + "! valid, and required, with a **credential_type** of `saml`. ORGANIZATION_URL type STRING, + "! The **site_collection.path** of the source that these credentials connect to. + "! Only valid, and required, with a **source_type** of `sharepoint`. SITE_COLLECTION_PATH type STRING, + "! The **client_secret** of the source that these credentials connect to. Only + "! valid, and required, with a **credential_type** of `oauth2`. This value is + "! never returned and is only used when creating or modifying **credentials**. CLIENT_SECRET type STRING, + "! The **public_key_id** of the source that these credentials connect to. Only + "! valid, and required, with a **credential_type** of `oauth2`. This value is + "! never returned and is only used when creating or modifying **credentials**. PUBLIC_KEY_ID type STRING, + "! The **private_key** of the source that these credentials connect to. Only valid, + "! and required, with a **credential_type** of `oauth2`. This value is never + "! returned and is only used when creating or modifying **credentials**. PRIVATE_KEY type STRING, + "! The **passphrase** of the source that these credentials connect to. Only valid, + "! and required, with a **credential_type** of `oauth2`. This value is never + "! returned and is only used when creating or modifying **credentials**. PASSPHRASE type STRING, + "! The **password** of the source that these credentials connect to. Only valid, + "! and required, with **credential_type**s of `saml`, `username_password`, + "! `basic`, or `ntlm_v1`.
+ "!
+ "! **Note:** When used with a **source_type** of `salesforce`, the password + "! consists of the Salesforce password and a valid Salesforce security token + "! concatenated. This value is never returned and is only used when creating or + "! modifying **credentials**. PASSWORD type STRING, + "! The ID of the **gateway** to be connected through (when connecting to intranet + "! sites). Only valid with a **credential_type** of `noauth`, `basic`, or + "! `ntlm_v1`. Gateways are created using the + "! `/v1/environments/{environment_id}/gateways` methods. GATEWAY_ID type STRING, + "! The type of Sharepoint repository to connect to. Only valid, and required, with + "! a **source_type** of `sharepoint`. SOURCE_VERSION type STRING, + "! SharePoint OnPrem WebApplication URL. Only valid, and required, with a + "! **source_version** of `2016`. If a port is not supplied, the default to port + "! `80` for http and port `443` for https connections are used. WEB_APPLICATION_URL type STRING, + "! The domain used to log in to your OnPrem SharePoint account. Only valid, and + "! required, with a **source_version** of `2016`. DOMAIN type STRING, + "! The endpoint associated with the cloud object store that your are connecting to. + "! Only valid, and required, with a **credential_type** of `aws4_hmac`. ENDPOINT type STRING, + "! The access key ID associated with the cloud object store. Only valid, and + "! required, with a **credential_type** of `aws4_hmac`. This value is never + "! returned and is only used when creating or modifying **credentials**. For more + "! infomation, see the [cloud object store + "! documentation](https://cloud.ibm.com/docs/services/cloud-object-storage?topic=c + "! loud-object-storage-using-hmac-credentials#using-hmac-credentials). ACCESS_KEY_ID type STRING, + "! The secret access key associated with the cloud object store. Only valid, and + "! required, with a **credential_type** of `aws4_hmac`. This value is never + "! returned and is only used when creating or modifying **credentials**. For more + "! infomation, see the [cloud object store + "! documentation](https://cloud.ibm.com/docs/services/cloud-object-storage?topic=c + "! loud-object-storage-using-hmac-credentials#using-hmac-credentials). SECRET_ACCESS_KEY type STRING, end of T_CREDENTIAL_DETAILS. types: "! Object containing credential information. begin of T_CREDENTIALS, + "! Unique identifier for this set of credentials. CREDENTIAL_ID type STRING, + "! The source that this credentials object connects to.
+ "! - `box` indicates the credentials are used to connect an instance of Enterprise + "! Box.
+ "! - `salesforce` indicates the credentials are used to connect to + "! Salesforce.
+ "! - `sharepoint` indicates the credentials are used to connect to Microsoft + "! SharePoint Online.
+ "! - `web_crawl` indicates the credentials are used to perform a web crawl.
+ "! = `cloud_object_storage` indicates the credentials are used to connect to an + "! IBM Cloud Object Store. SOURCE_TYPE type STRING, + "! Object containing details of the stored credentials.
+ "!
+ "! Obtain credentials for your source from the administrator of the source. CREDENTIAL_DETAILS type T_CREDENTIAL_DETAILS, + "! The current status of this set of credentials. `connected` indicates that the + "! credentials are available to use with the source configuration of a collection. + "! `invalid` refers to the credentials (for example, the password provided has + "! expired) and must be corrected before they can be used with a collection. STATUS type STRING, end of T_CREDENTIALS. types: "! Object containing array of credential definitions. begin of T_CREDENTIALS_LIST, + "! An array of credential definitions that were created for this instance. CREDENTIALS type STANDARD TABLE OF T_CREDENTIALS WITH NON-UNIQUE DEFAULT KEY, end of T_CREDENTIALS_LIST. types: "! Summary of the collection usage in the environment. begin of T_COLLECTION_USAGE, + "! Number of active collections in the environment. AVAILABLE type INTEGER, + "! Total number of collections allowed in the environment. MAXIMUM_ALLOWED type INTEGER, end of T_COLLECTION_USAGE. types: "! Summary of the disk usage statistics for the environment. begin of T_DISK_USAGE, + "! Number of bytes within the environment's disk capacity that are currently used + "! to store data. USED_BYTES type INTEGER, + "! Total number of bytes available in the environment's disk capacity. MAXIMUM_ALLOWED_BYTES type INTEGER, end of T_DISK_USAGE. types: "! Summary of the document usage statistics for the environment. begin of T_ENVIRONMENT_DOCUMENTS, + "! Number of documents indexed for the environment. INDEXED type INTEGER, + "! Total number of documents allowed in the environment's capacity. MAXIMUM_ALLOWED type INTEGER, end of T_ENVIRONMENT_DOCUMENTS. types: "! Details about the resource usage and capacity of the environment. begin of T_INDEX_CAPACITY, + "! Summary of the document usage statistics for the environment. DOCUMENTS type T_ENVIRONMENT_DOCUMENTS, + "! Summary of the disk usage statistics for the environment. DISK_USAGE type T_DISK_USAGE, + "! Summary of the collection usage in the environment. COLLECTIONS type T_COLLECTION_USAGE, end of T_INDEX_CAPACITY. types: "! Information about the Continuous Relevancy Training for this environment. begin of T_SEARCH_STATUS, + "! Current scope of the training. Always returned as `environment`. SCOPE type STRING, + "! The current status of Continuous Relevancy Training for this environment. STATUS type STRING, + "! Long description of the current Continuous Relevancy Training status. STATUS_DESCRIPTION type STRING, + "! The date stamp of the most recent completed training for this environment. LAST_TRAINED type DATE, end of T_SEARCH_STATUS. types: "! Details about an environment. begin of T_ENVIRONMENT, + "! Unique identifier for the environment. ENVIRONMENT_ID type STRING, + "! Name that identifies the environment. NAME type STRING, + "! Description of the environment. DESCRIPTION type STRING, + "! Creation date of the environment, in the format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`. CREATED type DATETIME, + "! Date of most recent environment update, in the format + "! `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`. UPDATED type DATETIME, + "! Current status of the environment. `resizing` is displayed when a request to + "! increase the environment size has been made, but is still in the process of + "! being completed. STATUS type STRING, + "! If `true`, the environment contains read-only collections that are maintained by + "! IBM. READ_ONLY type BOOLEAN, + "! Current size of the environment. SIZE type STRING, + "! The new size requested for this environment. Only returned when the environment + "! *status* is `resizing`.
+ "!
+ "! *Note:* Querying and indexing can still be performed during an environment + "! upsize. REQUESTED_SIZE type STRING, + "! Details about the resource usage and capacity of the environment. INDEX_CAPACITY type T_INDEX_CAPACITY, + "! Information about the Continuous Relevancy Training for this environment. SEARCH_STATUS type T_SEARCH_STATUS, end of T_ENVIRONMENT. types: "! Response object containing an array of configured environments. begin of T_LIST_ENVIRONMENTS_RESPONSE, + "! An array of [environments] that are available for the service instance. ENVIRONMENTS type STANDARD TABLE OF T_ENVIRONMENT WITH NON-UNIQUE DEFAULT KEY, end of T_LIST_ENVIRONMENTS_RESPONSE. types: "! Gatway deletion confirmation. begin of T_GATEWAY_DELETE, + "! The gateway ID of the deleted gateway. GATEWAY_ID type STRING, + "! The status of the request. STATUS type STRING, end of T_GATEWAY_DELETE. types: "! Training example details. begin of T_TRAINING_EXAMPLE, + "! The document ID associated with this training example. DOCUMENT_ID type STRING, + "! The cross reference associated with this training example. CROSS_REFERENCE type STRING, + "! The relevance of the training example. RELEVANCE type INTEGER, end of T_TRAINING_EXAMPLE. types: "! Training query details. begin of T_TRAINING_QUERY, + "! The query ID associated with the training query. QUERY_ID type STRING, + "! The natural text query for the training query. NATURAL_LANGUAGE_QUERY type STRING, + "! The filter used on the collection before the **natural_language_query** is + "! applied. FILTER type STRING, + "! Array of training examples. EXAMPLES type STANDARD TABLE OF T_TRAINING_EXAMPLE WITH NON-UNIQUE DEFAULT KEY, end of T_TRAINING_QUERY. types: "! A passage query result. begin of T_QUERY_PASSAGES, + "! The unique identifier of the document from which the passage has been extracted. + "! DOCUMENT_ID type STRING, + "! The confidence score of the passages's analysis. A higher score indicates + "! greater confidence. PASSAGE_SCORE type DOUBLE, + "! The content of the extracted passage. PASSAGE_TEXT type STRING, + "! The position of the first character of the extracted passage in the originating + "! field. START_OFFSET type INTEGER, + "! The position of the last character of the extracted passage in the originating + "! field. END_OFFSET type INTEGER, + "! The label of the field from which the passage has been extracted. FIELD type STRING, end of T_QUERY_PASSAGES. types: "! Object containing normalization operations. begin of T_NORMALIZATION_OPERATION, + "! Identifies what type of operation to perform.
+ "!
+ "! **copy** - Copies the value of the **source_field** to the **destination_field** + "! field. If the **destination_field** already exists, then the value of the + "! **source_field** overwrites the original value of the **destination_field**. + "!
+ "!
+ "! **move** - Renames (moves) the **source_field** to the **destination_field**. If + "! the **destination_field** already exists, then the value of the + "! **source_field** overwrites the original value of the **destination_field**. + "! Rename is identical to copy, except that the **source_field** is removed after + "! the value has been copied to the **destination_field** (it is the same as a + "! _copy_ followed by a _remove_).
+ "!
+ "! **merge** - Merges the value of the **source_field** with the value of the + "! **destination_field**. The **destination_field** is converted into an array if + "! it is not already an array, and the value of the **source_field** is appended + "! to the array. This operation removes the **source_field** after the merge. If + "! the **source_field** does not exist in the current document, then the + "! **destination_field** is still converted into an array (if it is not an array + "! already). This conversion ensures the type for **destination_field** is + "! consistent across all documents.
+ "!
+ "! **remove** - Deletes the **source_field** field. The **destination_field** is + "! ignored for this operation.
+ "!
+ "! **remove_nulls** - Removes all nested null (blank) field values from the + "! ingested document. **source_field** and **destination_field** are ignored by + "! this operation because _remove_nulls_ operates on the entire ingested document. + "! Typically, **remove_nulls** is invoked as the last normalization operation (if + "! it is invoked at all, it can be time-expensive). OPERATION type STRING, + "! The source field for the operation. SOURCE_FIELD type STRING, + "! The destination field for the operation. DESTINATION_FIELD type STRING, end of T_NORMALIZATION_OPERATION. types: "! Font matching configuration. begin of T_FONT_SETTING, + "! The HTML heading level that any content with the matching font is converted to. LEVEL type INTEGER, + "! The minimum size of the font to match. MIN_SIZE type INTEGER, + "! The maximum size of the font to match. MAX_SIZE type INTEGER, + "! When `true`, the font is matched if it is bold. BOLD type BOOLEAN, + "! When `true`, the font is matched if it is italic. ITALIC type BOOLEAN, + "! The name of the font. NAME type STRING, end of T_FONT_SETTING. types: "! Microsoft Word styles to convert into a specified HTML head level. begin of T_WORD_STYLE, + "! HTML head level that content matching this style is tagged with. LEVEL type INTEGER, + "! Array of word style names to convert. NAMES type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_WORD_STYLE. types: "! Object containing heading detection conversion settings for Microsoft Word "! documents. begin of T_WORD_HEADING_DETECTION, + "! Array of font matching configurations. FONTS type STANDARD TABLE OF T_FONT_SETTING WITH NON-UNIQUE DEFAULT KEY, + "! Array of Microsoft Word styles to convert. STYLES type STANDARD TABLE OF T_WORD_STYLE WITH NON-UNIQUE DEFAULT KEY, end of T_WORD_HEADING_DETECTION. types: "! Object containing heading detection conversion settings for PDF documents. begin of T_PDF_HEADING_DETECTION, + "! Array of font matching configurations. FONTS type STANDARD TABLE OF T_FONT_SETTING WITH NON-UNIQUE DEFAULT KEY, end of T_PDF_HEADING_DETECTION. types: "! A list of PDF conversion settings. begin of T_PDF_SETTINGS, + "! Object containing heading detection conversion settings for PDF documents. HEADING type T_PDF_HEADING_DETECTION, end of T_PDF_SETTINGS. types: "! Object that defines a box folder to crawl with this configuration. begin of T_SOURCE_OPTIONS_FOLDER, + "! The Box user ID of the user who owns the folder to crawl. OWNER_USER_ID type STRING, + "! The Box folder ID of the folder to crawl. FOLDER_ID type STRING, + "! The maximum number of documents to crawl for this folder. By default, all + "! documents in the folder are crawled. LIMIT type INTEGER, end of T_SOURCE_OPTIONS_FOLDER. types: "! Object defining a cloud object store bucket to crawl. begin of T_SOURCE_OPTIONS_BUCKETS, + "! The name of the cloud object store bucket to crawl. NAME type STRING, + "! The number of documents to crawl from this cloud object store bucket. If not + "! specified, all documents in the bucket are crawled. LIMIT type INTEGER, end of T_SOURCE_OPTIONS_BUCKETS. types: "! Object containing the schedule information for the source. begin of T_SOURCE_SCHEDULE, + "! When `true`, the source is re-crawled based on the **frequency** field in this + "! object. When `false` the source is not re-crawled; When `false` and connecting + "! to Salesforce the source is crawled annually. ENABLED type BOOLEAN, + "! The time zone to base source crawl times on. Possible values correspond to the + "! IANA (Internet Assigned Numbers Authority) time zones list. TIME_ZONE type STRING, + "! The crawl schedule in the specified **time_zone**.
+ "!
+ "! - `five_minutes`: Runs every five minutes.
+ "! - `hourly`: Runs every hour.
+ "! - `daily`: Runs every day between 00:00 and 06:00.
+ "! - `weekly`: Runs every week on Sunday between 00:00 and 06:00.
+ "! - `monthly`: Runs the on the first Sunday of every month between 00:00 and + "! 06:00. FREQUENCY type STRING, end of T_SOURCE_SCHEDULE. types: "! Object that defines a Salesforce document object type crawl with this "! configuration. begin of T_SOURCE_OPTIONS_OBJECT, + "! The name of the Salesforce document object to crawl. For example, `case`. NAME type STRING, + "! The maximum number of documents to crawl for this document object. By default, + "! all documents in the document object are crawled. LIMIT type INTEGER, end of T_SOURCE_OPTIONS_OBJECT. types: "! Object that defines a Microsoft SharePoint site collection to crawl with this "! configuration. begin of T_SOURCE_OPTIONS_SITE_COLL, + "! The Microsoft SharePoint Online site collection path to crawl. The path must be + "! be relative to the **organization_url** that was specified in the credentials + "! associated with this source configuration. SITE_COLLECTION_PATH1 type STRING, + "! The maximum number of documents to crawl for this site collection. By default, + "! all documents in the site collection are crawled. LIMIT type INTEGER, end of T_SOURCE_OPTIONS_SITE_COLL. types: "! The **options** object defines which items to crawl from the source system. begin of T_SOURCE_OPTIONS, + "! Array of folders to crawl from the Box source. Only valid, and required, when + "! the **type** field of the **source** object is set to `box`. FOLDERS type STANDARD TABLE OF T_SOURCE_OPTIONS_FOLDER WITH NON-UNIQUE DEFAULT KEY, + "! Array of Salesforce document object types to crawl from the Salesforce source. + "! Only valid, and required, when the **type** field of the **source** object is + "! set to `salesforce`. OBJECTS type STANDARD TABLE OF T_SOURCE_OPTIONS_OBJECT WITH NON-UNIQUE DEFAULT KEY, + "! Array of Microsoft SharePointoint Online site collections to crawl from the + "! SharePoint source. Only valid and required when the **type** field of the + "! **source** object is set to `sharepoint`. SITE_COLLECTIONS type STANDARD TABLE OF T_SOURCE_OPTIONS_SITE_COLL WITH NON-UNIQUE DEFAULT KEY, + "! Array of Web page URLs to begin crawling the web from. Only valid and required + "! when the **type** field of the **source** object is set to `web_crawl`. URLS type STANDARD TABLE OF T_SOURCE_OPTIONS_WEB_CRAWL WITH NON-UNIQUE DEFAULT KEY, + "! Array of cloud object store buckets to begin crawling. Only valid and required + "! when the **type** field of the **source** object is set to + "! `cloud_object_store`, and the **crawl_all_buckets** field is `false` or not + "! specified. BUCKETS type STANDARD TABLE OF T_SOURCE_OPTIONS_BUCKETS WITH NON-UNIQUE DEFAULT KEY, + "! When `true`, all buckets in the specified cloud object store are crawled. If set + "! to `true`, the **buckets** array must not be specified. CRAWL_ALL_BUCKETS type BOOLEAN, end of T_SOURCE_OPTIONS. types: "! Object containing source parameters for the configuration. begin of T_SOURCE, + "! The type of source to connect to.
+ "! - `box` indicates the configuration is to connect an instance of Enterprise + "! Box.
+ "! - `salesforce` indicates the configuration is to connect to Salesforce.
+ "! - `sharepoint` indicates the configuration is to connect to Microsoft + "! SharePoint Online.
+ "! - `web_crawl` indicates the configuration is to perform a web page crawl.
+ "! - `cloud_object_storage` indicates the configuration is to connect to a cloud + "! object store. TYPE type STRING, + "! The **credential_id** of the credentials to use to connect to the source. + "! Credentials are defined using the **credentials** method. The **source_type** + "! of the credentials used must match the **type** field specified in this object. + "! CREDENTIAL_ID type STRING, + "! Object containing the schedule information for the source. SCHEDULE type T_SOURCE_SCHEDULE, + "! The **options** object defines which items to crawl from the source system. OPTIONS type T_SOURCE_OPTIONS, end of T_SOURCE. types: "! Object containing an array of XPaths. begin of T_XPATH_PATTERNS, + "! An array to XPaths. XPATHS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_XPATH_PATTERNS. types: "! Options which are specific to a particular enrichment. begin of T_ENRICHMENT_OPTIONS, + "! Object containing Natural Language Understanding features to be used. FEATURES type T_NLU_ENRICHMENT_FEATURES, + "! ISO 639-1 code indicating the language to use for the analysis. This code + "! overrides the automatic language detection performed by the service. Valid + "! codes are `ar` (Arabic), `en` (English), `fr` (French), `de` (German), `it` + "! (Italian), `pt` (Portuguese), `ru` (Russian), `es` (Spanish), and `sv` + "! (Swedish). **Note:** Not all features support all languages, automatic + "! detection is recommended. LANGUAGE type STRING, + "! *For use with `elements` enrichments only.* The element extraction model to use. + "! * Models available are: `contract`. MODEL type STRING, end of T_ENRICHMENT_OPTIONS. types: "! Enrichment step to perform on the document. Each enrichment is performed on the "! specified field in the order that they are listed in the configuration. begin of T_ENRICHMENT, + "! Describes what the enrichment step does. DESCRIPTION type STRING, + "! Field where enrichments will be stored. This field must already exist or be at + "! most 1 level deeper than an existing field. For example, if `text` is a + "! top-level field with no sub-fields, `text.foo` is a valid destination but + "! `text.foo.bar` is not. DESTINATION_FIELD type STRING, + "! Field to be enriched.
+ "!
+ "! Arrays can be specified as the **source_field** if the **enrichment** service + "! for this enrichment is set to `natural_language_undstanding`. SOURCE_FIELD type STRING, + "! Indicates that the enrichments will overwrite the destination_field field if it + "! already exists. OVERWRITE type BOOLEAN, + "! Name of the enrichment service to call. Current options are + "! `natural_language_understanding` and `elements`.
+ "!
+ "! When using `natual_language_understanding`, the **options** object must contain + "! Natural Language Understanding options.
+ "!
+ "! When using `elements` the **options** object must contain Element + "! Classification options. Additionally, when using the `elements` enrichment the + "! configuration specified and files ingested must meet all the criteria specified + "! in [the + "! documentation](https://cloud.ibm.com/docs/services/discovery?topic=discovery-el + "! ement-classification#element-classification). ENRICHMENT type STRING, + "! If true, then most errors generated during the enrichment process will be + "! treated as warnings and will not cause the document to fail processing. IGNORE_DOWNSTREAM_ERRORS type BOOLEAN, + "! Options which are specific to a particular enrichment. OPTIONS type T_ENRICHMENT_OPTIONS, end of T_ENRICHMENT. types: "! A list of Document Segmentation settings. begin of T_SEGMENT_SETTINGS, + "! Enables/disables the Document Segmentation feature. ENABLED type BOOLEAN, + "! Defines the heading level that splits into document segments. Valid values are + "! h1, h2, h3, h4, h5, h6. The content of the header field that the segmentation + "! splits at is used as the **title** field for that segmented result. Only valid + "! if used with a collection that has **enabled** set to `false` in the + "! **smart_document_understanding** object. SELECTOR_TAGS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! Defines the annotated smart document understanding fields that the document is + "! split on. The content of the annotated field that the segmentation splits at is + "! used as the **title** field for that segmented result. For example, if the + "! field `sub-title` is specified, when a document is uploaded each time the smart + "! documement understanding conversion encounters a field of type `sub-title` the + "! document is split at that point and the content of the field used as the title + "! of the remaining content. Thnis split is performed for all instances of the + "! listed fields in the uploaded document. Only valid if used with a collection + "! that has **enabled** set to `true` in the **smart_document_understanding** + "! object. ANNOTATED_FIELDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_SEGMENT_SETTINGS. types: "! A list of Word conversion settings. begin of T_WORD_SETTINGS, + "! Object containing heading detection conversion settings for Microsoft Word + "! documents. HEADING type T_WORD_HEADING_DETECTION, end of T_WORD_SETTINGS. types: "! A list of HTML conversion settings. begin of T_HTML_SETTINGS, + "! Array of HTML tags that are excluded completely. EXCLUDE_TAGS_COMPLETELY type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! Array of HTML tags which are excluded but still retain content. EXCLUDE_TAGS_KEEP_CONTENT type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! Object containing an array of XPaths. KEEP_CONTENT type T_XPATH_PATTERNS, + "! Object containing an array of XPaths. EXCLUDE_CONTENT type T_XPATH_PATTERNS, + "! An array of HTML tag attributes to keep in the converted document. KEEP_TAG_ATTRIBUTES type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! Array of HTML tag attributes to exclude. EXCLUDE_TAG_ATTRIBUTES type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_HTML_SETTINGS. types: "! Document conversion settings. begin of T_CONVERSIONS, + "! A list of PDF conversion settings. PDF type T_PDF_SETTINGS, + "! A list of Word conversion settings. WORD type T_WORD_SETTINGS, + "! A list of HTML conversion settings. HTML type T_HTML_SETTINGS, + "! A list of Document Segmentation settings. SEGMENT type T_SEGMENT_SETTINGS, + "! Defines operations that can be used to transform the final output JSON into a + "! normalized form. Operations are executed in the order that they appear in the + "! array. JSON_NORMALIZATIONS type STANDARD TABLE OF T_NORMALIZATION_OPERATION WITH NON-UNIQUE DEFAULT KEY, + "! When `true`, automatic text extraction from images (this includes images + "! embedded in supported document formats, for example PDF, and suppported image + "! formats, for example TIFF) is performed on documents uploaded to the + "! collection. This field is supported on **Advanced** and higher plans only. + "! **Lite** plans do not support image text recognition. IMAGE_TEXT_RECOGNITION type BOOLEAN, end of T_CONVERSIONS. types: "! A custom configuration for the environment. begin of T_CONFIGURATION, + "! The unique identifier of the configuration. CONFIGURATION_ID type STRING, + "! The name of the configuration. NAME type STRING, + "! The creation date of the configuration in the format + "! yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. CREATED type DATETIME, + "! The timestamp of when the configuration was last updated in the format + "! yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. UPDATED type DATETIME, + "! The description of the configuration, if available. DESCRIPTION type STRING, + "! Document conversion settings. CONVERSIONS type T_CONVERSIONS, + "! An array of document enrichment settings for the configuration. ENRICHMENTS type STANDARD TABLE OF T_ENRICHMENT WITH NON-UNIQUE DEFAULT KEY, + "! Defines operations that can be used to transform the final output JSON into a + "! normalized form. Operations are executed in the order that they appear in the + "! array. NORMALIZATIONS type STANDARD TABLE OF T_NORMALIZATION_OPERATION WITH NON-UNIQUE DEFAULT KEY, + "! Object containing source parameters for the configuration. SOURCE type T_SOURCE, end of T_CONFIGURATION. types: "! Object containing an array of available configurations. begin of T_LIST_CONFIGURATIONS_RESPONSE, + "! An array of configurations that are available for the service instance. CONFIGURATIONS type STANDARD TABLE OF T_CONFIGURATION WITH NON-UNIQUE DEFAULT KEY, end of T_LIST_CONFIGURATIONS_RESPONSE. types: "! Object containing source crawl status information. begin of T_SOURCE_STATUS, + "! The current status of the source crawl for this collection. This field returns + "! `not_configured` if the default configuration for this source does not have a + "! **source** object defined.
+ "!
+ "! - `running` indicates that a crawl to fetch more documents is in progress.
+ "! - `complete` indicates that the crawl has completed with no errors.
+ "! - `queued` indicates that the crawl has been paused by the system and will + "! automatically restart when possible.
+ "! - `unknown` indicates that an unidentified error has occured in the service. STATUS type STRING, + "! Date in `RFC 3339` format indicating the time of the next crawl attempt. NEXT_CRAWL type DATETIME, end of T_SOURCE_STATUS. types: "! Object returned after credentials are deleted. begin of T_DELETE_CREDENTIALS, + "! The unique identifier of the credentials that have been deleted. CREDENTIAL_ID type STRING, + "! The status of the deletion request. STATUS type STRING, end of T_DELETE_CREDENTIALS. types: "! A notice produced for the collection. begin of T_NOTICE, + "! Identifies the notice. Many notices might have the same ID. This field exists so + "! that user applications can programmatically identify a notice and take + "! automatic corrective action. Typical notice IDs include: `index_failed`, + "! `index_failed_too_many_requests`, `index_failed_incompatible_field`, + "! `index_failed_cluster_unavailable`, `ingestion_timeout`, `ingestion_error`, + "! `bad_request`, `internal_error`, `missing_model`, `unsupported_model`, + "! `smart_document_understanding_failed_incompatible_field`, + "! `smart_document_understanding_failed_internal_error`, + "! `smart_document_understanding_failed_internal_error`, + "! `smart_document_understanding_failed_warning`, + "! `smart_document_understanding_page_error`, + "! `smart_document_understanding_page_warning`. **Note:** This is not a complete + "! list, other values might be returned. NOTICE_ID type STRING, + "! The creation date of the collection in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. CREATED type DATETIME, + "! Unique identifier of the document. DOCUMENT_ID type STRING, + "! Unique identifier of the query used for relevance training. QUERY_ID type STRING, + "! Severity level of the notice. SEVERITY type STRING, + "! Ingestion or training step in which the notice occurred. Typical step values + "! include: `classify_elements`, `smartDocumentUnderstanding`, `ingestion`, + "! `indexing`, `convert`. **Note:** This is not a complete list, other values + "! might be returned. STEP type STRING, + "! The description of the notice. DESCRIPTION type STRING, end of T_NOTICE. types: "! Information returned after an uploaded document is accepted. begin of T_DOCUMENT_ACCEPTED, + "! The unique identifier of the ingested document. DOCUMENT_ID type STRING, + "! Status of the document in the ingestion process. A status of `processing` is + "! returned for documents that are ingested with a *version* date before + "! `2019-01-01`. The `pending` status is returned for all others. STATUS type STRING, + "! Array of notices produced by the document-ingestion process. NOTICES type STANDARD TABLE OF T_NOTICE WITH NON-UNIQUE DEFAULT KEY, end of T_DOCUMENT_ACCEPTED. types: "! Object describing a specific gateway. begin of T_GATEWAY, + "! The gateway ID of the gateway. GATEWAY_ID type STRING, + "! The user defined name of the gateway. NAME type STRING, + "! The current status of the gateway. `connected` means the gateway is connected to + "! the remotly installed gateway. `idle` means this gateway is not currently in + "! use. STATUS type STRING, + "! The generated **token** for this gateway. The value of this field is used when + "! configuring the remotly installed gateway. TOKEN type STRING, + "! The generated **token_id** for this gateway. The value of this field is used + "! when configuring the remotly installed gateway. TOKEN_ID type STRING, end of T_GATEWAY. types: "! Aggregation result data for the requested metric. begin of T_METRIC_AGGREGATION_RESULT, + "! Date in string form representing the start of this interval. KEY_AS_STRING type DATETIME, + "! Unix epoch time equivalent of the **key_as_string**, that represents the start + "! of this interval. KEY type LONG, + "! Number of matching results. MATCHING_RESULTS type INTEGER, + "! The number of queries with associated events divided by the total number of + "! queries for the interval. Only returned with **event_rate** metrics. EVENT_RATE type DOUBLE, end of T_METRIC_AGGREGATION_RESULT. types: "! An aggregation analyzing log information for queries and events. begin of T_METRIC_AGGREGATION, + "! The measurement interval for this metric. Metric intervals are always 1 day + "! (`1d`). INTERVAL type STRING, + "! The event type associated with this metric result. This field, when present, + "! will always be `click`. EVENT_TYPE type STRING, + "! Array of metric aggregation query results. RESULTS type STANDARD TABLE OF T_METRIC_AGGREGATION_RESULT WITH NON-UNIQUE DEFAULT KEY, end of T_METRIC_AGGREGATION. types: "! The response generated from a call to a **metrics** method. begin of T_METRIC_RESPONSE, + "! Array of metric aggregations. AGGREGATIONS type STANDARD TABLE OF T_METRIC_AGGREGATION WITH NON-UNIQUE DEFAULT KEY, end of T_METRIC_RESPONSE. types: "! Metadata of a query result. begin of T_QUERY_RESULT_METADATA, + "! An unbounded measure of the relevance of a particular result, dependent on the + "! query and matching document. A higher score indicates a greater match to the + "! query parameters. SCORE type DOUBLE, + "! The confidence score for the given result. Calculated based on how relevant the + "! result is estimated to be. confidence can range from `0.0` to `1.0`. The higher + "! the number, the more relevant the document. The `confidence` value for a result + "! was calculated using the model specified in the `document_retrieval_strategy` + "! field of the result set. CONFIDENCE type DOUBLE, end of T_QUERY_RESULT_METADATA. types: "! Query result object. begin of T_QUERY_NOTICES_RESULT, + "! The unique identifier of the document. ID type STRING, + "! Metadata of the document. METADATA type MAP, + "! The collection ID of the collection containing the document for this result. COLLECTION_ID type STRING, + "! Metadata of a query result. RESULT_METADATA type T_QUERY_RESULT_METADATA, - TITLE type STRING, + "! The internal status code returned by the ingestion subsystem indicating the + "! overall result of ingesting the source document. CODE type INTEGER, + "! Name of the original source file (if available). FILENAME type STRING, + "! The type of the original source file. FILE_TYPE type STRING, + "! The SHA-1 hash of the original source file (formatted as a hexadecimal string). SHA1 type STRING, + "! Array of notices for the document. NOTICES type STANDARD TABLE OF T_NOTICE WITH NON-UNIQUE DEFAULT KEY, end of T_QUERY_NOTICES_RESULT. types: "! Each object in the **results** array corresponds to an individual document "! returned by the original query. begin of T_LOG_QRY_RESP_RSLT_DOCS_RSLT, + "! The result rank of this document. A position of `1` indicates that it was the + "! first returned result. POSITION type INTEGER, + "! The **document_id** of the document that this result represents. DOCUMENT_ID type STRING, + "! The raw score of this result. A higher score indicates a greater match to the + "! query parameters. SCORE type DOUBLE, + "! The confidence score of the result's analysis. A higher score indicating greater + "! confidence. CONFIDENCE type DOUBLE, + "! The **collection_id** of the document represented by this result. COLLECTION_ID type STRING, end of T_LOG_QRY_RESP_RSLT_DOCS_RSLT. types: "! Object containing result information that was returned by the query used to "! create this log entry. Only returned with logs of type `query`. begin of T_LOG_QUERY_RESP_RESULT_DOCS, + "! Array of log query response results. RESULTS type STANDARD TABLE OF T_LOG_QRY_RESP_RSLT_DOCS_RSLT WITH NON-UNIQUE DEFAULT KEY, + "! The number of results returned in the query associate with this log. COUNT type INTEGER, end of T_LOG_QUERY_RESP_RESULT_DOCS. types: "! Object containing field details. begin of T_FIELD, + "! The name of the field. FIELD type STRING, + "! The type of the field. TYPE type STRING, end of T_FIELD. types: "! Query event data object. begin of T_EVENT_DATA, + "! The **environment_id** associated with the query that the event is associated + "! with. ENVIRONMENT_ID type STRING, + "! The session token that was returned as part of the query results that this event + "! is associated with. SESSION_TOKEN type STRING, + "! The optional timestamp for the event that was created. If not provided, the time + "! that the event was created in the log was used. CLIENT_TIMESTAMP type DATETIME, + "! The rank of the result item which the event is associated with. DISPLAY_RANK type INTEGER, + "! The **collection_id** of the document that this event is associated with. COLLECTION_ID type STRING, + "! The **document_id** of the document that this event is associated with. DOCUMENT_ID type STRING, + "! The query identifier stored in the log. The query and any events associated with + "! that query are stored with the same **query_id**. QUERY_ID type STRING, end of T_EVENT_DATA. types: "! An object defining the event being created. begin of T_CREATE_EVENT_OBJECT, + "! The event type to be created. TYPE type STRING, + "! Query event data object. DATA type T_EVENT_DATA, end of T_CREATE_EVENT_OBJECT. types: - "! + "! No documentation available. begin of T_NESTED, + "! The area of the results the aggregation was restricted to. PATH type STRING, end of T_NESTED. types: "! Object that describes a long query. begin of T_QUERY_LARGE, + "! A cacheable query that excludes documents that don't mention the query content. + "! Filter searches are better for metadata-type searches and for assessing the + "! concepts in the data set. FILTER type STRING, + "! A query search returns all documents in your data set with full enrichments and + "! full text, but with the most relevant documents listed first. Use a query + "! search when you want to find the most relevant search results. QUERY type STRING, + "! A natural language query that returns relevant documents by utilizing training + "! data and natural language understanding. NATURAL_LANGUAGE_QUERY type STRING, + "! A passages query that returns the most relevant passages from the results. PASSAGES type BOOLEAN, + "! An aggregation search that returns an exact answer by combining query search + "! with filters. Useful for applications to build lists, tables, and time series. + "! For a full list of possible aggregations, see the Query reference. AGGREGATION type STRING, + "! Number of results to return. COUNT type INTEGER, + "! A comma-separated list of the portion of the document hierarchy to return. RETURN type STRING, + "! The number of query results to skip at the beginning. For example, if the total + "! number of results that are returned is 10 and the offset is 8, it returns the + "! last two results. OFFSET type INTEGER, + "! A comma-separated list of fields in the document to sort on. You can optionally + "! specify a sort direction by prefixing the field with `-` for descending or `+` + "! for ascending. Ascending is the default sort direction if no prefix is + "! specified. This parameter cannot be used in the same query as the **bias** + "! parameter. SORT type STRING, + "! When true, a highlight field is returned for each result which contains the + "! fields which match the query with `<em></em>` tags around the + "! matching query terms. HIGHLIGHT type BOOLEAN, + "! A comma-separated list of fields that passages are drawn from. If this parameter + "! not specified, then all top-level fields are included. PASSAGES_FIELDS type STRING, + "! The maximum number of passages to return. The search returns fewer passages if + "! the requested total is not found. The default is `10`. The maximum is `100`. PASSAGES_COUNT type INTEGER, + "! The approximate number of characters that any one passage will have. PASSAGES_CHARACTERS type INTEGER, + "! When `true`, and used with a Watson Discovery News collection, duplicate results + "! (based on the contents of the **title** field) are removed. Duplicate + "! comparison is limited to the current query only; **offset** is not considered. + "! This parameter is currently Beta functionality. DEDUPLICATE type BOOLEAN, + "! When specified, duplicate results based on the field specified are removed from + "! the returned results. Duplicate comparison is limited to the current query + "! only, **offset** is not considered. This parameter is currently Beta + "! functionality. DEDUPLICATE_FIELD type STRING, + "! When `true`, results are returned based on their similarity to the document IDs + "! specified in the **similar.document_ids** parameter. SIMILAR type BOOLEAN, + "! A comma-separated list of document IDs to find similar documents.
+ "!
+ "! **Tip:** Include the **natural_language_query** parameter to expand the scope of + "! the document similarity search with the natural language query. Other query + "! parameters, such as **filter** and **query**, are subsequently applied and + "! reduce the scope. SIMILAR_DOCUMENT_IDS type STRING, + "! A comma-separated list of field names that are used as a basis for comparison to + "! identify similar documents. If not specified, the entire document is used for + "! comparison. SIMILAR_FIELDS type STRING, + "! Field which the returned results will be biased against. The specified field + "! must be either a **date** or **number** format. When a **date** type field is + "! specified returned results are biased towards field values closer to the + "! current date. When a **number** type field is specified, returned results are + "! biased towards higher field values. This parameter cannot be used in the same + "! query as the **sort** parameter. BIAS type STRING, end of T_QUERY_LARGE. types: "! Object containing user-defined name. begin of T_GATEWAY_NAME, + "! User-defined name. NAME type STRING, end of T_GATEWAY_NAME. types: "! Object containing collection document count information. begin of T_DOCUMENT_COUNTS, + "! The total number of available documents in the collection. AVAILABLE type LONG, + "! The number of documents in the collection that are currently being processed. PROCESSING type LONG, + "! The number of documents in the collection that failed to be ingested. FAILED type LONG, + "! The number of documents that have been uploaded to the collection, but have not + "! yet started processing. PENDING type LONG, end of T_DOCUMENT_COUNTS. types: "! Information about custom smart document understanding fields that exist in this "! collection. begin of T_SDU_STATUS_CUSTOM_FIELDS, + "! The number of custom fields defined for this collection. DEFINED type LONG, + "! The maximum number of custom fields that are allowed in this collection. MAXIMUM_ALLOWED type LONG, end of T_SDU_STATUS_CUSTOM_FIELDS. types: "! Object containing smart document understanding information for this collection. begin of T_SDU_STATUS, + "! When `true`, smart document understanding conversion is enabled for this + "! collection. All collections created with a version date after `2019-04-30` have + "! smart document understanding enabled. If `false`, documents added to the + "! collection are converted using the **conversion** settings specified in the + "! configuration associated with the collection. ENABLED type BOOLEAN, + "! The total number of pages annotated using smart document understanding in this + "! collection. TOTAL_ANNOTATED_PAGES type LONG, + "! The current number of pages that can be used for training smart document + "! understanding. The `total_pages` number is calculated as the total number of + "! pages identified from the documents listed in the **total_documents** field. TOTAL_PAGES type LONG, + "! The total number of documents in this collection that can be used to train smart + "! document understanding. For **lite** plan collections, the maximum is the first + "! 20 uploaded documents (not including HTML or JSON documents). For other plans, + "! the maximum is the first 40 uploaded documents (not including HTML or JSON + "! documents). When the maximum is reached, additional documents uploaded to the + "! collection are not considered for training smart document understanding. TOTAL_DOCUMENTS type LONG, + "! Information about custom smart document understanding fields that exist in this + "! collection. CUSTOM_FIELDS type T_SDU_STATUS_CUSTOM_FIELDS, end of T_SDU_STATUS. types: "! Object containing information about the crawl status of this collection. begin of T_COLLECTION_CRAWL_STATUS, + "! Object containing source crawl status information. SOURCE_CRAWL type T_SOURCE_STATUS, end of T_COLLECTION_CRAWL_STATUS. types: "! Summary of the disk usage statistics for this collection. begin of T_COLLECTION_DISK_USAGE, + "! Number of bytes used by the collection. USED_BYTES type INTEGER, end of T_COLLECTION_DISK_USAGE. types: "! A collection for storing documents. begin of T_COLLECTION, + "! The unique identifier of the collection. COLLECTION_ID type STRING, + "! The name of the collection. NAME type STRING, + "! The description of the collection. DESCRIPTION type STRING, + "! The creation date of the collection in the format + "! yyyy-MM-dd'T'HH:mmcon:ss.SSS'Z'. CREATED type DATETIME, + "! The timestamp of when the collection was last updated in the format + "! yyyy-MM-dd'T'HH:mm:ss.SSS'Z'. UPDATED type DATETIME, + "! The status of the collection. STATUS type STRING, + "! The unique identifier of the collection's configuration. CONFIGURATION_ID type STRING, + "! The language of the documents stored in the collection. Permitted values include + "! `en` (English), `de` (German), and `es` (Spanish). LANGUAGE type STRING, + "! Object containing collection document count information. DOCUMENT_COUNTS type T_DOCUMENT_COUNTS, + "! Summary of the disk usage statistics for this collection. DISK_USAGE type T_COLLECTION_DISK_USAGE, + "! Training status details. TRAINING_STATUS type T_TRAINING_STATUS, + "! Object containing information about the crawl status of this collection. CRAWL_STATUS type T_COLLECTION_CRAWL_STATUS, + "! Object containing smart document understanding information for this collection. SMART_DOCUMENT_UNDERSTANDING type T_SDU_STATUS, end of T_COLLECTION. types: @@ -657,217 +1301,425 @@ public section. "! An object representing the configuration options to use for the `elements` "! enrichment. begin of T_ELEMENTS_ENRICHMENT_OPTIONS, + "! *For use with `elements` enrichments only.* The element extraction model to use. + "! * Models available are: `contract`. MODEL type STRING, end of T_ELEMENTS_ENRICHMENT_OPTIONS. types: "! Object containing information about a new environment. begin of T_CREATE_ENVIRONMENT_REQUEST, + "! Name that identifies the environment. NAME type STRING, + "! Description of the environment. DESCRIPTION type STRING, + "! Size of the environment. In the Lite plan the default and only accepted value is + "! `LT`, in all other plans the default is `S`. SIZE type STRING, end of T_CREATE_ENVIRONMENT_REQUEST. types: "! Object containing specification for a new collection. begin of T_CREATE_COLLECTION_REQUEST, + "! The name of the collection to be created. NAME type STRING, + "! A description of the collection. DESCRIPTION type STRING, + "! The ID of the configuration in which the collection is to be created. CONFIGURATION_ID type STRING, + "! The language of the documents stored in the collection, in the form of an ISO + "! 639-1 language code. LANGUAGE type STRING, end of T_CREATE_COLLECTION_REQUEST. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT, + "! The content of the stopword list to ingest. STOPWORD_FILE type FILE, end of T_INLINE_OBJECT. types: "! Query result object. begin of T_QUERY_RESULT, + "! The unique identifier of the document. ID type STRING, + "! Metadata of the document. METADATA type MAP, + "! The collection ID of the collection containing the document for this result. COLLECTION_ID type STRING, + "! Metadata of a query result. RESULT_METADATA type T_QUERY_RESULT_METADATA, - TITLE type STRING, end of T_QUERY_RESULT. types: "! Top hit information for this query. begin of T_TOP_HITS_RESULTS, + "! Number of matching results. MATCHING_RESULTS type INTEGER, + "! Top results returned by the aggregation. HITS type STANDARD TABLE OF T_QUERY_RESULT WITH NON-UNIQUE DEFAULT KEY, end of T_TOP_HITS_RESULTS. types: "! Response object returned when deleting a colleciton. begin of T_DELETE_COLLECTION_RESPONSE, + "! The unique identifier of the collection that is being deleted. COLLECTION_ID type STRING, + "! The status of the collection. The status of a successful deletion operation is + "! `deleted`. STATUS type STRING, end of T_DELETE_COLLECTION_RESPONSE. types: - "! + "! No documentation available. begin of T_TERM, + "! The field where the aggregation is located in the document. FIELD type STRING, + "! The number of terms identified. COUNT type INTEGER, end of T_TERM. types: "! An object containing an array of autocompletion suggestions. begin of T_COMPLETIONS, + "! Array of autcomplete suggestion based on the provided prefix. COMPLETIONS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_COMPLETIONS. types: "! An object contain retrieval type information. begin of T_RETRIEVAL_DETAILS, + "! Indentifies the document retrieval strategy used for this query. + "! `relevancy_training` indicates that the results were returned using a relevancy + "! trained model. `continuous_relevancy_training` indicates that the results were + "! returned using the continuous relevancy training model created by result + "! feedback analysis. `untrained` means the results were returned using the + "! standard untrained model.
+ "!
+ "! **Note**: In the event of trained collections being queried, but the trained + "! model is not used to return results, the **document_retrieval_strategy** will + "! be listed as `untrained`. DOCUMENT_RETRIEVAL_STRATEGY type STRING, end of T_RETRIEVAL_DETAILS. types: "! Response object returned when deleting an environment. begin of T_DELETE_ENVIRONMENT_RESPONSE, + "! The unique identifier for the environment. ENVIRONMENT_ID type STRING, + "! Status of the environment. STATUS type STRING, end of T_DELETE_ENVIRONMENT_RESPONSE. types: - "! The list of fetched fields. - "! + "! The list of fetched fields.
+ "!
"! The fields are returned using a fully qualified name format, however, the format - "! differs slightly from that used by the query operations. - "! - "! * Fields which contain nested JSON objects are assigned a type of "nested". - "! + "! differs slightly from that used by the query operations.
+ "!
+ "! * Fields which contain nested JSON objects are assigned a type of + "! "nested".
+ "!
"! * Fields which belong to a nested object are prefixed with `.properties` (for "! example, `warnings.properties.severity` means that the `warnings` object has a - "! property called `severity`). - "! + "! property called `severity`).
+ "!
"! * Fields returned from the News collection are prefixed with "! `v{N}-fullnews-t3-{YEAR}.mappings` (for example, "! `v5-fullnews-t3-2016.mappings.text.properties.author`). begin of T_LST_COLLECTION_FIELDS_RESP, + "! An array containing information about each field in the collections. FIELDS type STANDARD TABLE OF T_FIELD WITH NON-UNIQUE DEFAULT KEY, end of T_LST_COLLECTION_FIELDS_RESP. types: "! Object containing collection update information. begin of T_UPDATE_COLLECTION_REQUEST, + "! The name of the collection. NAME type STRING, + "! A description of the collection. DESCRIPTION type STRING, + "! The ID of the configuration in which the collection is to be updated. CONFIGURATION_ID type STRING, end of T_UPDATE_COLLECTION_REQUEST. types: "! Object containing gateways array. begin of T_GATEWAY_LIST, + "! Array of configured gateway connections. GATEWAYS type STANDARD TABLE OF T_GATEWAY WITH NON-UNIQUE DEFAULT KEY, end of T_GATEWAY_LIST. types: "! Aggregation result data for the requested metric. begin of T_METRIC_TOKEN_AGGR_RESULT, + "! The content of the **natural_language_query** parameter used in the query that + "! this result represents. KEY type STRING, + "! Number of matching results. MATCHING_RESULTS type INTEGER, + "! The number of queries with associated events divided by the total number of + "! queries currently stored (queries and events are stored in the log for 30 + "! days). EVENT_RATE type DOUBLE, end of T_METRIC_TOKEN_AGGR_RESULT. types: "! An aggregation analyzing log information for queries and events. begin of T_METRIC_TOKEN_AGGREGATION, + "! The event type associated with this metric result. This field, when present, + "! will always be `click`. EVENT_TYPE type STRING, + "! Array of results for the metric token aggregation. RESULTS type STANDARD TABLE OF T_METRIC_TOKEN_AGGR_RESULT WITH NON-UNIQUE DEFAULT KEY, end of T_METRIC_TOKEN_AGGREGATION. types: "! Object that describes a long query. begin of T_COLL_QUERY_LARGE, + "! A cacheable query that excludes documents that don't mention the query content. + "! Filter searches are better for metadata-type searches and for assessing the + "! concepts in the data set. FILTER type STRING, + "! A query search returns all documents in your data set with full enrichments and + "! full text, but with the most relevant documents listed first. Use a query + "! search when you want to find the most relevant search results. QUERY type STRING, + "! A natural language query that returns relevant documents by utilizing training + "! data and natural language understanding. NATURAL_LANGUAGE_QUERY type STRING, + "! A passages query that returns the most relevant passages from the results. PASSAGES type BOOLEAN, + "! An aggregation search that returns an exact answer by combining query search + "! with filters. Useful for applications to build lists, tables, and time series. + "! For a full list of possible aggregations, see the Query reference. AGGREGATION type STRING, + "! Number of results to return. COUNT type INTEGER, + "! A comma-separated list of the portion of the document hierarchy to return. RETURN type STRING, + "! The number of query results to skip at the beginning. For example, if the total + "! number of results that are returned is 10 and the offset is 8, it returns the + "! last two results. OFFSET type INTEGER, + "! A comma-separated list of fields in the document to sort on. You can optionally + "! specify a sort direction by prefixing the field with `-` for descending or `+` + "! for ascending. Ascending is the default sort direction if no prefix is + "! specified. This parameter cannot be used in the same query as the **bias** + "! parameter. SORT type STRING, + "! When true, a highlight field is returned for each result which contains the + "! fields which match the query with `<em></em>` tags around the + "! matching query terms. HIGHLIGHT type BOOLEAN, + "! A comma-separated list of fields that passages are drawn from. If this parameter + "! not specified, then all top-level fields are included. PASSAGES_FIELDS type STRING, + "! The maximum number of passages to return. The search returns fewer passages if + "! the requested total is not found. The default is `10`. The maximum is `100`. PASSAGES_COUNT type INTEGER, + "! The approximate number of characters that any one passage will have. PASSAGES_CHARACTERS type INTEGER, + "! When `true`, and used with a Watson Discovery News collection, duplicate results + "! (based on the contents of the **title** field) are removed. Duplicate + "! comparison is limited to the current query only; **offset** is not considered. + "! This parameter is currently Beta functionality. DEDUPLICATE type BOOLEAN, + "! When specified, duplicate results based on the field specified are removed from + "! the returned results. Duplicate comparison is limited to the current query + "! only, **offset** is not considered. This parameter is currently Beta + "! functionality. DEDUPLICATE_FIELD type STRING, + "! When `true`, results are returned based on their similarity to the document IDs + "! specified in the **similar.document_ids** parameter. SIMILAR type BOOLEAN, + "! A comma-separated list of document IDs to find similar documents.
+ "!
+ "! **Tip:** Include the **natural_language_query** parameter to expand the scope of + "! the document similarity search with the natural language query. Other query + "! parameters, such as **filter** and **query**, are subsequently applied and + "! reduce the scope. SIMILAR_DOCUMENT_IDS type STRING, + "! A comma-separated list of field names that are used as a basis for comparison to + "! identify similar documents. If not specified, the entire document is used for + "! comparison. SIMILAR_FIELDS type STRING, + "! Field which the returned results will be biased against. The specified field + "! must be either a **date** or **number** format. When a **date** type field is + "! specified returned results are biased towards field values closer to the + "! current date. When a **number** type field is specified, returned results are + "! biased towards higher field values. This parameter cannot be used in the same + "! query as the **sort** parameter. BIAS type STRING, + "! When `true` and the **natural_language_query** parameter is used, the + "! **natural_languge_query** parameter is spell checked. The most likely + "! correction is retunred in the **suggested_query** field of the response (if one + "! exists).
+ "!
+ "! **Important:** this parameter is only valid when using the Cloud Pak version of + "! Discovery. SPELLING_SUGGESTIONS type BOOLEAN, end of T_COLL_QUERY_LARGE. types: "! Object containing environment update information. begin of T_UPDATE_ENVIRONMENT_REQUEST, + "! Name that identifies the environment. NAME type STRING, + "! Description of the environment. DESCRIPTION type STRING, + "! Size that the environment should be increased to. Environment size cannot be + "! modified when using a Lite plan. Environment size can only increased and not + "! decreased. SIZE type STRING, end of T_UPDATE_ENVIRONMENT_REQUEST. types: "! Information returned when a configuration is deleted. begin of T_DEL_CONFIGURATION_RESPONSE, + "! The unique identifier for the configuration. CONFIGURATION_ID type STRING, + "! Status of the configuration. A deleted configuration has the status deleted. STATUS type STRING, + "! An array of notice messages, if any. NOTICES type STANDARD TABLE OF T_NOTICE WITH NON-UNIQUE DEFAULT KEY, end of T_DEL_CONFIGURATION_RESPONSE. types: "! A response containing the documents and aggregations for the query. begin of T_QUERY_RESPONSE, + "! The number of matching results for the query. MATCHING_RESULTS type INTEGER, + "! Array of document results for the query. RESULTS type STANDARD TABLE OF T_QUERY_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! Array of aggregation results for the query. AGGREGATIONS type STANDARD TABLE OF T_QUERY_AGGREGATION WITH NON-UNIQUE DEFAULT KEY, + "! Array of passage results for the query. PASSAGES type STANDARD TABLE OF T_QUERY_PASSAGES WITH NON-UNIQUE DEFAULT KEY, + "! The number of duplicate results removed. DUPLICATES_REMOVED type INTEGER, + "! The session token for this query. The session token can be used to add events + "! associated with this query to the query and event log.
+ "!
+ "! **Important:** Session tokens are case sensitive. SESSION_TOKEN type STRING, + "! An object contain retrieval type information. RETRIEVAL_DETAILS type T_RETRIEVAL_DETAILS, + "! The suggestions for a misspelled natural language query. + SUGGESTED_QUERY type STRING, end of T_QUERY_RESPONSE. types: - "! + "! No documentation available. begin of T_TIMESLICE, + "! The field where the aggregation is located in the document. FIELD type STRING, + "! Interval of the aggregation. Valid date interval values are second/seconds + "! minute/minutes, hour/hours, day/days, week/weeks, month/months, and year/years. + "! INTERVAL type STRING, + "! Used to indicate that anomaly detection should be performed. Anomaly detection + "! is used to locate unusual datapoints within a time series. ANOMALY type BOOLEAN, end of T_TIMESLICE. types: "! Training query to add. begin of T_NEW_TRAINING_QUERY, + "! The natural text query for the new training query. NATURAL_LANGUAGE_QUERY type STRING, + "! The filter used on the collection before the **natural_language_query** is + "! applied. FILTER type STRING, + "! Array of training examples. EXAMPLES type STANDARD TABLE OF T_TRAINING_EXAMPLE WITH NON-UNIQUE DEFAULT KEY, end of T_NEW_TRAINING_QUERY. types: "! Status information about a submitted document. begin of T_DOCUMENT_STATUS, + "! The unique identifier of the document. DOCUMENT_ID type STRING, + "! The unique identifier for the configuration. CONFIGURATION_ID type STRING, + "! Status of the document in the ingestion process. STATUS type STRING, + "! Description of the document status. STATUS_DESCRIPTION type STRING, + "! Name of the original source file (if available). FILENAME type STRING, + "! The type of the original source file. FILE_TYPE type STRING, + "! The SHA-1 hash of the original source file (formatted as a hexadecimal string). SHA1 type STRING, + "! Array of notices produced by the document-ingestion process. NOTICES type STANDARD TABLE OF T_NOTICE WITH NON-UNIQUE DEFAULT KEY, end of T_DOCUMENT_STATUS. types: "! Object that describes a long query. begin of T_FED_QUERY_LARGE, + "! A cacheable query that excludes documents that don't mention the query content. + "! Filter searches are better for metadata-type searches and for assessing the + "! concepts in the data set. FILTER type STRING, + "! A query search returns all documents in your data set with full enrichments and + "! full text, but with the most relevant documents listed first. Use a query + "! search when you want to find the most relevant search results. QUERY type STRING, + "! A natural language query that returns relevant documents by utilizing training + "! data and natural language understanding. NATURAL_LANGUAGE_QUERY type STRING, + "! A passages query that returns the most relevant passages from the results. PASSAGES type BOOLEAN, + "! An aggregation search that returns an exact answer by combining query search + "! with filters. Useful for applications to build lists, tables, and time series. + "! For a full list of possible aggregations, see the Query reference. AGGREGATION type STRING, + "! Number of results to return. COUNT type INTEGER, + "! A comma-separated list of the portion of the document hierarchy to return. RETURN type STRING, + "! The number of query results to skip at the beginning. For example, if the total + "! number of results that are returned is 10 and the offset is 8, it returns the + "! last two results. OFFSET type INTEGER, + "! A comma-separated list of fields in the document to sort on. You can optionally + "! specify a sort direction by prefixing the field with `-` for descending or `+` + "! for ascending. Ascending is the default sort direction if no prefix is + "! specified. This parameter cannot be used in the same query as the **bias** + "! parameter. SORT type STRING, + "! When true, a highlight field is returned for each result which contains the + "! fields which match the query with `<em></em>` tags around the + "! matching query terms. HIGHLIGHT type BOOLEAN, + "! A comma-separated list of fields that passages are drawn from. If this parameter + "! not specified, then all top-level fields are included. PASSAGES_FIELDS type STRING, + "! The maximum number of passages to return. The search returns fewer passages if + "! the requested total is not found. The default is `10`. The maximum is `100`. PASSAGES_COUNT type INTEGER, + "! The approximate number of characters that any one passage will have. PASSAGES_CHARACTERS type INTEGER, + "! When `true`, and used with a Watson Discovery News collection, duplicate results + "! (based on the contents of the **title** field) are removed. Duplicate + "! comparison is limited to the current query only; **offset** is not considered. + "! This parameter is currently Beta functionality. DEDUPLICATE type BOOLEAN, + "! When specified, duplicate results based on the field specified are removed from + "! the returned results. Duplicate comparison is limited to the current query + "! only, **offset** is not considered. This parameter is currently Beta + "! functionality. DEDUPLICATE_FIELD type STRING, + "! When `true`, results are returned based on their similarity to the document IDs + "! specified in the **similar.document_ids** parameter. SIMILAR type BOOLEAN, + "! A comma-separated list of document IDs to find similar documents.
+ "!
+ "! **Tip:** Include the **natural_language_query** parameter to expand the scope of + "! the document similarity search with the natural language query. Other query + "! parameters, such as **filter** and **query**, are subsequently applied and + "! reduce the scope. SIMILAR_DOCUMENT_IDS type STRING, + "! A comma-separated list of field names that are used as a basis for comparison to + "! identify similar documents. If not specified, the entire document is used for + "! comparison. SIMILAR_FIELDS type STRING, + "! Field which the returned results will be biased against. The specified field + "! must be either a **date** or **number** format. When a **date** type field is + "! specified returned results are biased towards field values closer to the + "! current date. When a **number** type field is specified, returned results are + "! biased towards higher field values. This parameter cannot be used in the same + "! query as the **sort** parameter. BIAS type STRING, + "! A comma-separated list of collection IDs to be queried against. COLLECTION_IDS type STRING, end of T_FED_QUERY_LARGE. types: "! An error response object. begin of T_ERROR_RESPONSE, + "! The HTTP error status code. CODE type INTEGER, + "! A message describing the error. ERROR type STRING, end of T_ERROR_RESPONSE. types: @@ -875,18 +1727,40 @@ public section. "! For example, you could have expansions for the word `hot` in one object, and "! expansions for the word `cold` in another. begin of T_EXPANSION, + "! A list of terms that will be expanded for this expansion. If specified, only the + "! items in this list are expanded. INPUT_TERMS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! A list of terms that this expansion will be expanded to. If specified without + "! **input_terms**, it also functions as the input term list. EXPANDED_TERMS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_EXPANSION. types: "! The query expansion definitions for the specified collection. begin of T_EXPANSIONS, + "! An array of query expansion definitions.
+ "!
+ "! Each object in the **expansions** array represents a term or set of terms that + "! will be expanded into other terms. Each expansion object can be configured as + "! bidirectional or unidirectional. Bidirectional means that all terms are + "! expanded to all other terms in the object. Unidirectional means that a set list + "! of terms can be expanded into a second list of terms.
+ "!
+ "! To create a bi-directional expansion specify an **expanded_terms** array. When + "! found in a query, all items in the **expanded_terms** array are then expanded + "! to the other items in the same array.
+ "!
+ "! To create a uni-directional expansion, specify both an array of **input_terms** + "! and an array of **expanded_terms**. When items in the **input_terms** array are + "! present in a query, they are expanded using the items listed in the + "! **expanded_terms** array. EXPANSIONS type STANDARD TABLE OF T_EXPANSION WITH NON-UNIQUE DEFAULT KEY, end of T_EXPANSIONS. types: "! An object defining the event being created. begin of T_CREATE_EVENT_RESPONSE, + "! The event type that was created. TYPE type STRING, + "! Query event data object. DATA type T_EVENT_DATA, end of T_CREATE_EVENT_RESPONSE. types: @@ -896,48 +1770,105 @@ public section. "! The response generated from a call to a **metrics** method that evaluates "! tokens. begin of T_METRIC_TOKEN_RESPONSE, + "! Array of metric token aggregations. AGGREGATIONS type STANDARD TABLE OF T_METRIC_TOKEN_AGGREGATION WITH NON-UNIQUE DEFAULT KEY, end of T_METRIC_TOKEN_RESPONSE. types: "! Object containing an array of training examples. begin of T_TRAINING_EXAMPLE_LIST, + "! Array of training examples. EXAMPLES type STANDARD TABLE OF T_TRAINING_EXAMPLE WITH NON-UNIQUE DEFAULT KEY, end of T_TRAINING_EXAMPLE_LIST. types: "! Information returned when a document is deleted. begin of T_DELETE_DOCUMENT_RESPONSE, + "! The unique identifier of the document. DOCUMENT_ID type STRING, + "! Status of the document. A deleted document has the status deleted. STATUS type STRING, end of T_DELETE_DOCUMENT_RESPONSE. types: - "! + "! No documentation available. begin of T_TOP_HITS, + "! Number of top hits returned by the aggregation. SIZE type INTEGER, + "! No documentation available. HITS type T_TOP_HITS_RESULTS, end of T_TOP_HITS. types: "! Individual result object for a **logs** query. Each object represents either a "! query to a Discovery collection or an event that is associated with a query. begin of T_LOG_QUERY_RESPONSE_RESULT, + "! The environment ID that is associated with this log entry. ENVIRONMENT_ID type STRING, + "! The **customer_id** label that was specified in the header of the query or event + "! API call that corresponds to this log entry. CUSTOMER_ID type STRING, + "! The type of log entry returned.
+ "!
+ "! **query** indicates that the log represents the results of a call to the single + "! collection **query** method.
+ "!
+ "! **event** indicates that the log represents a call to the **events** API. DOCUMENT_TYPE type STRING, + "! The value of the **natural_language_query** query parameter that was used to + "! create these results. Only returned with logs of type **query**.
+ "!
+ "! **Note:** Other query parameters (such as **filter** or **deduplicate**) might + "! have been used with this query, but are not recorded. NATURAL_LANGUAGE_QUERY type STRING, + "! Object containing result information that was returned by the query used to + "! create this log entry. Only returned with logs of type `query`. DOCUMENT_RESULTS type T_LOG_QUERY_RESP_RESULT_DOCS, + "! Date that the log result was created. Returned in `YYYY-MM-DDThh:mm:ssZ` format. + "! CREATED_TIMESTAMP type DATETIME, + "! Date specified by the user when recording an event. Returned in + "! `YYYY-MM-DDThh:mm:ssZ` format. Only returned with logs of type **event**. CLIENT_TIMESTAMP type DATETIME, + "! Identifier that corresponds to the **natural_language_query** string used in the + "! original or associated query. All **event** and **query** log entries that have + "! the same original **natural_language_query** string also have them same + "! **query_id**. This field can be used to recall all **event** and **query** log + "! results that have the same original query (**event** logs do not contain the + "! original **natural_language_query** field). QUERY_ID type STRING, + "! Unique identifier (within a 24-hour period) that identifies a single `query` log + "! and any `event` logs that were created for it.
+ "!
+ "! **Note:** If the exact same query is run at the exact same time on different + "! days, the **session_token** for those queries might be identical. However, the + "! **created_timestamp** differs.
+ "!
+ "! **Note:** Session tokens are case sensitive. To avoid matching on session tokens + "! that are identical except for case, use the exact match operator (`::`) when + "! you query for a specific session token. SESSION_TOKEN type STRING, + "! The collection ID of the document associated with this event. Only returned with + "! logs of type `event`. COLLECTION_ID type STRING, + "! The original display rank of the document associated with this event. Only + "! returned with logs of type `event`. DISPLAY_RANK type INTEGER, + "! The document ID of the document associated with this event. Only returned with + "! logs of type `event`. DOCUMENT_ID type STRING, + "! The type of event that this object respresents. Possible values are
+ "!
+ "! - `query` the log of a query to a collection
+ "!
+ "! - `click` the result of a call to the **events** endpoint. EVENT_TYPE type STRING, + "! The type of result that this **event** is associated with. Only returned with + "! logs of type `event`. RESULT_TYPE type STRING, end of T_LOG_QUERY_RESPONSE_RESULT. types: "! Object containing results that match the requested **logs** query. begin of T_LOG_QUERY_RESPONSE, + "! Number of matching results. MATCHING_RESULTS type INTEGER, + "! Array of log query response results. RESULTS type STANDARD TABLE OF T_LOG_QUERY_RESPONSE_RESULT WITH NON-UNIQUE DEFAULT KEY, end of T_LOG_QUERY_RESPONSE. types: @@ -948,25 +1879,33 @@ public section. types: "! Training example to add. begin of T_TRAINING_EXAMPLE_PATCH, + "! The example to add. CROSS_REFERENCE type STRING, + "! The relevance value for this example. RELEVANCE type INTEGER, end of T_TRAINING_EXAMPLE_PATCH. types: "! Response object containing an array of collection details. begin of T_LIST_COLLECTIONS_RESPONSE, + "! An array containing information about each collection in the environment. COLLECTIONS type STANDARD TABLE OF T_COLLECTION WITH NON-UNIQUE DEFAULT KEY, end of T_LIST_COLLECTIONS_RESPONSE. types: - "! + "! No documentation available. begin of T_CALCULATION, + "! The field where the aggregation is located in the document. FIELD type STRING, + "! Value of the aggregation. VALUE type DOUBLE, end of T_CALCULATION. types: "! Training information for a specific collection. begin of T_TRAINING_DATA_SET, + "! The environment id associated with this training data set. ENVIRONMENT_ID type STRING, + "! The collection id associated with this training data set. COLLECTION_ID type STRING, + "! Array of training queries. QUERIES type STANDARD TABLE OF T_TRAINING_QUERY WITH NON-UNIQUE DEFAULT KEY, end of T_TRAINING_DATA_SET. types: @@ -975,16 +1914,23 @@ public section. types: "! Object containing notice query results. begin of T_QUERY_NOTICES_RESPONSE, + "! The number of matching results. MATCHING_RESULTS type INTEGER, + "! Array of document results that match the query. RESULTS type STANDARD TABLE OF T_QUERY_NOTICES_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! Array of aggregation results that match the query. AGGREGATIONS type STANDARD TABLE OF T_QUERY_AGGREGATION WITH NON-UNIQUE DEFAULT KEY, + "! Array of passage results that match the query. PASSAGES type STANDARD TABLE OF T_QUERY_PASSAGES WITH NON-UNIQUE DEFAULT KEY, + "! The number of duplicates removed from this notices query. DUPLICATES_REMOVED type INTEGER, end of T_QUERY_NOTICES_RESPONSE. types: - "! + "! No documentation available. begin of T_HISTOGRAM, + "! The field where the aggregation is located in the document. FIELD type STRING, + "! Interval of the aggregation. (For 'histogram' type). INTERVAL type INTEGER, end of T_HISTOGRAM. @@ -1206,11 +2152,11 @@ constants: DUPLICATES_REMOVED type string value 'duplicates_removed', SESSION_TOKEN type string value 'session_token', RETRIEVAL_DETAILS type string value 'retrieval_details', + SUGGESTED_QUERY type string value 'suggested_query', ID type string value 'id', METADATA type string value 'metadata', INNER type string value 'inner', RESULT_METADATA type string value 'result_metadata', - TITLE type string value 'title', SCORE type string value 'score', CONFIDENCE type string value 'confidence', CODE type string value 'code', @@ -1369,16 +2315,17 @@ constants: "! Create an environment. "! - "! @parameter I_body | + "! @parameter I_BODY | "! An object that defines an environment name and optional description. The fields "! in this object are not approved for personal information and cannot be deleted "! based on customer ID. "! @parameter E_RESPONSE | "! Service return value of type T_ENVIRONMENT + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_ENVIRONMENT importing - !I_body type T_CREATE_ENVIRONMENT_REQUEST + !I_BODY type T_CREATE_ENVIRONMENT_REQUEST !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1387,14 +2334,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! List environments. "! - "! @parameter I_name | + "! @parameter I_NAME | "! Show only the environment with the given name. "! @parameter E_RESPONSE | "! Service return value of type T_LIST_ENVIRONMENTS_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_ENVIRONMENTS importing - !I_name type STRING optional + !I_NAME type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_LIST_ENVIRONMENTS_RESPONSE @@ -1402,14 +2350,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get environment info. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. "! @parameter E_RESPONSE | "! Service return value of type T_ENVIRONMENT + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_ENVIRONMENT importing - !I_environment_id type STRING + !I_ENVIRONMENT_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_ENVIRONMENT @@ -1417,17 +2366,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update an environment. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_body | + "! @parameter I_BODY | "! An object that defines the environment's name and, optionally, description. "! @parameter E_RESPONSE | "! Service return value of type T_ENVIRONMENT + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_ENVIRONMENT importing - !I_environment_id type STRING - !I_body type T_UPDATE_ENVIRONMENT_REQUEST + !I_ENVIRONMENT_ID type STRING + !I_BODY type T_UPDATE_ENVIRONMENT_REQUEST !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1436,14 +2386,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete environment. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. "! @parameter E_RESPONSE | "! Service return value of type T_DELETE_ENVIRONMENT_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_ENVIRONMENT importing - !I_environment_id type STRING + !I_ENVIRONMENT_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_DELETE_ENVIRONMENT_RESPONSE @@ -1451,17 +2402,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! List fields across collections. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_ids | + "! @parameter I_COLLECTION_IDS | "! A comma-separated list of collection IDs to be queried against. "! @parameter E_RESPONSE | "! Service return value of type T_LST_COLLECTION_FIELDS_RESP + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_FIELDS importing - !I_environment_id type STRING - !I_collection_ids type TT_STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_IDS type TT_STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_LST_COLLECTION_FIELDS_RESP @@ -1470,20 +2422,20 @@ constants: "! Add configuration. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_configuration | + "! @parameter I_CONFIGURATION | "! Input an object that enables you to customize how your content is ingested and - "! what enrichments are added to your data. - "! + "! what enrichments are added to your data.
+ "!
"! **name** is required and must be unique within the current **environment**. All - "! other properties are optional. - "! + "! other properties are optional.
+ "!
"! If the input configuration contains the **configuration_id**, **created**, or "! **updated** properties, then they will be ignored and overridden by the system "! (an error is not returned so that the overridden fields do not need to be - "! removed when copying a configuration). - "! + "! removed when copying a configuration).
+ "!
"! The configuration can contain unrecognized JSON fields. Any such fields will be "! ignored and will not generate an error. This makes it easier to use newer "! configuration files with older versions of the API and the service. It also @@ -1491,11 +2443,12 @@ constants: "! the configuration. "! @parameter E_RESPONSE | "! Service return value of type T_CONFIGURATION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_CONFIGURATION importing - !I_environment_id type STRING - !I_configuration type T_CONFIGURATION + !I_ENVIRONMENT_ID type STRING + !I_CONFIGURATION type T_CONFIGURATION !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1504,17 +2457,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! List configurations. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_name | + "! @parameter I_NAME | "! Find configurations with the given name. "! @parameter E_RESPONSE | "! Service return value of type T_LIST_CONFIGURATIONS_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_CONFIGURATIONS importing - !I_environment_id type STRING - !I_name type STRING optional + !I_ENVIRONMENT_ID type STRING + !I_NAME type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_LIST_CONFIGURATIONS_RESPONSE @@ -1522,17 +2476,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get configuration details. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_configuration_id | + "! @parameter I_CONFIGURATION_ID | "! The ID of the configuration. "! @parameter E_RESPONSE | "! Service return value of type T_CONFIGURATION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_CONFIGURATION importing - !I_environment_id type STRING - !I_configuration_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_CONFIGURATION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_CONFIGURATION @@ -1540,22 +2495,22 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update a configuration. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_configuration_id | + "! @parameter I_CONFIGURATION_ID | "! The ID of the configuration. - "! @parameter I_configuration | + "! @parameter I_CONFIGURATION | "! Input an object that enables you to update and customize how your data is "! ingested and what enrichments are added to your data. The **name** parameter "! is required and must be unique within the current **environment**. All other "! properties are optional, but if they are omitted the default values replace - "! the current value of each omitted property. - "! + "! the current value of each omitted property.
+ "!
"! If the input configuration contains the **configuration_id**, **created**, or "! **updated** properties, they are ignored and overridden by the system, and an "! error is not returned so that the overridden fields do not need to be removed - "! when updating a configuration. - "! + "! when updating a configuration.
+ "!
"! The configuration can contain unrecognized JSON fields. Any such fields are "! ignored and do not generate an error. This makes it easier to use newer "! configuration files with older versions of the API and the service. It also @@ -1563,12 +2518,13 @@ constants: "! the configuration. "! @parameter E_RESPONSE | "! Service return value of type T_CONFIGURATION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_CONFIGURATION importing - !I_environment_id type STRING - !I_configuration_id type STRING - !I_configuration type T_CONFIGURATION + !I_ENVIRONMENT_ID type STRING + !I_CONFIGURATION_ID type STRING + !I_CONFIGURATION type T_CONFIGURATION !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1577,17 +2533,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a configuration. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_configuration_id | + "! @parameter I_CONFIGURATION_ID | "! The ID of the configuration. "! @parameter E_RESPONSE | "! Service return value of type T_DEL_CONFIGURATION_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_CONFIGURATION importing - !I_environment_id type STRING - !I_configuration_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_CONFIGURATION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_DEL_CONFIGURATION_RESPONSE @@ -1596,17 +2553,18 @@ constants: "! Create a collection. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_body | + "! @parameter I_BODY | "! Input an object that allows you to add a collection. "! @parameter E_RESPONSE | "! Service return value of type T_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_COLLECTION importing - !I_environment_id type STRING - !I_body type T_CREATE_COLLECTION_REQUEST + !I_ENVIRONMENT_ID type STRING + !I_BODY type T_CREATE_COLLECTION_REQUEST !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1615,17 +2573,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! List collections. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_name | + "! @parameter I_NAME | "! Find collections with the given name. "! @parameter E_RESPONSE | "! Service return value of type T_LIST_COLLECTIONS_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_COLLECTIONS importing - !I_environment_id type STRING - !I_name type STRING optional + !I_ENVIRONMENT_ID type STRING + !I_NAME type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_LIST_COLLECTIONS_RESPONSE @@ -1633,17 +2592,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get collection details. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. "! @parameter E_RESPONSE | "! Service return value of type T_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_COLLECTION importing - !I_environment_id type STRING - !I_collection_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_COLLECTION @@ -1651,20 +2611,21 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update a collection. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_body | + "! @parameter I_BODY | "! Input an object that allows you to update a collection. "! @parameter E_RESPONSE | "! Service return value of type T_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_COLLECTION importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_body type T_UPDATE_COLLECTION_REQUEST optional + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_BODY type T_UPDATE_COLLECTION_REQUEST !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1673,17 +2634,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a collection. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. "! @parameter E_RESPONSE | "! Service return value of type T_DELETE_COLLECTION_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_COLLECTION importing - !I_environment_id type STRING - !I_collection_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_DELETE_COLLECTION_RESPONSE @@ -1691,17 +2653,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! List collection fields. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. "! @parameter E_RESPONSE | "! Service return value of type T_LST_COLLECTION_FIELDS_RESP + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_COLLECTION_FIELDS importing - !I_environment_id type STRING - !I_collection_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_LST_COLLECTION_FIELDS_RESP @@ -1710,17 +2673,18 @@ constants: "! Get the expansion list. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. "! @parameter E_RESPONSE | "! Service return value of type T_EXPANSIONS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_EXPANSIONS importing - !I_environment_id type STRING - !I_collection_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_EXPANSIONS @@ -1728,20 +2692,21 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create or update expansion list. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_body | + "! @parameter I_BODY | "! An object that defines the expansion list. "! @parameter E_RESPONSE | "! Service return value of type T_EXPANSIONS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_EXPANSIONS importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_body type T_EXPANSIONS + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_BODY type T_EXPANSIONS !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1750,30 +2715,32 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete the expansion list. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_EXPANSIONS importing - !I_environment_id type STRING - !I_collection_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "! Get tokenization dictionary status. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. "! @parameter E_RESPONSE | "! Service return value of type T_TOKEN_DICT_STATUS_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_TOKENIZATION_DICT_STATUS importing - !I_environment_id type STRING - !I_collection_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TOKEN_DICT_STATUS_RESPONSE @@ -1781,20 +2748,21 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create tokenization dictionary. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_tokenization_dictionary | + "! @parameter I_TOKENIZATION_DICTIONARY | "! An object that represents the tokenization dictionary to be uploaded. "! @parameter E_RESPONSE | "! Service return value of type T_TOKEN_DICT_STATUS_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_TOKENIZATION_DICTIONARY importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_tokenization_dictionary type T_TOKEN_DICT optional + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_TOKENIZATION_DICTIONARY type T_TOKEN_DICT optional !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1803,30 +2771,32 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete tokenization dictionary. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_TOKENIZATION_DICTIONARY importing - !I_environment_id type STRING - !I_collection_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "! Get stopword list status. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. "! @parameter E_RESPONSE | "! Service return value of type T_TOKEN_DICT_STATUS_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_STOPWORD_LIST_STATUS importing - !I_environment_id type STRING - !I_collection_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TOKEN_DICT_STATUS_RESPONSE @@ -1834,24 +2804,25 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create stopword list. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_stopword_file | + "! @parameter I_STOPWORD_FILE | "! The content of the stopword list to ingest. - "! @parameter I_stopword_filename | + "! @parameter I_STOPWORD_FILENAME | "! The filename for stopwordFile. "! @parameter E_RESPONSE | "! Service return value of type T_TOKEN_DICT_STATUS_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_STOPWORD_LIST importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_stopword_file type FILE - !I_stopword_filename type STRING - !I_stopword_file_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_STOPWORD_FILE type FILE + !I_STOPWORD_FILENAME type STRING + !I_STOPWORD_FILE_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -1860,50 +2831,52 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a custom stopword list. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_STOPWORD_LIST importing - !I_environment_id type STRING - !I_collection_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "! Add a document. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_file | + "! @parameter I_FILE | "! The content of the document to ingest. The maximum supported file size when "! adding a file to a collection is 50 megabytes, the maximum supported file size - "! when testing a confiruration is 1 megabyte. Files larger than the supported + "! when testing a configuration is 1 megabyte. Files larger than the supported "! size are rejected. - "! @parameter I_filename | + "! @parameter I_FILENAME | "! The filename for file. - "! @parameter I_file_content_type | + "! @parameter I_FILE_CONTENT_TYPE | "! The content type of file. - "! @parameter I_metadata | + "! @parameter I_METADATA | "! The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 - "! MB are rejected. Example: ``` { - "! "Creator": "Johnny Appleseed", - "! "Subject": "Apples" + "! MB are rejected. Example: ``` {
+ "! "Creator": "Johnny Appleseed",
+ "! "Subject": "Apples"
"! } ```. "! @parameter E_RESPONSE | "! Service return value of type T_DOCUMENT_ACCEPTED + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ADD_DOCUMENT importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_file type FILE optional - !I_filename type STRING optional - !I_file_content_type type STRING optional - !I_metadata type STRING optional + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_FILE type FILE optional + !I_FILENAME type STRING optional + !I_FILE_CONTENT_TYPE type STRING optional + !I_METADATA type STRING optional !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -1912,20 +2885,21 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get document details. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_document_id | + "! @parameter I_DOCUMENT_ID | "! The ID of the document. "! @parameter E_RESPONSE | "! Service return value of type T_DOCUMENT_STATUS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_DOCUMENT_STATUS importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_document_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_DOCUMENT_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_DOCUMENT_STATUS @@ -1933,39 +2907,40 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update a document. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_document_id | + "! @parameter I_DOCUMENT_ID | "! The ID of the document. - "! @parameter I_file | + "! @parameter I_FILE | "! The content of the document to ingest. The maximum supported file size when "! adding a file to a collection is 50 megabytes, the maximum supported file size - "! when testing a confiruration is 1 megabyte. Files larger than the supported + "! when testing a configuration is 1 megabyte. Files larger than the supported "! size are rejected. - "! @parameter I_filename | + "! @parameter I_FILENAME | "! The filename for file. - "! @parameter I_file_content_type | + "! @parameter I_FILE_CONTENT_TYPE | "! The content type of file. - "! @parameter I_metadata | + "! @parameter I_METADATA | "! The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 - "! MB are rejected. Example: ``` { - "! "Creator": "Johnny Appleseed", - "! "Subject": "Apples" + "! MB are rejected. Example: ``` {
+ "! "Creator": "Johnny Appleseed",
+ "! "Subject": "Apples"
"! } ```. "! @parameter E_RESPONSE | "! Service return value of type T_DOCUMENT_ACCEPTED + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_DOCUMENT importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_document_id type STRING - !I_file type FILE optional - !I_filename type STRING optional - !I_file_content_type type STRING optional - !I_metadata type STRING optional + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_DOCUMENT_ID type STRING + !I_FILE type FILE optional + !I_FILENAME type STRING optional + !I_FILE_CONTENT_TYPE type STRING optional + !I_METADATA type STRING optional !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -1974,20 +2949,21 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a document. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_document_id | + "! @parameter I_DOCUMENT_ID | "! The ID of the document. "! @parameter E_RESPONSE | "! Service return value of type T_DELETE_DOCUMENT_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_DOCUMENT importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_document_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_DOCUMENT_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_DELETE_DOCUMENT_RESPONSE @@ -1996,23 +2972,24 @@ constants: "! Query a collection. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_query_long | + "! @parameter I_QUERY_LONG | "! An object that represents the query to be submitted. - "! @parameter I_X_Watson_Logging_Opt_Out | + "! @parameter I_X_WATSON_LOGGING_OPT_OUT | "! If `true`, queries are not stored in the Discovery **Logs** endpoint. "! @parameter E_RESPONSE | "! Service return value of type T_QUERY_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods QUERY importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_query_long type T_COLL_QUERY_LARGE optional - !I_X_Watson_Logging_Opt_Out type BOOLEAN default c_boolean_false + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_QUERY_LONG type T_COLL_QUERY_LARGE optional + !I_X_WATSON_LOGGING_OPT_OUT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2021,96 +2998,97 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Query system notices. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_filter | + "! @parameter I_FILTER | "! A cacheable query that excludes documents that don't mention the query content. "! Filter searches are better for metadata-type searches and for assessing the "! concepts in the data set. - "! @parameter I_query | + "! @parameter I_QUERY | "! A query search returns all documents in your data set with full enrichments and "! full text, but with the most relevant documents listed first. - "! @parameter I_natural_language_query | + "! @parameter I_NATURAL_LANGUAGE_QUERY | "! A natural language query that returns relevant documents by utilizing training "! data and natural language understanding. - "! @parameter I_passages | + "! @parameter I_PASSAGES | "! A passages query that returns the most relevant passages from the results. - "! @parameter I_aggregation | + "! @parameter I_AGGREGATION | "! An aggregation search that returns an exact answer by combining query search "! with filters. Useful for applications to build lists, tables, and time series. "! For a full list of possible aggregations, see the Query reference. - "! @parameter I_count | + "! @parameter I_COUNT | "! Number of results to return. The maximum for the **count** and **offset** values "! together in any one query is **10000**. - "! @parameter I_return | + "! @parameter I_RETURN | "! A comma-separated list of the portion of the document hierarchy to return. - "! @parameter I_offset | + "! @parameter I_OFFSET | "! The number of query results to skip at the beginning. For example, if the total "! number of results that are returned is 10 and the offset is 8, it returns the "! last two results. The maximum for the **count** and **offset** values together "! in any one query is **10000**. - "! @parameter I_sort | + "! @parameter I_SORT | "! A comma-separated list of fields in the document to sort on. You can optionally "! specify a sort direction by prefixing the field with `-` for descending or `+` "! for ascending. Ascending is the default sort direction if no prefix is "! specified. - "! @parameter I_highlight | + "! @parameter I_HIGHLIGHT | "! When true, a highlight field is returned for each result which contains the - "! fields which match the query with `` tags around the matching query - "! terms. - "! @parameter I_passages_fields | + "! fields which match the query with `<em></em>` tags around the + "! matching query terms. + "! @parameter I_PASSAGES_FIELDS | "! A comma-separated list of fields that passages are drawn from. If this parameter "! not specified, then all top-level fields are included. - "! @parameter I_passages_count | + "! @parameter I_PASSAGES_COUNT | "! The maximum number of passages to return. The search returns fewer passages if "! the requested total is not found. - "! @parameter I_passages_characters | + "! @parameter I_PASSAGES_CHARACTERS | "! The approximate number of characters that any one passage will have. - "! @parameter I_deduplicate_field | + "! @parameter I_DEDUPLICATE_FIELD | "! When specified, duplicate results based on the field specified are removed from "! the returned results. Duplicate comparison is limited to the current query "! only, **offset** is not considered. This parameter is currently Beta "! functionality. - "! @parameter I_similar | + "! @parameter I_SIMILAR | "! When `true`, results are returned based on their similarity to the document IDs "! specified in the **similar.document_ids** parameter. - "! @parameter I_similar_document_ids | - "! A comma-separated list of document IDs to find similar documents. - "! + "! @parameter I_SIMILAR_DOCUMENT_IDS | + "! A comma-separated list of document IDs to find similar documents.
+ "!
"! **Tip:** Include the **natural_language_query** parameter to expand the scope of "! the document similarity search with the natural language query. Other query "! parameters, such as **filter** and **query**, are subsequently applied and "! reduce the scope. - "! @parameter I_similar_fields | + "! @parameter I_SIMILAR_FIELDS | "! A comma-separated list of field names that are used as a basis for comparison to "! identify similar documents. If not specified, the entire document is used for "! comparison. "! @parameter E_RESPONSE | "! Service return value of type T_QUERY_NOTICES_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods QUERY_NOTICES importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_filter type STRING optional - !I_query type STRING optional - !I_natural_language_query type STRING optional - !I_passages type BOOLEAN optional - !I_aggregation type STRING optional - !I_count type INTEGER optional - !I_return type TT_STRING optional - !I_offset type INTEGER optional - !I_sort type TT_STRING optional - !I_highlight type BOOLEAN default c_boolean_false - !I_passages_fields type TT_STRING optional - !I_passages_count type INTEGER optional - !I_passages_characters type INTEGER optional - !I_deduplicate_field type STRING optional - !I_similar type BOOLEAN default c_boolean_false - !I_similar_document_ids type TT_STRING optional - !I_similar_fields type TT_STRING optional + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_FILTER type STRING optional + !I_QUERY type STRING optional + !I_NATURAL_LANGUAGE_QUERY type STRING optional + !I_PASSAGES type BOOLEAN optional + !I_AGGREGATION type STRING optional + !I_COUNT type INTEGER optional + !I_RETURN type TT_STRING optional + !I_OFFSET type INTEGER optional + !I_SORT type TT_STRING optional + !I_HIGHLIGHT type BOOLEAN default c_boolean_false + !I_PASSAGES_FIELDS type TT_STRING optional + !I_PASSAGES_COUNT type INTEGER optional + !I_PASSAGES_CHARACTERS type INTEGER optional + !I_DEDUPLICATE_FIELD type STRING optional + !I_SIMILAR type BOOLEAN default c_boolean_false + !I_SIMILAR_DOCUMENT_IDS type TT_STRING optional + !I_SIMILAR_FIELDS type TT_STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_QUERY_NOTICES_RESPONSE @@ -2118,20 +3096,21 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Query multiple collections. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_query_long | - "! - "! @parameter I_X_Watson_Logging_Opt_Out | + "! @parameter I_QUERY_LONG | + "! No documentation available. + "! @parameter I_X_WATSON_LOGGING_OPT_OUT | "! If `true`, queries are not stored in the Discovery **Logs** endpoint. "! @parameter E_RESPONSE | "! Service return value of type T_QUERY_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods FEDERATED_QUERY importing - !I_environment_id type STRING - !I_query_long type T_FED_QUERY_LARGE optional - !I_X_Watson_Logging_Opt_Out type BOOLEAN default c_boolean_false + !I_ENVIRONMENT_ID type STRING + !I_QUERY_LONG type T_FED_QUERY_LARGE + !I_X_WATSON_LOGGING_OPT_OUT type BOOLEAN default c_boolean_false !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2140,82 +3119,83 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Query multiple collection system notices. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_ids | + "! @parameter I_COLLECTION_IDS | "! A comma-separated list of collection IDs to be queried against. - "! @parameter I_filter | + "! @parameter I_FILTER | "! A cacheable query that excludes documents that don't mention the query content. "! Filter searches are better for metadata-type searches and for assessing the "! concepts in the data set. - "! @parameter I_query | + "! @parameter I_QUERY | "! A query search returns all documents in your data set with full enrichments and "! full text, but with the most relevant documents listed first. - "! @parameter I_natural_language_query | + "! @parameter I_NATURAL_LANGUAGE_QUERY | "! A natural language query that returns relevant documents by utilizing training "! data and natural language understanding. - "! @parameter I_aggregation | + "! @parameter I_AGGREGATION | "! An aggregation search that returns an exact answer by combining query search "! with filters. Useful for applications to build lists, tables, and time series. "! For a full list of possible aggregations, see the Query reference. - "! @parameter I_count | + "! @parameter I_COUNT | "! Number of results to return. The maximum for the **count** and **offset** values "! together in any one query is **10000**. - "! @parameter I_return | + "! @parameter I_RETURN | "! A comma-separated list of the portion of the document hierarchy to return. - "! @parameter I_offset | + "! @parameter I_OFFSET | "! The number of query results to skip at the beginning. For example, if the total "! number of results that are returned is 10 and the offset is 8, it returns the "! last two results. The maximum for the **count** and **offset** values together "! in any one query is **10000**. - "! @parameter I_sort | + "! @parameter I_SORT | "! A comma-separated list of fields in the document to sort on. You can optionally "! specify a sort direction by prefixing the field with `-` for descending or `+` "! for ascending. Ascending is the default sort direction if no prefix is "! specified. - "! @parameter I_highlight | + "! @parameter I_HIGHLIGHT | "! When true, a highlight field is returned for each result which contains the - "! fields which match the query with `` tags around the matching query - "! terms. - "! @parameter I_deduplicate_field | + "! fields which match the query with `<em></em>` tags around the + "! matching query terms. + "! @parameter I_DEDUPLICATE_FIELD | "! When specified, duplicate results based on the field specified are removed from "! the returned results. Duplicate comparison is limited to the current query "! only, **offset** is not considered. This parameter is currently Beta "! functionality. - "! @parameter I_similar | + "! @parameter I_SIMILAR | "! When `true`, results are returned based on their similarity to the document IDs "! specified in the **similar.document_ids** parameter. - "! @parameter I_similar_document_ids | - "! A comma-separated list of document IDs to find similar documents. - "! + "! @parameter I_SIMILAR_DOCUMENT_IDS | + "! A comma-separated list of document IDs to find similar documents.
+ "!
"! **Tip:** Include the **natural_language_query** parameter to expand the scope of "! the document similarity search with the natural language query. Other query "! parameters, such as **filter** and **query**, are subsequently applied and "! reduce the scope. - "! @parameter I_similar_fields | + "! @parameter I_SIMILAR_FIELDS | "! A comma-separated list of field names that are used as a basis for comparison to "! identify similar documents. If not specified, the entire document is used for "! comparison. "! @parameter E_RESPONSE | "! Service return value of type T_QUERY_NOTICES_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods FEDERATED_QUERY_NOTICES importing - !I_environment_id type STRING - !I_collection_ids type TT_STRING - !I_filter type STRING optional - !I_query type STRING optional - !I_natural_language_query type STRING optional - !I_aggregation type STRING optional - !I_count type INTEGER optional - !I_return type TT_STRING optional - !I_offset type INTEGER optional - !I_sort type TT_STRING optional - !I_highlight type BOOLEAN default c_boolean_false - !I_deduplicate_field type STRING optional - !I_similar type BOOLEAN default c_boolean_false - !I_similar_document_ids type TT_STRING optional - !I_similar_fields type TT_STRING optional + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_IDS type TT_STRING + !I_FILTER type STRING optional + !I_QUERY type STRING optional + !I_NATURAL_LANGUAGE_QUERY type STRING optional + !I_AGGREGATION type STRING optional + !I_COUNT type INTEGER optional + !I_RETURN type TT_STRING optional + !I_OFFSET type INTEGER optional + !I_SORT type TT_STRING optional + !I_HIGHLIGHT type BOOLEAN default c_boolean_false + !I_DEDUPLICATE_FIELD type STRING optional + !I_SIMILAR type BOOLEAN default c_boolean_false + !I_SIMILAR_DOCUMENT_IDS type TT_STRING optional + !I_SIMILAR_FIELDS type TT_STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_QUERY_NOTICES_RESPONSE @@ -2223,29 +3203,30 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get Autocomplete Suggestions. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_field | - "! The field in the result documents that autocompletion suggestions are identified - "! from. - "! @parameter I_prefix | + "! @parameter I_PREFIX | "! The prefix to use for autocompletion. For example, the prefix `Ho` could "! autocomplete to `Hot`, `Housing`, or `How do I upgrade`. Possible completions "! are. - "! @parameter I_count | + "! @parameter I_FIELD | + "! The field in the result documents that autocompletion suggestions are identified + "! from. + "! @parameter I_COUNT | "! The number of autocompletion suggestions to return. "! @parameter E_RESPONSE | "! Service return value of type T_COMPLETIONS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_AUTOCOMPLETION importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_field type STRING optional - !I_prefix type STRING optional - !I_count type INTEGER optional + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_PREFIX type STRING + !I_FIELD type STRING optional + !I_COUNT type INTEGER optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_COMPLETIONS @@ -2254,17 +3235,18 @@ constants: "! List training data. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. "! @parameter E_RESPONSE | "! Service return value of type T_TRAINING_DATA_SET + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_TRAINING_DATA importing - !I_environment_id type STRING - !I_collection_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TRAINING_DATA_SET @@ -2272,21 +3254,22 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Add query to training data. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_body | + "! @parameter I_BODY | "! The body of the training data query that is to be added to the collection's "! training data. "! @parameter E_RESPONSE | "! Service return value of type T_TRAINING_QUERY + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ADD_TRAINING_DATA importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_body type T_NEW_TRAINING_QUERY + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_BODY type T_NEW_TRAINING_QUERY !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2295,33 +3278,35 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete all training data. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_ALL_TRAINING_DATA importing - !I_environment_id type STRING - !I_collection_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "! Get details about a query. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_query_id | + "! @parameter I_QUERY_ID | "! The ID of the query used for training. "! @parameter E_RESPONSE | "! Service return value of type T_TRAINING_QUERY + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_TRAINING_DATA importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_query_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_QUERY_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TRAINING_QUERY @@ -2329,36 +3314,38 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a training data query. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_query_id | + "! @parameter I_QUERY_ID | "! The ID of the query used for training. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_TRAINING_DATA importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_query_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_QUERY_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "! List examples for a training data query. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_query_id | + "! @parameter I_QUERY_ID | "! The ID of the query used for training. "! @parameter E_RESPONSE | "! Service return value of type T_TRAINING_EXAMPLE_LIST + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_TRAINING_EXAMPLES importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_query_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_QUERY_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TRAINING_EXAMPLE_LIST @@ -2366,23 +3353,24 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Add example to training data query. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_query_id | + "! @parameter I_QUERY_ID | "! The ID of the query used for training. - "! @parameter I_body | + "! @parameter I_BODY | "! The body of the example that is to be added to the specified query. "! @parameter E_RESPONSE | "! Service return value of type T_TRAINING_EXAMPLE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_TRAINING_EXAMPLE importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_query_id type STRING - !I_body type T_TRAINING_EXAMPLE + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_QUERY_ID type STRING + !I_BODY type T_TRAINING_EXAMPLE !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2391,45 +3379,47 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete example for training data query. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_query_id | + "! @parameter I_QUERY_ID | "! The ID of the query used for training. - "! @parameter I_example_id | + "! @parameter I_EXAMPLE_ID | "! The ID of the document as it is indexed. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_TRAINING_EXAMPLE importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_query_id type STRING - !I_example_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_QUERY_ID type STRING + !I_EXAMPLE_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "! Change label or cross reference for example. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_query_id | + "! @parameter I_QUERY_ID | "! The ID of the query used for training. - "! @parameter I_example_id | + "! @parameter I_EXAMPLE_ID | "! The ID of the document as it is indexed. - "! @parameter I_body | + "! @parameter I_BODY | "! The body of the example that is to be added to the specified query. "! @parameter E_RESPONSE | "! Service return value of type T_TRAINING_EXAMPLE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_TRAINING_EXAMPLE importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_query_id type STRING - !I_example_id type STRING - !I_body type T_TRAINING_EXAMPLE_PATCH + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_QUERY_ID type STRING + !I_EXAMPLE_ID type STRING + !I_BODY type T_TRAINING_EXAMPLE_PATCH !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2438,23 +3428,24 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get details for training data example. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The ID of the collection. - "! @parameter I_query_id | + "! @parameter I_QUERY_ID | "! The ID of the query used for training. - "! @parameter I_example_id | + "! @parameter I_EXAMPLE_ID | "! The ID of the document as it is indexed. "! @parameter E_RESPONSE | "! Service return value of type T_TRAINING_EXAMPLE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_TRAINING_EXAMPLE importing - !I_environment_id type STRING - !I_collection_id type STRING - !I_query_id type STRING - !I_example_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_COLLECTION_ID type STRING + !I_QUERY_ID type STRING + !I_EXAMPLE_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TRAINING_EXAMPLE @@ -2463,25 +3454,27 @@ constants: "! Delete labeled data. "! - "! @parameter I_customer_id | + "! @parameter I_CUSTOMER_ID | "! The customer ID for which all data is to be deleted. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_USER_DATA importing - !I_customer_id type STRING + !I_CUSTOMER_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "! Create event. "! - "! @parameter I_query_event | + "! @parameter I_QUERY_EVENT | "! An object that defines a query event to be added to the log. "! @parameter E_RESPONSE | "! Service return value of type T_CREATE_EVENT_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_EVENT importing - !I_query_event type T_CREATE_EVENT_OBJECT + !I_QUERY_EVENT type T_CREATE_EVENT_OBJECT !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2490,36 +3483,37 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Search the query and event log. "! - "! @parameter I_filter | + "! @parameter I_FILTER | "! A cacheable query that excludes documents that don't mention the query content. "! Filter searches are better for metadata-type searches and for assessing the "! concepts in the data set. - "! @parameter I_query | + "! @parameter I_QUERY | "! A query search returns all documents in your data set with full enrichments and "! full text, but with the most relevant documents listed first. - "! @parameter I_count | + "! @parameter I_COUNT | "! Number of results to return. The maximum for the **count** and **offset** values "! together in any one query is **10000**. - "! @parameter I_offset | + "! @parameter I_OFFSET | "! The number of query results to skip at the beginning. For example, if the total "! number of results that are returned is 10 and the offset is 8, it returns the "! last two results. The maximum for the **count** and **offset** values together "! in any one query is **10000**. - "! @parameter I_sort | + "! @parameter I_SORT | "! A comma-separated list of fields in the document to sort on. You can optionally "! specify a sort direction by prefixing the field with `-` for descending or `+` "! for ascending. Ascending is the default sort direction if no prefix is "! specified. "! @parameter E_RESPONSE | "! Service return value of type T_LOG_QUERY_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods QUERY_LOG importing - !I_filter type STRING optional - !I_query type STRING optional - !I_count type INTEGER optional - !I_offset type INTEGER optional - !I_sort type TT_STRING optional + !I_FILTER type STRING optional + !I_QUERY type STRING optional + !I_COUNT type INTEGER optional + !I_OFFSET type INTEGER optional + !I_SORT type TT_STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_LOG_QUERY_RESPONSE @@ -2527,22 +3521,23 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Number of queries over time. "! - "! @parameter I_start_time | + "! @parameter I_START_TIME | "! Metric is computed from data recorded after this timestamp; must be in "! `YYYY-MM-DDThh:mm:ssZ` format. - "! @parameter I_end_time | + "! @parameter I_END_TIME | "! Metric is computed from data recorded before this timestamp; must be in "! `YYYY-MM-DDThh:mm:ssZ` format. - "! @parameter I_result_type | + "! @parameter I_RESULT_TYPE | "! The type of result to consider when calculating the metric. "! @parameter E_RESPONSE | "! Service return value of type T_METRIC_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_METRICS_QUERY importing - !I_start_time type DATETIME optional - !I_end_time type DATETIME optional - !I_result_type type STRING optional + !I_START_TIME type DATETIME optional + !I_END_TIME type DATETIME optional + !I_RESULT_TYPE type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_METRIC_RESPONSE @@ -2550,22 +3545,23 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Number of queries with an event over time. "! - "! @parameter I_start_time | + "! @parameter I_START_TIME | "! Metric is computed from data recorded after this timestamp; must be in "! `YYYY-MM-DDThh:mm:ssZ` format. - "! @parameter I_end_time | + "! @parameter I_END_TIME | "! Metric is computed from data recorded before this timestamp; must be in "! `YYYY-MM-DDThh:mm:ssZ` format. - "! @parameter I_result_type | + "! @parameter I_RESULT_TYPE | "! The type of result to consider when calculating the metric. "! @parameter E_RESPONSE | "! Service return value of type T_METRIC_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_METRICS_QUERY_EVENT importing - !I_start_time type DATETIME optional - !I_end_time type DATETIME optional - !I_result_type type STRING optional + !I_START_TIME type DATETIME optional + !I_END_TIME type DATETIME optional + !I_RESULT_TYPE type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_METRIC_RESPONSE @@ -2573,22 +3569,23 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Number of queries with no search results over time. "! - "! @parameter I_start_time | + "! @parameter I_START_TIME | "! Metric is computed from data recorded after this timestamp; must be in "! `YYYY-MM-DDThh:mm:ssZ` format. - "! @parameter I_end_time | + "! @parameter I_END_TIME | "! Metric is computed from data recorded before this timestamp; must be in "! `YYYY-MM-DDThh:mm:ssZ` format. - "! @parameter I_result_type | + "! @parameter I_RESULT_TYPE | "! The type of result to consider when calculating the metric. "! @parameter E_RESPONSE | "! Service return value of type T_METRIC_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_METRICS_QUERY_NO_RESULTS importing - !I_start_time type DATETIME optional - !I_end_time type DATETIME optional - !I_result_type type STRING optional + !I_START_TIME type DATETIME optional + !I_END_TIME type DATETIME optional + !I_RESULT_TYPE type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_METRIC_RESPONSE @@ -2596,22 +3593,23 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Percentage of queries with an associated event. "! - "! @parameter I_start_time | + "! @parameter I_START_TIME | "! Metric is computed from data recorded after this timestamp; must be in "! `YYYY-MM-DDThh:mm:ssZ` format. - "! @parameter I_end_time | + "! @parameter I_END_TIME | "! Metric is computed from data recorded before this timestamp; must be in "! `YYYY-MM-DDThh:mm:ssZ` format. - "! @parameter I_result_type | + "! @parameter I_RESULT_TYPE | "! The type of result to consider when calculating the metric. "! @parameter E_RESPONSE | "! Service return value of type T_METRIC_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_METRICS_EVENT_RATE importing - !I_start_time type DATETIME optional - !I_end_time type DATETIME optional - !I_result_type type STRING optional + !I_START_TIME type DATETIME optional + !I_END_TIME type DATETIME optional + !I_RESULT_TYPE type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_METRIC_RESPONSE @@ -2619,15 +3617,16 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Most frequent query tokens with an event. "! - "! @parameter I_count | + "! @parameter I_COUNT | "! Number of results to return. The maximum for the **count** and **offset** values "! together in any one query is **10000**. "! @parameter E_RESPONSE | "! Service return value of type T_METRIC_TOKEN_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_METRICS_QUERY_TOKEN_EVENT importing - !I_count type INTEGER optional + !I_COUNT type INTEGER optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_METRIC_TOKEN_RESPONSE @@ -2636,14 +3635,15 @@ constants: "! List credentials. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. "! @parameter E_RESPONSE | "! Service return value of type T_CREDENTIALS_LIST + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_CREDENTIALS importing - !I_environment_id type STRING + !I_ENVIRONMENT_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_CREDENTIALS_LIST @@ -2651,17 +3651,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create credentials. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_credentials_parameter | + "! @parameter I_CREDENTIALS_PARAMETER | "! An object that defines an individual set of source credentials. "! @parameter E_RESPONSE | "! Service return value of type T_CREDENTIALS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_CREDENTIALS importing - !I_environment_id type STRING - !I_credentials_parameter type T_CREDENTIALS + !I_ENVIRONMENT_ID type STRING + !I_CREDENTIALS_PARAMETER type T_CREDENTIALS !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2670,17 +3671,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! View Credentials. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_credential_id | + "! @parameter I_CREDENTIAL_ID | "! The unique identifier for a set of source credentials. "! @parameter E_RESPONSE | "! Service return value of type T_CREDENTIALS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_CREDENTIALS importing - !I_environment_id type STRING - !I_credential_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_CREDENTIAL_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_CREDENTIALS @@ -2688,20 +3690,21 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update credentials. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_credential_id | + "! @parameter I_CREDENTIAL_ID | "! The unique identifier for a set of source credentials. - "! @parameter I_credentials_parameter | + "! @parameter I_CREDENTIALS_PARAMETER | "! An object that defines an individual set of source credentials. "! @parameter E_RESPONSE | "! Service return value of type T_CREDENTIALS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_CREDENTIALS importing - !I_environment_id type STRING - !I_credential_id type STRING - !I_credentials_parameter type T_CREDENTIALS + !I_ENVIRONMENT_ID type STRING + !I_CREDENTIAL_ID type STRING + !I_CREDENTIALS_PARAMETER type T_CREDENTIALS !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2710,17 +3713,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete credentials. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_credential_id | + "! @parameter I_CREDENTIAL_ID | "! The unique identifier for a set of source credentials. "! @parameter E_RESPONSE | "! Service return value of type T_DELETE_CREDENTIALS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_CREDENTIALS importing - !I_environment_id type STRING - !I_credential_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_CREDENTIAL_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_DELETE_CREDENTIALS @@ -2729,14 +3733,15 @@ constants: "! List Gateways. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. "! @parameter E_RESPONSE | "! Service return value of type T_GATEWAY_LIST + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_GATEWAYS importing - !I_environment_id type STRING + !I_ENVIRONMENT_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_GATEWAY_LIST @@ -2744,17 +3749,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create Gateway. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_gateway_name | + "! @parameter I_GATEWAY_NAME | "! The name of the gateway to created. "! @parameter E_RESPONSE | "! Service return value of type T_GATEWAY + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_GATEWAY importing - !I_environment_id type STRING - !I_gateway_name type T_GATEWAY_NAME optional + !I_ENVIRONMENT_ID type STRING + !I_GATEWAY_NAME type T_GATEWAY_NAME optional !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -2763,17 +3769,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! List Gateway Details. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_gateway_id | + "! @parameter I_GATEWAY_ID | "! The requested gateway ID. "! @parameter E_RESPONSE | "! Service return value of type T_GATEWAY + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_GATEWAY importing - !I_environment_id type STRING - !I_gateway_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_GATEWAY_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_GATEWAY @@ -2781,17 +3788,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete Gateway. "! - "! @parameter I_environment_id | + "! @parameter I_ENVIRONMENT_ID | "! The ID of the environment. - "! @parameter I_gateway_id | + "! @parameter I_GATEWAY_ID | "! The requested gateway ID. "! @parameter E_RESPONSE | "! Service return value of type T_GATEWAY_DELETE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_GATEWAY importing - !I_environment_id type STRING - !I_gateway_id type STRING + !I_ENVIRONMENT_ID type STRING + !I_GATEWAY_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_GATEWAY_DELETE @@ -2834,7 +3842,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -2875,7 +3883,7 @@ endmethod. * +--------------------------------------------------------------------------------------
method get_sdk_version_date. - e_sdk_version_date = '20191002122840'. + e_sdk_version_date = '20200210092816'. endmethod. @@ -2884,7 +3892,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->CREATE_ENVIRONMENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_body TYPE T_CREATE_ENVIRONMENT_REQUEST +* | [--->] I_BODY TYPE T_CREATE_ENVIRONMENT_REQUEST * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ENVIRONMENT @@ -2921,20 +3929,20 @@ method CREATE_ENVIRONMENT. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -2968,7 +3976,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->LIST_ENVIRONMENTS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_name TYPE STRING(optional) +* | [--->] I_NAME TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_LIST_ENVIRONMENTS_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2994,8 +4002,8 @@ method LIST_ENVIRONMENTS. data: lv_queryparam type string. - if i_name is supplied. - lv_queryparam = escape( val = i_name format = cl_abap_format=>e_uri_full ). + if i_NAME is supplied. + lv_queryparam = escape( val = i_NAME format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `name` @@ -3027,7 +4035,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_ENVIRONMENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ENVIRONMENT * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3042,7 +4050,7 @@ method GET_ENVIRONMENT. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3075,8 +4083,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->UPDATE_ENVIRONMENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_body TYPE T_UPDATE_ENVIRONMENT_REQUEST +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_BODY TYPE T_UPDATE_ENVIRONMENT_REQUEST * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ENVIRONMENT @@ -3092,7 +4100,7 @@ method UPDATE_ENVIRONMENT. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3114,20 +4122,20 @@ method UPDATE_ENVIRONMENT. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3161,7 +4169,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_ENVIRONMENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DELETE_ENVIRONMENT_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3176,7 +4184,7 @@ method DELETE_ENVIRONMENT. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3209,8 +4217,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->LIST_FIELDS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_ids TYPE TT_STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_IDS TYPE TT_STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_LST_COLLECTION_FIELDS_RESP * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3225,7 +4233,7 @@ method LIST_FIELDS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/fields'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3238,10 +4246,10 @@ method LIST_FIELDS. lv_queryparam type string. data: - lv_item_collection_ids type STRING. + lv_item_COLLECTION_IDS type STRING. clear: lv_queryparam, lv_sep. - loop at i_collection_ids into lv_item_collection_ids. - lv_queryparam = lv_queryparam && lv_sep && lv_item_collection_ids. + loop at i_COLLECTION_IDS into lv_item_COLLECTION_IDS. + lv_queryparam = lv_queryparam && lv_sep && lv_item_COLLECTION_IDS. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -3276,8 +4284,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->CREATE_CONFIGURATION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_configuration TYPE T_CONFIGURATION +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_CONFIGURATION TYPE T_CONFIGURATION * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CONFIGURATION @@ -3293,7 +4301,7 @@ method CREATE_CONFIGURATION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/configurations'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3315,20 +4323,20 @@ method CREATE_CONFIGURATION. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_configuration ). + lv_datatype = get_datatype( i_CONFIGURATION ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_configuration i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_CONFIGURATION i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'configuration' i_value = i_configuration ). + lv_bodyparam = abap_to_json( i_name = 'configuration' i_value = i_CONFIGURATION ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_configuration to . + assign i_CONFIGURATION to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3362,8 +4370,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->LIST_CONFIGURATIONS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_name TYPE STRING(optional) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_NAME TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_LIST_CONFIGURATIONS_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3378,7 +4386,7 @@ method LIST_CONFIGURATIONS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/configurations'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3390,8 +4398,8 @@ method LIST_CONFIGURATIONS. data: lv_queryparam type string. - if i_name is supplied. - lv_queryparam = escape( val = i_name format = cl_abap_format=>e_uri_full ). + if i_NAME is supplied. + lv_queryparam = escape( val = i_NAME format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `name` @@ -3423,8 +4431,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_CONFIGURATION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_configuration_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_CONFIGURATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CONFIGURATION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3439,8 +4447,8 @@ method GET_CONFIGURATION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/configurations/{configuration_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{configuration_id}` in ls_request_prop-url-path with i_configuration_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{configuration_id}` in ls_request_prop-url-path with i_CONFIGURATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3473,9 +4481,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->UPDATE_CONFIGURATION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_configuration_id TYPE STRING -* | [--->] I_configuration TYPE T_CONFIGURATION +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_CONFIGURATION_ID TYPE STRING +* | [--->] I_CONFIGURATION TYPE T_CONFIGURATION * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CONFIGURATION @@ -3491,8 +4499,8 @@ method UPDATE_CONFIGURATION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/configurations/{configuration_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{configuration_id}` in ls_request_prop-url-path with i_configuration_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{configuration_id}` in ls_request_prop-url-path with i_CONFIGURATION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3514,20 +4522,20 @@ method UPDATE_CONFIGURATION. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_configuration ). + lv_datatype = get_datatype( i_CONFIGURATION ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_configuration i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_CONFIGURATION i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'configuration' i_value = i_configuration ). + lv_bodyparam = abap_to_json( i_name = 'configuration' i_value = i_CONFIGURATION ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_configuration to . + assign i_CONFIGURATION to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3561,8 +4569,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_CONFIGURATION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_configuration_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_CONFIGURATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DEL_CONFIGURATION_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3577,8 +4585,8 @@ method DELETE_CONFIGURATION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/configurations/{configuration_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{configuration_id}` in ls_request_prop-url-path with i_configuration_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{configuration_id}` in ls_request_prop-url-path with i_CONFIGURATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3612,8 +4620,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->CREATE_COLLECTION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_body TYPE T_CREATE_COLLECTION_REQUEST +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_BODY TYPE T_CREATE_COLLECTION_REQUEST * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COLLECTION @@ -3629,7 +4637,7 @@ method CREATE_COLLECTION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3651,20 +4659,20 @@ method CREATE_COLLECTION. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3698,8 +4706,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->LIST_COLLECTIONS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_name TYPE STRING(optional) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_NAME TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_LIST_COLLECTIONS_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3714,7 +4722,7 @@ method LIST_COLLECTIONS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3726,8 +4734,8 @@ method LIST_COLLECTIONS. data: lv_queryparam type string. - if i_name is supplied. - lv_queryparam = escape( val = i_name format = cl_abap_format=>e_uri_full ). + if i_NAME is supplied. + lv_queryparam = escape( val = i_NAME format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `name` @@ -3759,8 +4767,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_COLLECTION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3775,8 +4783,8 @@ method GET_COLLECTION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3809,9 +4817,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->UPDATE_COLLECTION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_body TYPE T_UPDATE_COLLECTION_REQUEST(optional) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_BODY TYPE T_UPDATE_COLLECTION_REQUEST * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COLLECTION @@ -3827,8 +4835,8 @@ method UPDATE_COLLECTION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3850,25 +4858,23 @@ method UPDATE_COLLECTION. field-symbols: type any. lv_separator = ''. - if not i_body is initial. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. - endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. lv_body = `{` && lv_body && `}`. endif. @@ -3899,8 +4905,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_COLLECTION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DELETE_COLLECTION_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3915,8 +4921,8 @@ method DELETE_COLLECTION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3949,8 +4955,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->LIST_COLLECTION_FIELDS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_LST_COLLECTION_FIELDS_RESP * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3965,8 +4971,8 @@ method LIST_COLLECTION_FIELDS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/fields'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4000,8 +5006,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->LIST_EXPANSIONS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_EXPANSIONS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4016,8 +5022,8 @@ method LIST_EXPANSIONS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/expansions'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4050,9 +5056,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->CREATE_EXPANSIONS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_body TYPE T_EXPANSIONS +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_BODY TYPE T_EXPANSIONS * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_EXPANSIONS @@ -4068,8 +5074,8 @@ method CREATE_EXPANSIONS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/expansions'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -4091,20 +5097,20 @@ method CREATE_EXPANSIONS. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -4138,8 +5144,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_EXPANSIONS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_EXPANSIONS. @@ -4152,8 +5158,8 @@ method DELETE_EXPANSIONS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/expansions'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers set_default_query_parameters( @@ -4177,8 +5183,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_TOKENIZATION_DICT_STATUS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TOKEN_DICT_STATUS_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4193,8 +5199,8 @@ method GET_TOKENIZATION_DICT_STATUS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4227,9 +5233,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->CREATE_TOKENIZATION_DICTIONARY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_tokenization_dictionary TYPE T_TOKEN_DICT(optional) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_TOKENIZATION_DICTIONARY TYPE T_TOKEN_DICT(optional) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TOKEN_DICT_STATUS_RESPONSE @@ -4245,8 +5251,8 @@ method CREATE_TOKENIZATION_DICTIONARY. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -4268,21 +5274,21 @@ method CREATE_TOKENIZATION_DICTIONARY. field-symbols: type any. lv_separator = ''. - if not i_tokenization_dictionary is initial. - lv_datatype = get_datatype( i_tokenization_dictionary ). + if not i_TOKENIZATION_DICTIONARY is initial. + lv_datatype = get_datatype( i_TOKENIZATION_DICTIONARY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_tokenization_dictionary i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_TOKENIZATION_DICTIONARY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'tokenization_dictionary' i_value = i_tokenization_dictionary ). + lv_bodyparam = abap_to_json( i_name = 'tokenization_dictionary' i_value = i_TOKENIZATION_DICTIONARY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_tokenization_dictionary to . + assign i_TOKENIZATION_DICTIONARY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -4317,8 +5323,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_TOKENIZATION_DICTIONARY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_TOKENIZATION_DICTIONARY. @@ -4331,8 +5337,8 @@ method DELETE_TOKENIZATION_DICTIONARY. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers set_default_query_parameters( @@ -4356,8 +5362,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_STOPWORD_LIST_STATUS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TOKEN_DICT_STATUS_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4372,8 +5378,8 @@ method GET_STOPWORD_LIST_STATUS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4406,11 +5412,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->CREATE_STOPWORD_LIST * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_stopword_file TYPE FILE -* | [--->] I_stopword_filename TYPE STRING -* | [--->] I_stopword_file_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_STOPWORD_FILE TYPE FILE +* | [--->] I_STOPWORD_FILENAME TYPE STRING +* | [--->] I_STOPWORD_FILE_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TOKEN_DICT_STATUS_RESPONSE @@ -4426,8 +5432,8 @@ method CREATE_STOPWORD_LIST. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -4454,18 +5460,18 @@ method CREATE_STOPWORD_LIST. - if not i_stopword_file is initial. + if not i_STOPWORD_FILE is initial. if not I_stopword_filename is initial. lv_value = `form-data; name="stopword_file"; filename="` && I_stopword_filename && `"` ##NO_TEXT. else. - lv_extension = get_file_extension( I_stopword_file_CT ). + lv_extension = get_file_extension( I_STOPWORD_FILE_CT ). lv_value = `form-data; name="stopword_file"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. endif. lv_index = lv_index + 1. clear ls_form_part. - ls_form_part-content_type = I_stopword_file_CT. + ls_form_part-content_type = I_STOPWORD_FILE_CT. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_stopword_file. + ls_form_part-xdata = i_STOPWORD_FILE. append ls_form_part to lt_form_part. endif. @@ -4490,8 +5496,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_STOPWORD_LIST * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_STOPWORD_LIST. @@ -4504,8 +5510,8 @@ method DELETE_STOPWORD_LIST. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers set_default_query_parameters( @@ -4530,12 +5536,12 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->ADD_DOCUMENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_file TYPE FILE(optional) -* | [--->] I_filename TYPE STRING(optional) -* | [--->] I_file_content_type TYPE STRING(optional) -* | [--->] I_metadata TYPE STRING(optional) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_FILE TYPE FILE(optional) +* | [--->] I_FILENAME TYPE STRING(optional) +* | [--->] I_FILE_CONTENT_TYPE TYPE STRING(optional) +* | [--->] I_METADATA TYPE STRING(optional) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DOCUMENT_ACCEPTED @@ -4551,8 +5557,8 @@ method ADD_DOCUMENT. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/documents'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -4577,18 +5583,18 @@ method ADD_DOCUMENT. lv_extension type string ##NEEDED. - if not i_metadata is initial. + if not i_METADATA is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="metadata"' ##NO_TEXT. - lv_formdata = i_metadata. + lv_formdata = i_METADATA. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_file is initial. + if not i_FILE is initial. if not I_filename is initial. lv_value = `form-data; name="file"; filename="` && I_filename && `"` ##NO_TEXT. else. @@ -4599,7 +5605,7 @@ method ADD_DOCUMENT. clear ls_form_part. ls_form_part-content_type = I_file_content_type. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_file. + ls_form_part-xdata = i_FILE. append ls_form_part to lt_form_part. endif. @@ -4624,9 +5630,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_DOCUMENT_STATUS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_document_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_DOCUMENT_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DOCUMENT_STATUS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4641,9 +5647,9 @@ method GET_DOCUMENT_STATUS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{document_id}` in ls_request_prop-url-path with i_document_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{document_id}` in ls_request_prop-url-path with i_DOCUMENT_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4676,13 +5682,13 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->UPDATE_DOCUMENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_document_id TYPE STRING -* | [--->] I_file TYPE FILE(optional) -* | [--->] I_filename TYPE STRING(optional) -* | [--->] I_file_content_type TYPE STRING(optional) -* | [--->] I_metadata TYPE STRING(optional) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_DOCUMENT_ID TYPE STRING +* | [--->] I_FILE TYPE FILE(optional) +* | [--->] I_FILENAME TYPE STRING(optional) +* | [--->] I_FILE_CONTENT_TYPE TYPE STRING(optional) +* | [--->] I_METADATA TYPE STRING(optional) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DOCUMENT_ACCEPTED @@ -4698,9 +5704,9 @@ method UPDATE_DOCUMENT. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{document_id}` in ls_request_prop-url-path with i_document_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{document_id}` in ls_request_prop-url-path with i_DOCUMENT_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -4725,18 +5731,18 @@ method UPDATE_DOCUMENT. lv_extension type string ##NEEDED. - if not i_metadata is initial. + if not i_METADATA is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="metadata"' ##NO_TEXT. - lv_formdata = i_metadata. + lv_formdata = i_METADATA. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_file is initial. + if not i_FILE is initial. if not I_filename is initial. lv_value = `form-data; name="file"; filename="` && I_filename && `"` ##NO_TEXT. else. @@ -4747,7 +5753,7 @@ method UPDATE_DOCUMENT. clear ls_form_part. ls_form_part-content_type = I_file_content_type. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_file. + ls_form_part-xdata = i_FILE. append ls_form_part to lt_form_part. endif. @@ -4772,9 +5778,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_DOCUMENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_document_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_DOCUMENT_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DELETE_DOCUMENT_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4789,9 +5795,9 @@ method DELETE_DOCUMENT. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{document_id}` in ls_request_prop-url-path with i_document_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{document_id}` in ls_request_prop-url-path with i_DOCUMENT_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4825,10 +5831,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->QUERY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_query_long TYPE T_COLL_QUERY_LARGE(optional) -* | [--->] I_X_Watson_Logging_Opt_Out TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_QUERY_LONG TYPE T_COLL_QUERY_LARGE(optional) +* | [--->] I_X_WATSON_LOGGING_OPT_OUT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_QUERY_RESPONSE @@ -4844,8 +5850,8 @@ method QUERY. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/query'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -4860,8 +5866,8 @@ method QUERY. data: lv_headerparam type string ##NEEDED. - if i_X_Watson_Logging_Opt_Out is supplied. - lv_headerparam = I_X_Watson_Logging_Opt_Out. + if i_X_WATSON_LOGGING_OPT_OUT is supplied. + lv_headerparam = I_X_WATSON_LOGGING_OPT_OUT. add_header_parameter( exporting i_parameter = 'X-Watson-Logging-Opt-Out' @@ -4881,21 +5887,21 @@ method QUERY. field-symbols: type any. lv_separator = ''. - if not i_query_long is initial. - lv_datatype = get_datatype( i_query_long ). + if not i_QUERY_LONG is initial. + lv_datatype = get_datatype( i_QUERY_LONG ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_query_long i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_QUERY_LONG i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'query_long' i_value = i_query_long ). + lv_bodyparam = abap_to_json( i_name = 'query_long' i_value = i_QUERY_LONG ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_query_long to . + assign i_QUERY_LONG to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -4930,25 +5936,25 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->QUERY_NOTICES * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_filter TYPE STRING(optional) -* | [--->] I_query TYPE STRING(optional) -* | [--->] I_natural_language_query TYPE STRING(optional) -* | [--->] I_passages TYPE BOOLEAN(optional) -* | [--->] I_aggregation TYPE STRING(optional) -* | [--->] I_count TYPE INTEGER(optional) -* | [--->] I_return TYPE TT_STRING(optional) -* | [--->] I_offset TYPE INTEGER(optional) -* | [--->] I_sort TYPE TT_STRING(optional) -* | [--->] I_highlight TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_passages_fields TYPE TT_STRING(optional) -* | [--->] I_passages_count TYPE INTEGER(optional) -* | [--->] I_passages_characters TYPE INTEGER(optional) -* | [--->] I_deduplicate_field TYPE STRING(optional) -* | [--->] I_similar TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_similar_document_ids TYPE TT_STRING(optional) -* | [--->] I_similar_fields TYPE TT_STRING(optional) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_FILTER TYPE STRING(optional) +* | [--->] I_QUERY TYPE STRING(optional) +* | [--->] I_NATURAL_LANGUAGE_QUERY TYPE STRING(optional) +* | [--->] I_PASSAGES TYPE BOOLEAN(optional) +* | [--->] I_AGGREGATION TYPE STRING(optional) +* | [--->] I_COUNT TYPE INTEGER(optional) +* | [--->] I_RETURN TYPE TT_STRING(optional) +* | [--->] I_OFFSET TYPE INTEGER(optional) +* | [--->] I_SORT TYPE TT_STRING(optional) +* | [--->] I_HIGHLIGHT TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_PASSAGES_FIELDS TYPE TT_STRING(optional) +* | [--->] I_PASSAGES_COUNT TYPE INTEGER(optional) +* | [--->] I_PASSAGES_CHARACTERS TYPE INTEGER(optional) +* | [--->] I_DEDUPLICATE_FIELD TYPE STRING(optional) +* | [--->] I_SIMILAR TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_SIMILAR_DOCUMENT_IDS TYPE TT_STRING(optional) +* | [--->] I_SIMILAR_FIELDS TYPE TT_STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_QUERY_NOTICES_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4963,8 +5969,8 @@ method QUERY_NOTICES. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/notices'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4976,8 +5982,8 @@ method QUERY_NOTICES. data: lv_queryparam type string. - if i_filter is supplied. - lv_queryparam = escape( val = i_filter format = cl_abap_format=>e_uri_full ). + if i_FILTER is supplied. + lv_queryparam = escape( val = i_FILTER format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `filter` @@ -4986,8 +5992,8 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_query is supplied. - lv_queryparam = escape( val = i_query format = cl_abap_format=>e_uri_full ). + if i_QUERY is supplied. + lv_queryparam = escape( val = i_QUERY format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `query` @@ -4996,8 +6002,8 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_natural_language_query is supplied. - lv_queryparam = escape( val = i_natural_language_query format = cl_abap_format=>e_uri_full ). + if i_NATURAL_LANGUAGE_QUERY is supplied. + lv_queryparam = escape( val = i_NATURAL_LANGUAGE_QUERY format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `natural_language_query` @@ -5006,8 +6012,8 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_passages is supplied. - lv_queryparam = i_passages. + if i_PASSAGES is supplied. + lv_queryparam = i_PASSAGES. add_query_parameter( exporting i_parameter = `passages` @@ -5017,8 +6023,8 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_aggregation is supplied. - lv_queryparam = escape( val = i_aggregation format = cl_abap_format=>e_uri_full ). + if i_AGGREGATION is supplied. + lv_queryparam = escape( val = i_AGGREGATION format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `aggregation` @@ -5027,8 +6033,8 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_count is supplied. - lv_queryparam = i_count. + if i_COUNT is supplied. + lv_queryparam = i_COUNT. add_query_parameter( exporting i_parameter = `count` @@ -5037,12 +6043,12 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_return is supplied. + if i_RETURN is supplied. data: - lv_item_return type STRING. + lv_item_RETURN type STRING. clear: lv_queryparam, lv_sep. - loop at i_return into lv_item_return. - lv_queryparam = lv_queryparam && lv_sep && lv_item_return. + loop at i_RETURN into lv_item_RETURN. + lv_queryparam = lv_queryparam && lv_sep && lv_item_RETURN. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -5054,8 +6060,8 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_offset is supplied. - lv_queryparam = i_offset. + if i_OFFSET is supplied. + lv_queryparam = i_OFFSET. add_query_parameter( exporting i_parameter = `offset` @@ -5064,12 +6070,12 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. + if i_SORT is supplied. data: - lv_item_sort type STRING. + lv_item_SORT type STRING. clear: lv_queryparam, lv_sep. - loop at i_sort into lv_item_sort. - lv_queryparam = lv_queryparam && lv_sep && lv_item_sort. + loop at i_SORT into lv_item_SORT. + lv_queryparam = lv_queryparam && lv_sep && lv_item_SORT. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -5081,8 +6087,8 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_highlight is supplied. - lv_queryparam = i_highlight. + if i_HIGHLIGHT is supplied. + lv_queryparam = i_HIGHLIGHT. add_query_parameter( exporting i_parameter = `highlight` @@ -5092,12 +6098,12 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_passages_fields is supplied. + if i_PASSAGES_FIELDS is supplied. data: - lv_item_passages_fields type STRING. + lv_item_PASSAGES_FIELDS type STRING. clear: lv_queryparam, lv_sep. - loop at i_passages_fields into lv_item_passages_fields. - lv_queryparam = lv_queryparam && lv_sep && lv_item_passages_fields. + loop at i_PASSAGES_FIELDS into lv_item_PASSAGES_FIELDS. + lv_queryparam = lv_queryparam && lv_sep && lv_item_PASSAGES_FIELDS. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -5109,8 +6115,8 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_passages_count is supplied. - lv_queryparam = i_passages_count. + if i_PASSAGES_COUNT is supplied. + lv_queryparam = i_PASSAGES_COUNT. add_query_parameter( exporting i_parameter = `passages.count` @@ -5119,8 +6125,8 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_passages_characters is supplied. - lv_queryparam = i_passages_characters. + if i_PASSAGES_CHARACTERS is supplied. + lv_queryparam = i_PASSAGES_CHARACTERS. add_query_parameter( exporting i_parameter = `passages.characters` @@ -5129,8 +6135,8 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_deduplicate_field is supplied. - lv_queryparam = escape( val = i_deduplicate_field format = cl_abap_format=>e_uri_full ). + if i_DEDUPLICATE_FIELD is supplied. + lv_queryparam = escape( val = i_DEDUPLICATE_FIELD format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `deduplicate.field` @@ -5139,8 +6145,8 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_similar is supplied. - lv_queryparam = i_similar. + if i_SIMILAR is supplied. + lv_queryparam = i_SIMILAR. add_query_parameter( exporting i_parameter = `similar` @@ -5150,12 +6156,12 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_similar_document_ids is supplied. + if i_SIMILAR_DOCUMENT_IDS is supplied. data: - lv_item_similar_document_ids type STRING. + lv_item_SIMILAR_DOCUMENT_IDS type STRING. clear: lv_queryparam, lv_sep. - loop at i_similar_document_ids into lv_item_similar_document_ids. - lv_queryparam = lv_queryparam && lv_sep && lv_item_similar_document_ids. + loop at i_SIMILAR_DOCUMENT_IDS into lv_item_SIMILAR_DOCUMENT_IDS. + lv_queryparam = lv_queryparam && lv_sep && lv_item_SIMILAR_DOCUMENT_IDS. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -5167,12 +6173,12 @@ method QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_similar_fields is supplied. + if i_SIMILAR_FIELDS is supplied. data: - lv_item_similar_fields type STRING. + lv_item_SIMILAR_FIELDS type STRING. clear: lv_queryparam, lv_sep. - loop at i_similar_fields into lv_item_similar_fields. - lv_queryparam = lv_queryparam && lv_sep && lv_item_similar_fields. + loop at i_SIMILAR_FIELDS into lv_item_SIMILAR_FIELDS. + lv_queryparam = lv_queryparam && lv_sep && lv_item_SIMILAR_FIELDS. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -5207,9 +6213,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->FEDERATED_QUERY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_query_long TYPE T_FED_QUERY_LARGE(optional) -* | [--->] I_X_Watson_Logging_Opt_Out TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_QUERY_LONG TYPE T_FED_QUERY_LARGE +* | [--->] I_X_WATSON_LOGGING_OPT_OUT TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_QUERY_RESPONSE @@ -5225,7 +6231,7 @@ method FEDERATED_QUERY. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/query'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -5240,8 +6246,8 @@ method FEDERATED_QUERY. data: lv_headerparam type string ##NEEDED. - if i_X_Watson_Logging_Opt_Out is supplied. - lv_headerparam = I_X_Watson_Logging_Opt_Out. + if i_X_WATSON_LOGGING_OPT_OUT is supplied. + lv_headerparam = I_X_WATSON_LOGGING_OPT_OUT. add_header_parameter( exporting i_parameter = 'X-Watson-Logging-Opt-Out' @@ -5261,25 +6267,23 @@ method FEDERATED_QUERY. field-symbols: type any. lv_separator = ''. - if not i_query_long is initial. - lv_datatype = get_datatype( i_query_long ). + lv_datatype = get_datatype( i_QUERY_LONG ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_query_long i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_QUERY_LONG i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'query_long' i_value = i_query_long ). + lv_bodyparam = abap_to_json( i_name = 'query_long' i_value = i_QUERY_LONG ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_query_long to . + assign i_QUERY_LONG to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. - endif. if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. lv_body = `{` && lv_body && `}`. endif. @@ -5310,21 +6314,21 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->FEDERATED_QUERY_NOTICES * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_ids TYPE TT_STRING -* | [--->] I_filter TYPE STRING(optional) -* | [--->] I_query TYPE STRING(optional) -* | [--->] I_natural_language_query TYPE STRING(optional) -* | [--->] I_aggregation TYPE STRING(optional) -* | [--->] I_count TYPE INTEGER(optional) -* | [--->] I_return TYPE TT_STRING(optional) -* | [--->] I_offset TYPE INTEGER(optional) -* | [--->] I_sort TYPE TT_STRING(optional) -* | [--->] I_highlight TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_deduplicate_field TYPE STRING(optional) -* | [--->] I_similar TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_similar_document_ids TYPE TT_STRING(optional) -* | [--->] I_similar_fields TYPE TT_STRING(optional) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_IDS TYPE TT_STRING +* | [--->] I_FILTER TYPE STRING(optional) +* | [--->] I_QUERY TYPE STRING(optional) +* | [--->] I_NATURAL_LANGUAGE_QUERY TYPE STRING(optional) +* | [--->] I_AGGREGATION TYPE STRING(optional) +* | [--->] I_COUNT TYPE INTEGER(optional) +* | [--->] I_RETURN TYPE TT_STRING(optional) +* | [--->] I_OFFSET TYPE INTEGER(optional) +* | [--->] I_SORT TYPE TT_STRING(optional) +* | [--->] I_HIGHLIGHT TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_DEDUPLICATE_FIELD TYPE STRING(optional) +* | [--->] I_SIMILAR TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_SIMILAR_DOCUMENT_IDS TYPE TT_STRING(optional) +* | [--->] I_SIMILAR_FIELDS TYPE TT_STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_QUERY_NOTICES_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -5339,7 +6343,7 @@ method FEDERATED_QUERY_NOTICES. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/notices'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -5352,10 +6356,10 @@ method FEDERATED_QUERY_NOTICES. lv_queryparam type string. data: - lv_item_collection_ids type STRING. + lv_item_COLLECTION_IDS type STRING. clear: lv_queryparam, lv_sep. - loop at i_collection_ids into lv_item_collection_ids. - lv_queryparam = lv_queryparam && lv_sep && lv_item_collection_ids. + loop at i_COLLECTION_IDS into lv_item_COLLECTION_IDS. + lv_queryparam = lv_queryparam && lv_sep && lv_item_COLLECTION_IDS. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -5366,8 +6370,8 @@ method FEDERATED_QUERY_NOTICES. changing c_url = ls_request_prop-url ) ##NO_TEXT. - if i_filter is supplied. - lv_queryparam = escape( val = i_filter format = cl_abap_format=>e_uri_full ). + if i_FILTER is supplied. + lv_queryparam = escape( val = i_FILTER format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `filter` @@ -5376,8 +6380,8 @@ method FEDERATED_QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_query is supplied. - lv_queryparam = escape( val = i_query format = cl_abap_format=>e_uri_full ). + if i_QUERY is supplied. + lv_queryparam = escape( val = i_QUERY format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `query` @@ -5386,8 +6390,8 @@ method FEDERATED_QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_natural_language_query is supplied. - lv_queryparam = escape( val = i_natural_language_query format = cl_abap_format=>e_uri_full ). + if i_NATURAL_LANGUAGE_QUERY is supplied. + lv_queryparam = escape( val = i_NATURAL_LANGUAGE_QUERY format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `natural_language_query` @@ -5396,8 +6400,8 @@ method FEDERATED_QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_aggregation is supplied. - lv_queryparam = escape( val = i_aggregation format = cl_abap_format=>e_uri_full ). + if i_AGGREGATION is supplied. + lv_queryparam = escape( val = i_AGGREGATION format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `aggregation` @@ -5406,8 +6410,8 @@ method FEDERATED_QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_count is supplied. - lv_queryparam = i_count. + if i_COUNT is supplied. + lv_queryparam = i_COUNT. add_query_parameter( exporting i_parameter = `count` @@ -5416,12 +6420,12 @@ method FEDERATED_QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_return is supplied. + if i_RETURN is supplied. data: - lv_item_return type STRING. + lv_item_RETURN type STRING. clear: lv_queryparam, lv_sep. - loop at i_return into lv_item_return. - lv_queryparam = lv_queryparam && lv_sep && lv_item_return. + loop at i_RETURN into lv_item_RETURN. + lv_queryparam = lv_queryparam && lv_sep && lv_item_RETURN. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -5433,8 +6437,8 @@ method FEDERATED_QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_offset is supplied. - lv_queryparam = i_offset. + if i_OFFSET is supplied. + lv_queryparam = i_OFFSET. add_query_parameter( exporting i_parameter = `offset` @@ -5443,12 +6447,12 @@ method FEDERATED_QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. + if i_SORT is supplied. data: - lv_item_sort type STRING. + lv_item_SORT type STRING. clear: lv_queryparam, lv_sep. - loop at i_sort into lv_item_sort. - lv_queryparam = lv_queryparam && lv_sep && lv_item_sort. + loop at i_SORT into lv_item_SORT. + lv_queryparam = lv_queryparam && lv_sep && lv_item_SORT. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -5460,8 +6464,8 @@ method FEDERATED_QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_highlight is supplied. - lv_queryparam = i_highlight. + if i_HIGHLIGHT is supplied. + lv_queryparam = i_HIGHLIGHT. add_query_parameter( exporting i_parameter = `highlight` @@ -5471,8 +6475,8 @@ method FEDERATED_QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_deduplicate_field is supplied. - lv_queryparam = escape( val = i_deduplicate_field format = cl_abap_format=>e_uri_full ). + if i_DEDUPLICATE_FIELD is supplied. + lv_queryparam = escape( val = i_DEDUPLICATE_FIELD format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `deduplicate.field` @@ -5481,8 +6485,8 @@ method FEDERATED_QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_similar is supplied. - lv_queryparam = i_similar. + if i_SIMILAR is supplied. + lv_queryparam = i_SIMILAR. add_query_parameter( exporting i_parameter = `similar` @@ -5492,12 +6496,12 @@ method FEDERATED_QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_similar_document_ids is supplied. + if i_SIMILAR_DOCUMENT_IDS is supplied. data: - lv_item_similar_document_ids type STRING. + lv_item_SIMILAR_DOCUMENT_IDS type STRING. clear: lv_queryparam, lv_sep. - loop at i_similar_document_ids into lv_item_similar_document_ids. - lv_queryparam = lv_queryparam && lv_sep && lv_item_similar_document_ids. + loop at i_SIMILAR_DOCUMENT_IDS into lv_item_SIMILAR_DOCUMENT_IDS. + lv_queryparam = lv_queryparam && lv_sep && lv_item_SIMILAR_DOCUMENT_IDS. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -5509,12 +6513,12 @@ method FEDERATED_QUERY_NOTICES. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_similar_fields is supplied. + if i_SIMILAR_FIELDS is supplied. data: - lv_item_similar_fields type STRING. + lv_item_SIMILAR_FIELDS type STRING. clear: lv_queryparam, lv_sep. - loop at i_similar_fields into lv_item_similar_fields. - lv_queryparam = lv_queryparam && lv_sep && lv_item_similar_fields. + loop at i_SIMILAR_FIELDS into lv_item_SIMILAR_FIELDS. + lv_queryparam = lv_queryparam && lv_sep && lv_item_SIMILAR_FIELDS. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -5549,11 +6553,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_AUTOCOMPLETION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_field TYPE STRING(optional) -* | [--->] I_prefix TYPE STRING(optional) -* | [--->] I_count TYPE INTEGER(optional) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_PREFIX TYPE STRING +* | [--->] I_FIELD TYPE STRING(optional) +* | [--->] I_COUNT TYPE INTEGER(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COMPLETIONS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -5568,8 +6572,8 @@ method GET_AUTOCOMPLETION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/autocompletion'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -5581,28 +6585,26 @@ method GET_AUTOCOMPLETION. data: lv_queryparam type string. - if i_field is supplied. - lv_queryparam = escape( val = i_field format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_PREFIX format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting - i_parameter = `field` + i_parameter = `prefix` i_value = lv_queryparam changing c_url = ls_request_prop-url ) ##NO_TEXT. - endif. - if i_prefix is supplied. - lv_queryparam = escape( val = i_prefix format = cl_abap_format=>e_uri_full ). + if i_FIELD is supplied. + lv_queryparam = escape( val = i_FIELD format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting - i_parameter = `prefix` + i_parameter = `field` i_value = lv_queryparam changing c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_count is supplied. - lv_queryparam = i_count. + if i_COUNT is supplied. + lv_queryparam = i_COUNT. add_query_parameter( exporting i_parameter = `count` @@ -5635,8 +6637,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->LIST_TRAINING_DATA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRAINING_DATA_SET * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -5651,8 +6653,8 @@ method LIST_TRAINING_DATA. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/training_data'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -5685,9 +6687,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->ADD_TRAINING_DATA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_body TYPE T_NEW_TRAINING_QUERY +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_BODY TYPE T_NEW_TRAINING_QUERY * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRAINING_QUERY @@ -5703,8 +6705,8 @@ method ADD_TRAINING_DATA. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/training_data'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -5726,20 +6728,20 @@ method ADD_TRAINING_DATA. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -5773,8 +6775,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_ALL_TRAINING_DATA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_ALL_TRAINING_DATA. @@ -5787,8 +6789,8 @@ method DELETE_ALL_TRAINING_DATA. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/training_data'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers set_default_query_parameters( @@ -5812,9 +6814,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_TRAINING_DATA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_query_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_QUERY_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRAINING_QUERY * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -5829,9 +6831,9 @@ method GET_TRAINING_DATA. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_query_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_QUERY_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -5864,9 +6866,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_TRAINING_DATA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_query_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_QUERY_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_TRAINING_DATA. @@ -5879,9 +6881,9 @@ method DELETE_TRAINING_DATA. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_query_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_QUERY_ID ignoring case. " standard headers set_default_query_parameters( @@ -5905,9 +6907,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->LIST_TRAINING_EXAMPLES * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_query_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_QUERY_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRAINING_EXAMPLE_LIST * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -5922,9 +6924,9 @@ method LIST_TRAINING_EXAMPLES. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_query_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_QUERY_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -5957,10 +6959,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->CREATE_TRAINING_EXAMPLE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_query_id TYPE STRING -* | [--->] I_body TYPE T_TRAINING_EXAMPLE +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_QUERY_ID TYPE STRING +* | [--->] I_BODY TYPE T_TRAINING_EXAMPLE * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRAINING_EXAMPLE @@ -5976,9 +6978,9 @@ method CREATE_TRAINING_EXAMPLE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_query_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_QUERY_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -6000,20 +7002,20 @@ method CREATE_TRAINING_EXAMPLE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -6047,10 +7049,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_TRAINING_EXAMPLE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_query_id TYPE STRING -* | [--->] I_example_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_QUERY_ID TYPE STRING +* | [--->] I_EXAMPLE_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_TRAINING_EXAMPLE. @@ -6063,10 +7065,10 @@ method DELETE_TRAINING_EXAMPLE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_query_id ignoring case. - replace all occurrences of `{example_id}` in ls_request_prop-url-path with i_example_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_QUERY_ID ignoring case. + replace all occurrences of `{example_id}` in ls_request_prop-url-path with i_EXAMPLE_ID ignoring case. " standard headers set_default_query_parameters( @@ -6090,11 +7092,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->UPDATE_TRAINING_EXAMPLE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_query_id TYPE STRING -* | [--->] I_example_id TYPE STRING -* | [--->] I_body TYPE T_TRAINING_EXAMPLE_PATCH +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_QUERY_ID TYPE STRING +* | [--->] I_EXAMPLE_ID TYPE STRING +* | [--->] I_BODY TYPE T_TRAINING_EXAMPLE_PATCH * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRAINING_EXAMPLE @@ -6110,10 +7112,10 @@ method UPDATE_TRAINING_EXAMPLE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_query_id ignoring case. - replace all occurrences of `{example_id}` in ls_request_prop-url-path with i_example_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_QUERY_ID ignoring case. + replace all occurrences of `{example_id}` in ls_request_prop-url-path with i_EXAMPLE_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -6135,20 +7137,20 @@ method UPDATE_TRAINING_EXAMPLE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -6182,10 +7184,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_TRAINING_EXAMPLE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_collection_id TYPE STRING -* | [--->] I_query_id TYPE STRING -* | [--->] I_example_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_QUERY_ID TYPE STRING +* | [--->] I_EXAMPLE_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRAINING_EXAMPLE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -6200,10 +7202,10 @@ method GET_TRAINING_EXAMPLE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_query_id ignoring case. - replace all occurrences of `{example_id}` in ls_request_prop-url-path with i_example_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{query_id}` in ls_request_prop-url-path with i_QUERY_ID ignoring case. + replace all occurrences of `{example_id}` in ls_request_prop-url-path with i_EXAMPLE_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -6237,7 +7239,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_USER_DATA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customer_id TYPE STRING +* | [--->] I_CUSTOMER_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_USER_DATA. @@ -6260,7 +7262,7 @@ method DELETE_USER_DATA. data: lv_queryparam type string. - lv_queryparam = escape( val = i_customer_id format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_CUSTOMER_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `customer_id` @@ -6284,7 +7286,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->CREATE_EVENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_query_event TYPE T_CREATE_EVENT_OBJECT +* | [--->] I_QUERY_EVENT TYPE T_CREATE_EVENT_OBJECT * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CREATE_EVENT_RESPONSE @@ -6321,20 +7323,20 @@ method CREATE_EVENT. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_query_event ). + lv_datatype = get_datatype( i_QUERY_EVENT ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_query_event i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_QUERY_EVENT i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'query_event' i_value = i_query_event ). + lv_bodyparam = abap_to_json( i_name = 'query_event' i_value = i_QUERY_EVENT ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_query_event to . + assign i_QUERY_EVENT to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -6368,11 +7370,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->QUERY_LOG * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_filter TYPE STRING(optional) -* | [--->] I_query TYPE STRING(optional) -* | [--->] I_count TYPE INTEGER(optional) -* | [--->] I_offset TYPE INTEGER(optional) -* | [--->] I_sort TYPE TT_STRING(optional) +* | [--->] I_FILTER TYPE STRING(optional) +* | [--->] I_QUERY TYPE STRING(optional) +* | [--->] I_COUNT TYPE INTEGER(optional) +* | [--->] I_OFFSET TYPE INTEGER(optional) +* | [--->] I_SORT TYPE TT_STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_LOG_QUERY_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -6398,8 +7400,8 @@ method QUERY_LOG. data: lv_queryparam type string. - if i_filter is supplied. - lv_queryparam = escape( val = i_filter format = cl_abap_format=>e_uri_full ). + if i_FILTER is supplied. + lv_queryparam = escape( val = i_FILTER format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `filter` @@ -6408,8 +7410,8 @@ method QUERY_LOG. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_query is supplied. - lv_queryparam = escape( val = i_query format = cl_abap_format=>e_uri_full ). + if i_QUERY is supplied. + lv_queryparam = escape( val = i_QUERY format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `query` @@ -6418,8 +7420,8 @@ method QUERY_LOG. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_count is supplied. - lv_queryparam = i_count. + if i_COUNT is supplied. + lv_queryparam = i_COUNT. add_query_parameter( exporting i_parameter = `count` @@ -6428,8 +7430,8 @@ method QUERY_LOG. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_offset is supplied. - lv_queryparam = i_offset. + if i_OFFSET is supplied. + lv_queryparam = i_OFFSET. add_query_parameter( exporting i_parameter = `offset` @@ -6438,12 +7440,12 @@ method QUERY_LOG. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. + if i_SORT is supplied. data: - lv_item_sort type STRING. + lv_item_SORT type STRING. clear: lv_queryparam, lv_sep. - loop at i_sort into lv_item_sort. - lv_queryparam = lv_queryparam && lv_sep && lv_item_sort. + loop at i_SORT into lv_item_SORT. + lv_queryparam = lv_queryparam && lv_sep && lv_item_SORT. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -6478,9 +7480,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_METRICS_QUERY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_start_time TYPE DATETIME(optional) -* | [--->] I_end_time TYPE DATETIME(optional) -* | [--->] I_result_type TYPE STRING(optional) +* | [--->] I_START_TIME TYPE DATETIME(optional) +* | [--->] I_END_TIME TYPE DATETIME(optional) +* | [--->] I_RESULT_TYPE TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_METRIC_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -6506,8 +7508,8 @@ method GET_METRICS_QUERY. data: lv_queryparam type string. - if i_start_time is supplied. - lv_queryparam = i_start_time. + if i_START_TIME is supplied. + lv_queryparam = i_START_TIME. add_query_parameter( exporting i_parameter = `start_time` @@ -6516,8 +7518,8 @@ method GET_METRICS_QUERY. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_end_time is supplied. - lv_queryparam = i_end_time. + if i_END_TIME is supplied. + lv_queryparam = i_END_TIME. add_query_parameter( exporting i_parameter = `end_time` @@ -6526,8 +7528,8 @@ method GET_METRICS_QUERY. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_result_type is supplied. - lv_queryparam = escape( val = i_result_type format = cl_abap_format=>e_uri_full ). + if i_RESULT_TYPE is supplied. + lv_queryparam = escape( val = i_RESULT_TYPE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `result_type` @@ -6559,9 +7561,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_METRICS_QUERY_EVENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_start_time TYPE DATETIME(optional) -* | [--->] I_end_time TYPE DATETIME(optional) -* | [--->] I_result_type TYPE STRING(optional) +* | [--->] I_START_TIME TYPE DATETIME(optional) +* | [--->] I_END_TIME TYPE DATETIME(optional) +* | [--->] I_RESULT_TYPE TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_METRIC_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -6587,8 +7589,8 @@ method GET_METRICS_QUERY_EVENT. data: lv_queryparam type string. - if i_start_time is supplied. - lv_queryparam = i_start_time. + if i_START_TIME is supplied. + lv_queryparam = i_START_TIME. add_query_parameter( exporting i_parameter = `start_time` @@ -6597,8 +7599,8 @@ method GET_METRICS_QUERY_EVENT. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_end_time is supplied. - lv_queryparam = i_end_time. + if i_END_TIME is supplied. + lv_queryparam = i_END_TIME. add_query_parameter( exporting i_parameter = `end_time` @@ -6607,8 +7609,8 @@ method GET_METRICS_QUERY_EVENT. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_result_type is supplied. - lv_queryparam = escape( val = i_result_type format = cl_abap_format=>e_uri_full ). + if i_RESULT_TYPE is supplied. + lv_queryparam = escape( val = i_RESULT_TYPE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `result_type` @@ -6640,9 +7642,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_METRICS_QUERY_NO_RESULTS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_start_time TYPE DATETIME(optional) -* | [--->] I_end_time TYPE DATETIME(optional) -* | [--->] I_result_type TYPE STRING(optional) +* | [--->] I_START_TIME TYPE DATETIME(optional) +* | [--->] I_END_TIME TYPE DATETIME(optional) +* | [--->] I_RESULT_TYPE TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_METRIC_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -6668,8 +7670,8 @@ method GET_METRICS_QUERY_NO_RESULTS. data: lv_queryparam type string. - if i_start_time is supplied. - lv_queryparam = i_start_time. + if i_START_TIME is supplied. + lv_queryparam = i_START_TIME. add_query_parameter( exporting i_parameter = `start_time` @@ -6678,8 +7680,8 @@ method GET_METRICS_QUERY_NO_RESULTS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_end_time is supplied. - lv_queryparam = i_end_time. + if i_END_TIME is supplied. + lv_queryparam = i_END_TIME. add_query_parameter( exporting i_parameter = `end_time` @@ -6688,8 +7690,8 @@ method GET_METRICS_QUERY_NO_RESULTS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_result_type is supplied. - lv_queryparam = escape( val = i_result_type format = cl_abap_format=>e_uri_full ). + if i_RESULT_TYPE is supplied. + lv_queryparam = escape( val = i_RESULT_TYPE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `result_type` @@ -6721,9 +7723,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_METRICS_EVENT_RATE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_start_time TYPE DATETIME(optional) -* | [--->] I_end_time TYPE DATETIME(optional) -* | [--->] I_result_type TYPE STRING(optional) +* | [--->] I_START_TIME TYPE DATETIME(optional) +* | [--->] I_END_TIME TYPE DATETIME(optional) +* | [--->] I_RESULT_TYPE TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_METRIC_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -6749,8 +7751,8 @@ method GET_METRICS_EVENT_RATE. data: lv_queryparam type string. - if i_start_time is supplied. - lv_queryparam = i_start_time. + if i_START_TIME is supplied. + lv_queryparam = i_START_TIME. add_query_parameter( exporting i_parameter = `start_time` @@ -6759,8 +7761,8 @@ method GET_METRICS_EVENT_RATE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_end_time is supplied. - lv_queryparam = i_end_time. + if i_END_TIME is supplied. + lv_queryparam = i_END_TIME. add_query_parameter( exporting i_parameter = `end_time` @@ -6769,8 +7771,8 @@ method GET_METRICS_EVENT_RATE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_result_type is supplied. - lv_queryparam = escape( val = i_result_type format = cl_abap_format=>e_uri_full ). + if i_RESULT_TYPE is supplied. + lv_queryparam = escape( val = i_RESULT_TYPE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `result_type` @@ -6802,7 +7804,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_METRICS_QUERY_TOKEN_EVENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_count TYPE INTEGER(optional) +* | [--->] I_COUNT TYPE INTEGER(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_METRIC_TOKEN_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -6828,8 +7830,8 @@ method GET_METRICS_QUERY_TOKEN_EVENT. data: lv_queryparam type string. - if i_count is supplied. - lv_queryparam = i_count. + if i_COUNT is supplied. + lv_queryparam = i_COUNT. add_query_parameter( exporting i_parameter = `count` @@ -6862,7 +7864,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->LIST_CREDENTIALS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CREDENTIALS_LIST * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -6877,7 +7879,7 @@ method LIST_CREDENTIALS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/credentials'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -6910,8 +7912,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->CREATE_CREDENTIALS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_credentials_parameter TYPE T_CREDENTIALS +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_CREDENTIALS_PARAMETER TYPE T_CREDENTIALS * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CREDENTIALS @@ -6927,7 +7929,7 @@ method CREATE_CREDENTIALS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/credentials'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -6949,20 +7951,20 @@ method CREATE_CREDENTIALS. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_credentials_parameter ). + lv_datatype = get_datatype( i_CREDENTIALS_PARAMETER ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_credentials_parameter i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_CREDENTIALS_PARAMETER i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'credentials_parameter' i_value = i_credentials_parameter ). + lv_bodyparam = abap_to_json( i_name = 'credentials_parameter' i_value = i_CREDENTIALS_PARAMETER ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_credentials_parameter to . + assign i_CREDENTIALS_PARAMETER to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -6996,8 +7998,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_CREDENTIALS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_credential_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_CREDENTIAL_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CREDENTIALS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -7012,8 +8014,8 @@ method GET_CREDENTIALS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/credentials/{credential_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{credential_id}` in ls_request_prop-url-path with i_credential_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{credential_id}` in ls_request_prop-url-path with i_CREDENTIAL_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -7046,9 +8048,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->UPDATE_CREDENTIALS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_credential_id TYPE STRING -* | [--->] I_credentials_parameter TYPE T_CREDENTIALS +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_CREDENTIAL_ID TYPE STRING +* | [--->] I_CREDENTIALS_PARAMETER TYPE T_CREDENTIALS * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CREDENTIALS @@ -7064,8 +8066,8 @@ method UPDATE_CREDENTIALS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/credentials/{credential_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{credential_id}` in ls_request_prop-url-path with i_credential_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{credential_id}` in ls_request_prop-url-path with i_CREDENTIAL_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -7087,20 +8089,20 @@ method UPDATE_CREDENTIALS. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_credentials_parameter ). + lv_datatype = get_datatype( i_CREDENTIALS_PARAMETER ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_credentials_parameter i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_CREDENTIALS_PARAMETER i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'credentials_parameter' i_value = i_credentials_parameter ). + lv_bodyparam = abap_to_json( i_name = 'credentials_parameter' i_value = i_CREDENTIALS_PARAMETER ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_credentials_parameter to . + assign i_CREDENTIALS_PARAMETER to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -7134,8 +8136,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_CREDENTIALS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_credential_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_CREDENTIAL_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DELETE_CREDENTIALS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -7150,8 +8152,8 @@ method DELETE_CREDENTIALS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/credentials/{credential_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{credential_id}` in ls_request_prop-url-path with i_credential_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{credential_id}` in ls_request_prop-url-path with i_CREDENTIAL_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -7185,7 +8187,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->LIST_GATEWAYS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_GATEWAY_LIST * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -7200,7 +8202,7 @@ method LIST_GATEWAYS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/gateways'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -7233,8 +8235,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->CREATE_GATEWAY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_gateway_name TYPE T_GATEWAY_NAME(optional) +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_GATEWAY_NAME TYPE T_GATEWAY_NAME(optional) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_GATEWAY @@ -7250,7 +8252,7 @@ method CREATE_GATEWAY. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/gateways'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -7272,21 +8274,21 @@ method CREATE_GATEWAY. field-symbols: type any. lv_separator = ''. - if not i_gateway_name is initial. - lv_datatype = get_datatype( i_gateway_name ). + if not i_GATEWAY_NAME is initial. + lv_datatype = get_datatype( i_GATEWAY_NAME ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_gateway_name i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_GATEWAY_NAME i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'gateway_name' i_value = i_gateway_name ). + lv_bodyparam = abap_to_json( i_name = 'gateway_name' i_value = i_GATEWAY_NAME ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_gateway_name to . + assign i_GATEWAY_NAME to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -7321,8 +8323,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->GET_GATEWAY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_gateway_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_GATEWAY_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_GATEWAY * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -7337,8 +8339,8 @@ method GET_GATEWAY. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/gateways/{gateway_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{gateway_id}` in ls_request_prop-url-path with i_gateway_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{gateway_id}` in ls_request_prop-url-path with i_GATEWAY_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -7371,8 +8373,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_DISCOVERY_V1->DELETE_GATEWAY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_environment_id TYPE STRING -* | [--->] I_gateway_id TYPE STRING +* | [--->] I_ENVIRONMENT_ID TYPE STRING +* | [--->] I_GATEWAY_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_GATEWAY_DELETE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -7387,8 +8389,8 @@ method DELETE_GATEWAY. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/environments/{environment_id}/gateways/{gateway_id}'. - replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_environment_id ignoring case. - replace all occurrences of `{gateway_id}` in ls_request_prop-url-path with i_gateway_id ignoring case. + replace all occurrences of `{environment_id}` in ls_request_prop-url-path with i_ENVIRONMENT_ID ignoring case. + replace all occurrences of `{gateway_id}` in ls_request_prop-url-path with i_GATEWAY_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. diff --git a/src/zcl_ibmc_discovery_v1.clas.xml b/src/zcl_ibmc_discovery_v1.clas.xml index 33ffa69..9387c1e 100644 --- a/src/zcl_ibmc_discovery_v1.clas.xml +++ b/src/zcl_ibmc_discovery_v1.clas.xml @@ -5,7 +5,7 @@ ZCL_IBMC_DISCOVERY_V1 E - Watson Discovery + Watson Discovery V1 1 X X diff --git a/src/zcl_ibmc_lang_translator_v3.clas.abap b/src/zcl_ibmc_lang_translator_v3.clas.abap index 7d56975..08e1991 100644 --- a/src/zcl_ibmc_lang_translator_v3.clas.abap +++ b/src/zcl_ibmc_lang_translator_v3.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,37 +28,47 @@ public section. "! translation. T_MODEL_ID type String. types: - "! + "! No documentation available. begin of T_IDENTIFIABLE_LANGUAGE, + "! The language code for an identifiable language. LANGUAGE type STRING, + "! The name of the identifiable language. NAME type STRING, end of T_IDENTIFIABLE_LANGUAGE. types: - "! + "! No documentation available. begin of T_IDENTIFIABLE_LANGUAGES, + "! A list of all languages that the service can identify. LANGUAGES type STANDARD TABLE OF T_IDENTIFIABLE_LANGUAGE WITH NON-UNIQUE DEFAULT KEY, end of T_IDENTIFIABLE_LANGUAGES. types: - "! + "! No documentation available. begin of T_TRANSLATION, + "! Translation output in UTF-8. TRANSLATION type STRING, end of T_TRANSLATION. types: - "! + "! No documentation available. begin of T_TRANSLATION_RESULT, + "! An estimate of the number of words in the input text. WORD_COUNT type INTEGER, + "! Number of characters in the input text. CHARACTER_COUNT type INTEGER, + "! List of translation output in UTF-8, corresponding to the input text entries. TRANSLATIONS type STANDARD TABLE OF T_TRANSLATION WITH NON-UNIQUE DEFAULT KEY, end of T_TRANSLATION_RESULT. types: - "! + "! No documentation available. begin of T_IDENTIFIED_LANGUAGE, + "! The language code for an identified language. LANGUAGE type STRING, + "! The confidence score for the identified language. CONFIDENCE type DOUBLE, end of T_IDENTIFIED_LANGUAGE. types: - "! + "! No documentation available. begin of T_IDENTIFIED_LANGUAGES, + "! A ranking of identified languages with confidence scores. LANGUAGES type STANDARD TABLE OF T_IDENTIFIED_LANGUAGE WITH NON-UNIQUE DEFAULT KEY, end of T_IDENTIFIED_LANGUAGES. types: @@ -70,59 +80,117 @@ public section. types: "! Document information, including translation status. begin of T_DOCUMENT_STATUS, + "! System generated ID identifying a document being translated using one specific + "! translation model. DOCUMENT_ID type STRING, + "! filename from the submission (if it was missing in the multipart-form, + "! 'noname.<ext matching content type>' is used. FILENAME type STRING, + "! The status of the translation job associated with a submitted document. STATUS type STRING, + "! A globally unique string that identifies the underlying model that is used for + "! translation. MODEL_ID type STRING, + "! Model ID of the base model that was used to customize the model. If the model is + "! not a custom model, this will be absent or an empty string. BASE_MODEL_ID type STRING, + "! Translation source language code. SOURCE type STRING, + "! Translation target language code. TARGET type STRING, + "! The time when the document was submitted. CREATED type DATETIME, + "! The time when the translation completed. COMPLETED type DATETIME, + "! An estimate of the number of words in the source document. Returned only if + "! `status` is `available`. WORD_COUNT type INTEGER, + "! The number of characters in the source document, present only if + "! status=available. CHARACTER_COUNT type INTEGER, end of T_DOCUMENT_STATUS. types: - "! + "! No documentation available. begin of T_ERROR_RESPONSE, + "! The http error code. CODE type INTEGER, + "! A short description of the error. ERROR type STRING, end of T_ERROR_RESPONSE. types: "! Translation source language code. T_SOURCE type String. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT1, + "! The model to use for translation. `model_id` or both `source` and `target` are + "! required. MODEL_ID type STRING, + "! Language code that specifies the language of the source document. SOURCE type STRING, + "! Language code that specifies the target language for translation. TARGET type STRING, + "! To use a previously submitted document as the source for a new translation, + "! enter the `document_id` of the document. DOCUMENT_ID type STRING, + "! The contents of the source file to translate.
+ "!
+ "! [Supported file + "! types](https://cloud.ibm.com/docs/services/language-translator?topic=language-t + "! ranslator-document-translator-tutorial#supported-file-formats)
+ "!
+ "! Maximum file size: **20 MB**. FILE type FILE, end of T_INLINE_OBJECT1. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT, + "! A TMX file with your customizations. The customizations in the file completely + "! overwrite the domain translaton data, including high frequency or high + "! confidence phrase translations. You can upload only one glossary with a file + "! size less than 10 MB per call. A forced glossary should contain single words or + "! short phrases. FORCED_GLOSSARY type FILE, + "! A TMX file with parallel sentences for source and target language. You can + "! upload multiple parallel_corpus files in one request. All uploaded + "! parallel_corpus files combined, your parallel corpus must contain at least + "! 5,000 parallel sentences to train successfully. PARALLEL_CORPUS type FILE, end of T_INLINE_OBJECT. types: "! Response payload for models. begin of T_TRANSLATION_MODEL, + "! A globally unique string that identifies the underlying model that is used for + "! translation. MODEL_ID type STRING, + "! Optional name that can be specified when the model is created. NAME type STRING, + "! Translation source language code. SOURCE type STRING, + "! Translation target language code. TARGET type STRING, + "! Model ID of the base model that was used to customize the model. If the model is + "! not a custom model, this will be an empty string. BASE_MODEL_ID type STRING, + "! The domain of the translation model. DOMAIN type STRING, + "! Whether this model can be used as a base for customization. Customized models + "! are not further customizable, and some base models are not customizable. CUSTOMIZABLE type BOOLEAN, + "! Whether or not the model is a default model. A default model is the model for a + "! given language pair that will be used when that language pair is specified in + "! the source and target parameters. DEFAULT_MODEL type BOOLEAN, + "! Either an empty string, indicating the model is not a custom model, or the ID of + "! the service instance that created the model. OWNER type STRING, + "! Availability of a model. STATUS type STRING, end of T_TRANSLATION_MODEL. types: "! The response type for listing existing translation models. begin of T_TRANSLATION_MODELS, + "! An array of available models. MODELS type STANDARD TABLE OF T_TRANSLATION_MODEL WITH NON-UNIQUE DEFAULT KEY, end of T_TRANSLATION_MODELS. types: @@ -134,21 +202,29 @@ public section. "! translation model. T_DOCUMENT_ID type String. types: - "! + "! No documentation available. begin of T_TRANSLATE_REQUEST, + "! Input text in UTF-8 encoding. Multiple entries will result in multiple + "! translations in the response. TEXT type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! A globally unique string that identifies the underlying model that is used for + "! translation. MODEL_ID type STRING, + "! Translation source language code. SOURCE type STRING, + "! Translation target language code. TARGET type STRING, end of T_TRANSLATE_REQUEST. types: - "! + "! No documentation available. begin of T_DELETE_MODEL_RESULT, + "! "OK" indicates that the model was successfully deleted. STATUS type STRING, end of T_DELETE_MODEL_RESULT. types: - "! + "! No documentation available. begin of T_DOCUMENT_LIST, + "! An array of all previously submitted documents. DOCUMENTS type STANDARD TABLE OF T_DOCUMENT_STATUS WITH NON-UNIQUE DEFAULT KEY, end of T_DOCUMENT_LIST. @@ -216,15 +292,16 @@ constants: "! Translate. "! - "! @parameter I_request | + "! @parameter I_REQUEST | "! The translate request containing the text, and either a model ID or source and "! target language pair. "! @parameter E_RESPONSE | "! Service return value of type T_TRANSLATION_RESULT + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods TRANSLATE importing - !I_request type T_TRANSLATE_REQUEST + !I_REQUEST type T_TRANSLATE_REQUEST !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -236,6 +313,7 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_IDENTIFIABLE_LANGUAGES + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_IDENTIFIABLE_LANGUAGES importing @@ -246,14 +324,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Identify language. "! - "! @parameter I_text | + "! @parameter I_TEXT | "! Input text in UTF-8 format. "! @parameter E_RESPONSE | "! Service return value of type T_IDENTIFIED_LANGUAGES + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods IDENTIFY importing - !I_text type STRING + !I_TEXT type STRING !I_contenttype type string default 'text/plain' !I_accept type string default 'application/json' exporting @@ -263,11 +342,11 @@ constants: "! List models. "! - "! @parameter I_source | + "! @parameter I_SOURCE | "! Specify a language code to filter results by source language. - "! @parameter I_target | + "! @parameter I_TARGET | "! Specify a language code to filter results by target language. - "! @parameter I_default | + "! @parameter I_DEFAULT | "! If the default parameter isn't specified, the service will return all models "! (default and non-default) for each language pair. To return only default "! models, set this to `true`. To return only non-default models, set this to @@ -275,12 +354,13 @@ constants: "! base model. "! @parameter E_RESPONSE | "! Service return value of type T_TRANSLATION_MODELS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_MODELS importing - !I_source type STRING optional - !I_target type STRING optional - !I_default type BOOLEAN optional + !I_SOURCE type STRING optional + !I_TARGET type STRING optional + !I_DEFAULT type BOOLEAN optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TRANSLATION_MODELS @@ -288,37 +368,38 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Create model. "! - "! @parameter I_base_model_id | + "! @parameter I_BASE_MODEL_ID | "! The model ID of the model to use as the base for customization. To see available "! models, use the `List models` method. Usually all IBM provided models are "! customizable. In addition, all your models that have been created via parallel "! corpus customization, can be further customized with a forced glossary. - "! @parameter I_forced_glossary | + "! @parameter I_FORCED_GLOSSARY | "! A TMX file with your customizations. The customizations in the file completely "! overwrite the domain translaton data, including high frequency or high "! confidence phrase translations. You can upload only one glossary with a file "! size less than 10 MB per call. A forced glossary should contain single words or "! short phrases. - "! @parameter I_parallel_corpus | + "! @parameter I_PARALLEL_CORPUS | "! A TMX file with parallel sentences for source and target language. You can "! upload multiple parallel_corpus files in one request. All uploaded "! parallel_corpus files combined, your parallel corpus must contain at least "! 5,000 parallel sentences to train successfully. - "! @parameter I_name | + "! @parameter I_NAME | "! An optional model name that you can use to identify the model. Valid characters "! are letters, numbers, dashes, underscores, spaces and apostrophes. The maximum "! length is 32 characters. "! @parameter E_RESPONSE | "! Service return value of type T_TRANSLATION_MODEL + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_MODEL importing - !I_base_model_id type STRING - !I_forced_glossary type FILE optional - !I_parallel_corpus type FILE optional - !I_name type STRING optional - !I_forced_glossary_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL - !I_parallel_corpus_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL + !I_BASE_MODEL_ID type STRING + !I_FORCED_GLOSSARY type FILE optional + !I_PARALLEL_CORPUS type FILE optional + !I_NAME type STRING optional + !I_FORCED_GLOSSARY_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL + !I_PARALLEL_CORPUS_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -327,14 +408,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete model. "! - "! @parameter I_model_id | + "! @parameter I_MODEL_ID | "! Model ID of the model to delete. "! @parameter E_RESPONSE | "! Service return value of type T_DELETE_MODEL_RESULT + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_MODEL importing - !I_model_id type STRING + !I_MODEL_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_DELETE_MODEL_RESULT @@ -342,14 +424,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get model details. "! - "! @parameter I_model_id | + "! @parameter I_MODEL_ID | "! Model ID of the model to get. "! @parameter E_RESPONSE | "! Service return value of type T_TRANSLATION_MODEL + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_MODEL importing - !I_model_id type STRING + !I_MODEL_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TRANSLATION_MODEL @@ -360,6 +443,7 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_DOCUMENT_LIST + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_DOCUMENTS importing @@ -370,40 +454,41 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Translate document. "! - "! @parameter I_file | - "! The source file to translate. - "! + "! @parameter I_FILE | + "! The contents of the source file to translate.
+ "!
"! [Supported file "! types](https://cloud.ibm.com/docs/services/language-translator?topic=language-t - "! ranslator-document-translator-tutorial#supported-file-formats) - "! + "! ranslator-document-translator-tutorial#supported-file-formats)
+ "!
"! Maximum file size: **20 MB**. - "! @parameter I_filename | + "! @parameter I_FILENAME | "! The filename for file. - "! @parameter I_file_content_type | + "! @parameter I_FILE_CONTENT_TYPE | "! The content type of file. - "! @parameter I_model_id | + "! @parameter I_MODEL_ID | "! The model to use for translation. `model_id` or both `source` and `target` are "! required. - "! @parameter I_source | + "! @parameter I_SOURCE | "! Language code that specifies the language of the source document. - "! @parameter I_target | + "! @parameter I_TARGET | "! Language code that specifies the target language for translation. - "! @parameter I_document_id | + "! @parameter I_DOCUMENT_ID | "! To use a previously submitted document as the source for a new translation, "! enter the `document_id` of the document. "! @parameter E_RESPONSE | "! Service return value of type T_DOCUMENT_STATUS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods TRANSLATE_DOCUMENT importing - !I_file type FILE - !I_filename type STRING - !I_file_content_type type STRING optional - !I_model_id type STRING optional - !I_source type STRING optional - !I_target type STRING optional - !I_document_id type STRING optional + !I_FILE type FILE + !I_FILENAME type STRING + !I_FILE_CONTENT_TYPE type STRING optional + !I_MODEL_ID type STRING optional + !I_SOURCE type STRING optional + !I_TARGET type STRING optional + !I_DOCUMENT_ID type STRING optional !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -412,14 +497,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get document status. "! - "! @parameter I_document_id | + "! @parameter I_DOCUMENT_ID | "! The document ID of the document. "! @parameter E_RESPONSE | "! Service return value of type T_DOCUMENT_STATUS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_DOCUMENT_STATUS importing - !I_document_id type STRING + !I_DOCUMENT_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_DOCUMENT_STATUS @@ -427,19 +513,20 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete document. "! - "! @parameter I_document_id | + "! @parameter I_DOCUMENT_ID | "! Document ID of the document to delete. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_DOCUMENT importing - !I_document_id type STRING + !I_DOCUMENT_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "! Get translated document. "! - "! @parameter I_document_id | + "! @parameter I_DOCUMENT_ID | "! The document ID of the document that was submitted for translation. - "! @parameter I_Accept | + "! @parameter I_ACCEPT | "! The type of the response: application/powerpoint, application/mspowerpoint, "! application/x-rtf, application/json, application/xml, application/vnd.ms-excel, "! application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, @@ -455,11 +542,12 @@ constants: "! example, 'text/html;charset=utf-8'. "! @parameter E_RESPONSE | "! Service return value of type FILE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_TRANSLATED_DOCUMENT importing - !I_document_id type STRING - !I_Accept type STRING optional + !I_DOCUMENT_ID type STRING + !I_ACCEPT type STRING optional exporting !E_RESPONSE type FILE raising @@ -501,7 +589,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -537,7 +625,7 @@ endmethod. * +--------------------------------------------------------------------------------------
method get_sdk_version_date. - e_sdk_version_date = '20191002122842'. + e_sdk_version_date = '20200210092819'. endmethod. @@ -546,7 +634,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_LANG_TRANSLATOR_V3->TRANSLATE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_request TYPE T_TRANSLATE_REQUEST +* | [--->] I_REQUEST TYPE T_TRANSLATE_REQUEST * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRANSLATION_RESULT @@ -583,20 +671,20 @@ method TRANSLATE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_request ). + lv_datatype = get_datatype( i_REQUEST ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_request i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_REQUEST i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'request' i_value = i_request ). + lv_bodyparam = abap_to_json( i_name = 'request' i_value = i_REQUEST ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_request to . + assign i_REQUEST to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -677,7 +765,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_LANG_TRANSLATOR_V3->IDENTIFY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_text TYPE STRING +* | [--->] I_TEXT TYPE STRING * | [--->] I_contenttype TYPE string (default ='text/plain') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_IDENTIFIED_LANGUAGES @@ -714,20 +802,20 @@ method IDENTIFY. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_text ). + lv_datatype = get_datatype( i_TEXT ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_text i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_TEXT i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'text' i_value = i_text ). + lv_bodyparam = abap_to_json( i_name = 'text' i_value = i_TEXT ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_text to . + assign i_TEXT to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -762,9 +850,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_LANG_TRANSLATOR_V3->LIST_MODELS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_source TYPE STRING(optional) -* | [--->] I_target TYPE STRING(optional) -* | [--->] I_default TYPE BOOLEAN(optional) +* | [--->] I_SOURCE TYPE STRING(optional) +* | [--->] I_TARGET TYPE STRING(optional) +* | [--->] I_DEFAULT TYPE BOOLEAN(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRANSLATION_MODELS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -790,8 +878,8 @@ method LIST_MODELS. data: lv_queryparam type string. - if i_source is supplied. - lv_queryparam = escape( val = i_source format = cl_abap_format=>e_uri_full ). + if i_SOURCE is supplied. + lv_queryparam = escape( val = i_SOURCE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `source` @@ -800,8 +888,8 @@ method LIST_MODELS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_target is supplied. - lv_queryparam = escape( val = i_target format = cl_abap_format=>e_uri_full ). + if i_TARGET is supplied. + lv_queryparam = escape( val = i_TARGET format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `target` @@ -810,8 +898,8 @@ method LIST_MODELS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_default is supplied. - lv_queryparam = i_default. + if i_DEFAULT is supplied. + lv_queryparam = i_DEFAULT. add_query_parameter( exporting i_parameter = `default` @@ -844,12 +932,12 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_LANG_TRANSLATOR_V3->CREATE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_base_model_id TYPE STRING -* | [--->] I_forced_glossary TYPE FILE(optional) -* | [--->] I_parallel_corpus TYPE FILE(optional) -* | [--->] I_name TYPE STRING(optional) -* | [--->] I_forced_glossary_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) -* | [--->] I_parallel_corpus_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) +* | [--->] I_BASE_MODEL_ID TYPE STRING +* | [--->] I_FORCED_GLOSSARY TYPE FILE(optional) +* | [--->] I_PARALLEL_CORPUS TYPE FILE(optional) +* | [--->] I_NAME TYPE STRING(optional) +* | [--->] I_FORCED_GLOSSARY_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) +* | [--->] I_PARALLEL_CORPUS_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRANSLATION_MODEL @@ -877,7 +965,7 @@ method CREATE_MODEL. data: lv_queryparam type string. - lv_queryparam = escape( val = i_base_model_id format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_BASE_MODEL_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `base_model_id` @@ -885,8 +973,8 @@ method CREATE_MODEL. changing c_url = ls_request_prop-url ) ##NO_TEXT. - if i_name is supplied. - lv_queryparam = escape( val = i_name format = cl_abap_format=>e_uri_full ). + if i_NAME is supplied. + lv_queryparam = escape( val = i_NAME format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `name` @@ -911,25 +999,25 @@ method CREATE_MODEL. - if not i_forced_glossary is initial. - lv_extension = get_file_extension( I_forced_glossary_CT ). + if not i_FORCED_GLOSSARY is initial. + lv_extension = get_file_extension( I_FORCED_GLOSSARY_CT ). lv_value = `form-data; name="forced_glossary"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. - ls_form_part-content_type = I_forced_glossary_CT. + ls_form_part-content_type = I_FORCED_GLOSSARY_CT. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_forced_glossary. + ls_form_part-xdata = i_FORCED_GLOSSARY. append ls_form_part to lt_form_part. endif. - if not i_parallel_corpus is initial. - lv_extension = get_file_extension( I_parallel_corpus_CT ). + if not i_PARALLEL_CORPUS is initial. + lv_extension = get_file_extension( I_PARALLEL_CORPUS_CT ). lv_value = `form-data; name="parallel_corpus"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. - ls_form_part-content_type = I_parallel_corpus_CT. + ls_form_part-content_type = I_PARALLEL_CORPUS_CT. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_parallel_corpus. + ls_form_part-xdata = i_PARALLEL_CORPUS. append ls_form_part to lt_form_part. endif. @@ -954,7 +1042,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_LANG_TRANSLATOR_V3->DELETE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_model_id TYPE STRING +* | [--->] I_MODEL_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DELETE_MODEL_RESULT * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -969,7 +1057,7 @@ method DELETE_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v3/models/{model_id}'. - replace all occurrences of `{model_id}` in ls_request_prop-url-path with i_model_id ignoring case. + replace all occurrences of `{model_id}` in ls_request_prop-url-path with i_MODEL_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1002,7 +1090,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_LANG_TRANSLATOR_V3->GET_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_model_id TYPE STRING +* | [--->] I_MODEL_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRANSLATION_MODEL * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1017,7 +1105,7 @@ method GET_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v3/models/{model_id}'. - replace all occurrences of `{model_id}` in ls_request_prop-url-path with i_model_id ignoring case. + replace all occurrences of `{model_id}` in ls_request_prop-url-path with i_MODEL_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1097,13 +1185,13 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_LANG_TRANSLATOR_V3->TRANSLATE_DOCUMENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_file TYPE FILE -* | [--->] I_filename TYPE STRING -* | [--->] I_file_content_type TYPE STRING(optional) -* | [--->] I_model_id TYPE STRING(optional) -* | [--->] I_source TYPE STRING(optional) -* | [--->] I_target TYPE STRING(optional) -* | [--->] I_document_id TYPE STRING(optional) +* | [--->] I_FILE TYPE FILE +* | [--->] I_FILENAME TYPE STRING +* | [--->] I_FILE_CONTENT_TYPE TYPE STRING(optional) +* | [--->] I_MODEL_ID TYPE STRING(optional) +* | [--->] I_SOURCE TYPE STRING(optional) +* | [--->] I_TARGET TYPE STRING(optional) +* | [--->] I_DOCUMENT_ID TYPE STRING(optional) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DOCUMENT_STATUS @@ -1143,45 +1231,45 @@ method TRANSLATE_DOCUMENT. lv_extension type string ##NEEDED. - if not i_model_id is initial. + if not i_MODEL_ID is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="model_id"' ##NO_TEXT. - lv_formdata = i_model_id. + lv_formdata = i_MODEL_ID. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_source is initial. + if not i_SOURCE is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="source"' ##NO_TEXT. - lv_formdata = i_source. + lv_formdata = i_SOURCE. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_target is initial. + if not i_TARGET is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="target"' ##NO_TEXT. - lv_formdata = i_target. + lv_formdata = i_TARGET. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_document_id is initial. + if not i_DOCUMENT_ID is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="document_id"' ##NO_TEXT. - lv_formdata = i_document_id. + lv_formdata = i_DOCUMENT_ID. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_file is initial. + if not i_FILE is initial. if not I_filename is initial. lv_value = `form-data; name="file"; filename="` && I_filename && `"` ##NO_TEXT. else. @@ -1192,7 +1280,7 @@ method TRANSLATE_DOCUMENT. clear ls_form_part. ls_form_part-content_type = I_file_content_type. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_file. + ls_form_part-xdata = i_FILE. append ls_form_part to lt_form_part. endif. @@ -1217,7 +1305,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_LANG_TRANSLATOR_V3->GET_DOCUMENT_STATUS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_document_id TYPE STRING +* | [--->] I_DOCUMENT_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DOCUMENT_STATUS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1232,7 +1320,7 @@ method GET_DOCUMENT_STATUS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v3/documents/{document_id}'. - replace all occurrences of `{document_id}` in ls_request_prop-url-path with i_document_id ignoring case. + replace all occurrences of `{document_id}` in ls_request_prop-url-path with i_DOCUMENT_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1265,7 +1353,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_LANG_TRANSLATOR_V3->DELETE_DOCUMENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_document_id TYPE STRING +* | [--->] I_DOCUMENT_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_DOCUMENT. @@ -1278,7 +1366,7 @@ method DELETE_DOCUMENT. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v3/documents/{document_id}'. - replace all occurrences of `{document_id}` in ls_request_prop-url-path with i_document_id ignoring case. + replace all occurrences of `{document_id}` in ls_request_prop-url-path with i_DOCUMENT_ID ignoring case. " standard headers set_default_query_parameters( @@ -1302,8 +1390,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_LANG_TRANSLATOR_V3->GET_TRANSLATED_DOCUMENT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_document_id TYPE STRING -* | [--->] I_Accept TYPE STRING(optional) +* | [--->] I_DOCUMENT_ID TYPE STRING +* | [--->] I_ACCEPT TYPE STRING(optional) * | [<---] E_RESPONSE TYPE FILE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -1317,7 +1405,7 @@ method GET_TRANSLATED_DOCUMENT. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v3/documents/{document_id}/translated_document'. - replace all occurrences of `{document_id}` in ls_request_prop-url-path with i_document_id ignoring case. + replace all occurrences of `{document_id}` in ls_request_prop-url-path with i_DOCUMENT_ID ignoring case. " standard headers set_default_query_parameters( @@ -1330,8 +1418,8 @@ method GET_TRANSLATED_DOCUMENT. data: lv_headerparam type string ##NEEDED. - if i_Accept is supplied. - lv_headerparam = I_Accept. + if i_ACCEPT is supplied. + lv_headerparam = I_ACCEPT. add_header_parameter( exporting i_parameter = 'Accept' diff --git a/src/zcl_ibmc_nat_lang_class_v1.clas.abap b/src/zcl_ibmc_nat_lang_class_v1.clas.abap index 897a4d8..b1cc5d2 100644 --- a/src/zcl_ibmc_nat_lang_class_v1.clas.abap +++ b/src/zcl_ibmc_nat_lang_class_v1.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,78 +25,121 @@ public section. types: "! Response payload for HTTP errors. begin of T_ERROR_RESPONSE, + "! HTTP status code. CODE type INTEGER, + "! Error name. ERROR type STRING, + "! Error description. DESCRIPTION type STRING, end of T_ERROR_RESPONSE. types: "! Request payload to classify. begin of T_CLASSIFY_INPUT, + "! The submitted phrase. The maximum length is 2048 characters. TEXT type STRING, end of T_CLASSIFY_INPUT. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT, + "! Metadata in JSON format. The metadata identifies the language of the data, and + "! an optional name to identify the classifier. Specify the language with the + "! 2-letter primary language code as assigned in ISO standard 639.
+ "!
+ "! Supported languages are English (`en`), Arabic (`ar`), French (`fr`), German, + "! (`de`), Italian (`it`), Japanese (`ja`), Korean (`ko`), Brazilian Portuguese + "! (`pt`), and Spanish (`es`). TRAINING_METADATA type FILE, + "! Training data in CSV format. Each text value must have at least one class. The + "! data can include up to 3,000 classes and 20,000 records. For details, see [Data + "! preparation](https://cloud.ibm.com/docs/natural-language-classifier?topic=natur + "! al-language-classifier-using-your-data). TRAINING_DATA type FILE, end of T_INLINE_OBJECT. types: "! Class and confidence. begin of T_CLASSIFIED_CLASS, + "! A decimal percentage that represents the confidence that Watson has in this + "! class. Higher values represent higher confidences. CONFIDENCE type DOUBLE, + "! Class label. CLASS_NAME type STRING, end of T_CLASSIFIED_CLASS. types: "! Response from the classifier for a phrase in a collection. begin of T_COLLECTION_ITEM, + "! The submitted phrase. The maximum length is 2048 characters. TEXT type STRING, + "! The class with the highest confidence. TOP_CLASS type STRING, + "! An array of up to ten class-confidence pairs sorted in descending order of + "! confidence. CLASSES type STANDARD TABLE OF T_CLASSIFIED_CLASS WITH NON-UNIQUE DEFAULT KEY, end of T_COLLECTION_ITEM. types: "! A classifier for natural language phrases. begin of T_CLASSIFIER, + "! User-supplied name for the classifier. NAME type STRING, + "! Link to the classifier. URL type STRING, + "! The state of the classifier. STATUS type STRING, + "! Unique identifier for this classifier. CLASSIFIER_ID type STRING, + "! Date and time (UTC) the classifier was created. CREATED type DATETIME, + "! Additional detail about the status. STATUS_DESCRIPTION type STRING, + "! The language used for the classifier. LANGUAGE type STRING, end of T_CLASSIFIER. types: "! List of available classifiers. begin of T_CLASSIFIER_LIST, + "! The classifiers available to the user. Returns an empty array if no classifiers + "! are available. CLASSIFIERS type STANDARD TABLE OF T_CLASSIFIER WITH NON-UNIQUE DEFAULT KEY, end of T_CLASSIFIER_LIST. types: "! Response from the classifier for a phrase. begin of T_CLASSIFICATION, + "! Unique identifier for this classifier. CLASSIFIER_ID type STRING, + "! Link to the classifier. URL type STRING, + "! The submitted phrase. TEXT type STRING, + "! The class with the highest confidence. TOP_CLASS type STRING, + "! An array of up to ten class-confidence pairs sorted in descending order of + "! confidence. CLASSES type STANDARD TABLE OF T_CLASSIFIED_CLASS WITH NON-UNIQUE DEFAULT KEY, end of T_CLASSIFICATION. types: "! Request payload to classify. begin of T_CLASSIFY_COLLECTION_INPUT, + "! The submitted phrases. COLLECTION type STANDARD TABLE OF T_CLASSIFY_INPUT WITH NON-UNIQUE DEFAULT KEY, end of T_CLASSIFY_COLLECTION_INPUT. types: "! Response payload for Cloud errors. begin of T_ERROR_CLOUD, + "! HTTP status code. CODE type INTEGER, + "! Error name. ERROR type STRING, end of T_ERROR_CLOUD. types: - "! + "! No documentation available. T_EMPTY type JSONOBJECT. types: "! Response from the classifier for multiple phrases. begin of T_CLASSIFICATION_COLLECTION, + "! Unique identifier for this classifier. CLASSIFIER_ID type STRING, + "! Link to the classifier. URL type STRING, + "! An array of classifier responses for each submitted phrase. COLLECTION type STANDARD TABLE OF T_COLLECTION_ITEM WITH NON-UNIQUE DEFAULT KEY, end of T_CLASSIFICATION_COLLECTION. @@ -151,17 +194,18 @@ constants: "! Classify a phrase. "! - "! @parameter I_classifier_id | + "! @parameter I_CLASSIFIER_ID | "! Classifier ID to use. - "! @parameter I_body | + "! @parameter I_BODY | "! Phrase to classify. "! @parameter E_RESPONSE | "! Service return value of type T_CLASSIFICATION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CLASSIFY importing - !I_classifier_id type STRING - !I_body type T_CLASSIFY_INPUT + !I_CLASSIFIER_ID type STRING + !I_BODY type T_CLASSIFY_INPUT !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -170,17 +214,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Classify multiple phrases. "! - "! @parameter I_classifier_id | + "! @parameter I_CLASSIFIER_ID | "! Classifier ID to use. - "! @parameter I_body | + "! @parameter I_BODY | "! Phrase to classify. You can submit up to 30 text phrases in a request. "! @parameter E_RESPONSE | "! Service return value of type T_CLASSIFICATION_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CLASSIFY_COLLECTION importing - !I_classifier_id type STRING - !I_body type T_CLASSIFY_COLLECTION_INPUT + !I_CLASSIFIER_ID type STRING + !I_BODY type T_CLASSIFY_COLLECTION_INPUT !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -190,28 +235,29 @@ constants: "! Create classifier. "! - "! @parameter I_training_metadata | + "! @parameter I_TRAINING_METADATA | "! Metadata in JSON format. The metadata identifies the language of the data, and "! an optional name to identify the classifier. Specify the language with the - "! 2-letter primary language code as assigned in ISO standard 639. - "! + "! 2-letter primary language code as assigned in ISO standard 639.
+ "!
"! Supported languages are English (`en`), Arabic (`ar`), French (`fr`), German, "! (`de`), Italian (`it`), Japanese (`ja`), Korean (`ko`), Brazilian Portuguese "! (`pt`), and Spanish (`es`). - "! @parameter I_training_data | + "! @parameter I_TRAINING_DATA | "! Training data in CSV format. Each text value must have at least one class. The "! data can include up to 3,000 classes and 20,000 records. For details, see [Data - "! preparation](https://cloud.ibm.com/docs/services/natural-language-classifier?to - "! pic=natural-language-classifier-using-your-data). + "! preparation](https://cloud.ibm.com/docs/natural-language-classifier?topic=natur + "! al-language-classifier-using-your-data). "! @parameter E_RESPONSE | "! Service return value of type T_CLASSIFIER + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_CLASSIFIER importing - !I_training_metadata type FILE - !I_training_data type FILE - !I_training_metadata_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL - !I_training_data_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL + !I_TRAINING_METADATA type FILE + !I_TRAINING_DATA type FILE + !I_TRAINING_METADATA_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL + !I_TRAINING_DATA_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -222,6 +268,7 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_CLASSIFIER_LIST + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_CLASSIFIERS importing @@ -232,14 +279,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get information about a classifier. "! - "! @parameter I_classifier_id | + "! @parameter I_CLASSIFIER_ID | "! Classifier ID to query. "! @parameter E_RESPONSE | "! Service return value of type T_CLASSIFIER + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_CLASSIFIER importing - !I_classifier_id type STRING + !I_CLASSIFIER_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_CLASSIFIER @@ -247,12 +295,13 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete classifier. "! - "! @parameter I_classifier_id | + "! @parameter I_CLASSIFIER_ID | "! Classifier ID to delete. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_CLASSIFIER importing - !I_classifier_id type STRING + !I_CLASSIFIER_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . @@ -293,7 +342,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -329,7 +378,7 @@ endmethod. * +--------------------------------------------------------------------------------------
method get_sdk_version_date. - e_sdk_version_date = '20191002122844'. + e_sdk_version_date = '20200210092820'. endmethod. @@ -338,8 +387,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_NAT_LANG_CLASS_V1->CLASSIFY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_classifier_id TYPE STRING -* | [--->] I_body TYPE T_CLASSIFY_INPUT +* | [--->] I_CLASSIFIER_ID TYPE STRING +* | [--->] I_BODY TYPE T_CLASSIFY_INPUT * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CLASSIFICATION @@ -355,7 +404,7 @@ method CLASSIFY. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/classifiers/{classifier_id}/classify'. - replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_classifier_id ignoring case. + replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_CLASSIFIER_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -377,20 +426,20 @@ method CLASSIFY. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -424,8 +473,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_NAT_LANG_CLASS_V1->CLASSIFY_COLLECTION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_classifier_id TYPE STRING -* | [--->] I_body TYPE T_CLASSIFY_COLLECTION_INPUT +* | [--->] I_CLASSIFIER_ID TYPE STRING +* | [--->] I_BODY TYPE T_CLASSIFY_COLLECTION_INPUT * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CLASSIFICATION_COLLECTION @@ -441,7 +490,7 @@ method CLASSIFY_COLLECTION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/classifiers/{classifier_id}/classify_collection'. - replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_classifier_id ignoring case. + replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_CLASSIFIER_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -463,20 +512,20 @@ method CLASSIFY_COLLECTION. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_body ). + lv_datatype = get_datatype( i_BODY ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_body i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_BODY i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_body ). + lv_bodyparam = abap_to_json( i_name = 'body' i_value = i_BODY ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_body to . + assign i_BODY to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -511,10 +560,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_NAT_LANG_CLASS_V1->CREATE_CLASSIFIER * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_training_metadata TYPE FILE -* | [--->] I_training_data TYPE FILE -* | [--->] I_training_metadata_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) -* | [--->] I_training_data_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) +* | [--->] I_TRAINING_METADATA TYPE FILE +* | [--->] I_TRAINING_DATA TYPE FILE +* | [--->] I_TRAINING_METADATA_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) +* | [--->] I_TRAINING_DATA_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CLASSIFIER @@ -556,25 +605,25 @@ method CREATE_CLASSIFIER. - if not i_training_metadata is initial. - lv_extension = get_file_extension( I_training_metadata_CT ). + if not i_TRAINING_METADATA is initial. + lv_extension = get_file_extension( I_TRAINING_METADATA_CT ). lv_value = `form-data; name="training_metadata"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. - ls_form_part-content_type = I_training_metadata_CT. + ls_form_part-content_type = I_TRAINING_METADATA_CT. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_training_metadata. + ls_form_part-xdata = i_TRAINING_METADATA. append ls_form_part to lt_form_part. endif. - if not i_training_data is initial. - lv_extension = get_file_extension( I_training_data_CT ). + if not i_TRAINING_DATA is initial. + lv_extension = get_file_extension( I_TRAINING_DATA_CT ). lv_value = `form-data; name="training_data"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. - ls_form_part-content_type = I_training_data_CT. + ls_form_part-content_type = I_TRAINING_DATA_CT. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_training_data. + ls_form_part-xdata = i_TRAINING_DATA. append ls_form_part to lt_form_part. endif. @@ -645,7 +694,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_NAT_LANG_CLASS_V1->GET_CLASSIFIER * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_classifier_id TYPE STRING +* | [--->] I_CLASSIFIER_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CLASSIFIER * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -660,7 +709,7 @@ method GET_CLASSIFIER. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/classifiers/{classifier_id}'. - replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_classifier_id ignoring case. + replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_CLASSIFIER_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -693,7 +742,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_NAT_LANG_CLASS_V1->DELETE_CLASSIFIER * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_classifier_id TYPE STRING +* | [--->] I_CLASSIFIER_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -707,7 +756,7 @@ method DELETE_CLASSIFIER. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/classifiers/{classifier_id}'. - replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_classifier_id ignoring case. + replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_CLASSIFIER_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. diff --git a/src/zcl_ibmc_nat_lang_undrstnd_v1.clas.abap b/src/zcl_ibmc_nat_lang_undrstnd_v1.clas.abap index 1284cf8..ff67b55 100644 --- a/src/zcl_ibmc_nat_lang_undrstnd_v1.clas.abap +++ b/src/zcl_ibmc_nat_lang_undrstnd_v1.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,13 +16,12 @@ "! public URL and IBM Watson Natural Language Understanding will give you results "! for the features you request. The service cleans HTML content before analysis "! by default, so the results can ignore most advertisements and other unwanted -"! content. -"! +"! content.
+"!
"! You can create [custom "! models](https://cloud.ibm.com/docs/services/natural-language-understanding?topi "! c=natural-language-understanding-customizing) with Watson Knowledge Studio to -"! detect custom entities, relations, and categories in Natural Language -"! Understanding.
+"! detect custom entities and relations in Natural Language Understanding.
class ZCL_IBMC_NAT_LANG_UNDRSTND_V1 DEFINITION public inheriting from ZCL_IBMC_SERVICE_EXT @@ -30,233 +29,374 @@ class ZCL_IBMC_NAT_LANG_UNDRSTND_V1 DEFINITION public section. types: - "! + "! No documentation available. begin of T_SEMANTIC_ROLES_ENTITY, + "! Entity type. TYPE type STRING, + "! The entity text. TEXT type STRING, end of T_SEMANTIC_ROLES_ENTITY. types: - "! + "! No documentation available. begin of T_SEMANTIC_ROLES_KEYWORD, + "! The keyword text. TEXT type STRING, end of T_SEMANTIC_ROLES_KEYWORD. types: "! The extracted subject from the sentence. begin of T_SMNTC_ROLES_RESULT_SUBJECT, + "! Text that corresponds to the subject role. TEXT type STRING, + "! An array of extracted entities. ENTITIES type STANDARD TABLE OF T_SEMANTIC_ROLES_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! An array of extracted keywords. KEYWORDS type STANDARD TABLE OF T_SEMANTIC_ROLES_KEYWORD WITH NON-UNIQUE DEFAULT KEY, end of T_SMNTC_ROLES_RESULT_SUBJECT. types: "! The extracted object from the sentence. begin of T_SEMANTIC_ROLES_RESULT_OBJECT, + "! Object text. TEXT type STRING, + "! An array of extracted keywords. KEYWORDS type STANDARD TABLE OF T_SEMANTIC_ROLES_KEYWORD WITH NON-UNIQUE DEFAULT KEY, end of T_SEMANTIC_ROLES_RESULT_OBJECT. types: - "! + "! No documentation available. begin of T_SEMANTIC_ROLES_VERB, + "! The keyword text. TEXT type STRING, + "! Verb tense. TENSE type STRING, end of T_SEMANTIC_ROLES_VERB. types: "! The extracted action from the sentence. begin of T_SEMANTIC_ROLES_RESULT_ACTION, + "! Analyzed text that corresponds to the action. TEXT type STRING, + "! normalized version of the action. NORMALIZED type STRING, + "! No documentation available. VERB type T_SEMANTIC_ROLES_VERB, end of T_SEMANTIC_ROLES_RESULT_ACTION. types: "! The object containing the actions and the objects the actions act upon. begin of T_SEMANTIC_ROLES_RESULT, + "! Sentence from the source that contains the subject, action, and object. SENTENCE type STRING, + "! The extracted subject from the sentence. SUBJECT type T_SMNTC_ROLES_RESULT_SUBJECT, + "! The extracted action from the sentence. ACTION type T_SEMANTIC_ROLES_RESULT_ACTION, + "! The extracted object from the sentence. OBJECT type T_SEMANTIC_ROLES_RESULT_OBJECT, end of T_SEMANTIC_ROLES_RESULT. types: - "! Parses sentences into subject, action, and object form. - "! + "! Parses sentences into subject, action, and object form.
+ "!
"! Supported languages: English, German, Japanese, Korean, Spanish. begin of T_SEMANTIC_ROLES_OPTIONS, + "! Maximum number of semantic_roles results to return. LIMIT type INTEGER, + "! Set this to `true` to return keyword information for subjects and objects. KEYWORDS type BOOLEAN, + "! Set this to `true` to return entity information for subjects and objects. ENTITIES type BOOLEAN, end of T_SEMANTIC_ROLES_OPTIONS. + types: + "! Metadata associated with this custom model. + begin of T_MODEL_METADATA, + "! An optional name for the model. + NAME type STRING, + "! An optional map of metadata key-value pairs to store with this model. + USER_METADATA type MAP, + "! The language code of this model. + LANGUAGE type STRING, + "! An optional description of the model. + DESCRIPTION type STRING, + "! An optional version string. + VERSION type STRING, + "! ID of the Watson Knowledge Studio workspace that deployed this model to Natural + "! Language Understanding. + WORKSPACE_ID type STRING, + "! The description of the version. + VERSION_DESCRIPTION type STRING, + end of T_MODEL_METADATA. types: "! An entity that corresponds with an argument in a relation. begin of T_RELATION_ENTITY, + "! Text that corresponds to the entity. TEXT type STRING, + "! Entity type. TYPE type STRING, end of T_RELATION_ENTITY. types: - "! + "! No documentation available. begin of T_RELATION_ARGUMENT, + "! An array of extracted entities. ENTITIES type STANDARD TABLE OF T_RELATION_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! Character offsets indicating the beginning and end of the mention in the + "! analyzed text. LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, + "! Text that corresponds to the argument. TEXT type STRING, end of T_RELATION_ARGUMENT. types: "! The relations between entities found in the content. begin of T_RELATIONS_RESULT, + "! Confidence score for the relation. Higher values indicate greater confidence. SCORE type DOUBLE, + "! The sentence that contains the relation. SENTENCE type STRING, + "! The type of the relation. TYPE type STRING, + "! Entity mentions that are involved in the relation. ARGUMENTS type STANDARD TABLE OF T_RELATION_ARGUMENT WITH NON-UNIQUE DEFAULT KEY, end of T_RELATIONS_RESULT. types: - "! + "! No documentation available. begin of T_MODEL, + "! When the status is `available`, the model is ready to use. STATUS type STRING, + "! Unique model ID. MODEL_ID type STRING, + "! ISO 639-1 code indicating the language of the model. LANGUAGE type STRING, + "! Model description. DESCRIPTION type STRING, + "! ID of the Watson Knowledge Studio workspace that deployed this model to Natural + "! Language Understanding. WORKSPACE_ID type STRING, + "! The model version, if it was manually provided in Watson Knowledge Studio. VERSION type STRING, + "! The description of the version, if it was manually provided in Watson Knowledge + "! Studio. VERSION_DESCRIPTION type STRING, + "! A dateTime indicating when the model was created. CREATED type DATETIME, end of T_MODEL. types: - "! + "! No documentation available. begin of T_FEATURE_SENTIMENT_RESULTS, + "! Sentiment score from -1 (negative) to 1 (positive). SCORE type DOUBLE, end of T_FEATURE_SENTIMENT_RESULTS. types: - "! + "! No documentation available. begin of T_EMOTION_SCORES, + "! Anger score from 0 to 1. A higher score means that the text is more likely to + "! convey anger. ANGER type DOUBLE, + "! Disgust score from 0 to 1. A higher score means that the text is more likely to + "! convey disgust. DISGUST type DOUBLE, + "! Fear score from 0 to 1. A higher score means that the text is more likely to + "! convey fear. FEAR type DOUBLE, + "! Joy score from 0 to 1. A higher score means that the text is more likely to + "! convey joy. JOY type DOUBLE, + "! Sadness score from 0 to 1. A higher score means that the text is more likely to + "! convey sadness. SADNESS type DOUBLE, end of T_EMOTION_SCORES. types: "! The author of the analyzed content. begin of T_AUTHOR, + "! Name of the author. NAME type STRING, end of T_AUTHOR. types: "! RSS or ATOM feed found on the webpage. begin of T_FEED, + "! URL of the RSS or ATOM feed. LINK type STRING, end of T_FEED. types: "! Webpage metadata, such as the author and the title of the page. begin of T_FEATURES_RESULTS_METADATA, + "! The authors of the document. AUTHORS type STANDARD TABLE OF T_AUTHOR WITH NON-UNIQUE DEFAULT KEY, + "! The publication date in the format ISO 8601. PUBLICATION_DATE type STRING, + "! The title of the document. TITLE type STRING, + "! URL of a prominent image on the webpage. IMAGE type STRING, + "! RSS/ATOM feeds found on the webpage. FEEDS type STANDARD TABLE OF T_FEED WITH NON-UNIQUE DEFAULT KEY, end of T_FEATURES_RESULTS_METADATA. types: - "! + "! No documentation available. begin of T_ENTITY_MENTION, + "! Entity mention text. TEXT type STRING, + "! Character offsets indicating the beginning and end of the mention in the + "! analyzed text. LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, + "! Confidence in the entity identification from 0 to 1. Higher values indicate + "! higher confidence. In standard entities requests, confidence is returned only + "! for English text. All entities requests that use custom models return the + "! confidence score. CONFIDENCE type DOUBLE, end of T_ENTITY_MENTION. types: "! Disambiguation information for the entity. begin of T_DISAMBIGUATION_RESULT, + "! Common entity name. NAME type STRING, + "! Link to the corresponding DBpedia resource. DBPEDIA_RESOURCE type STRING, + "! Entity subtype information. SUBTYPE type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_DISAMBIGUATION_RESULT. types: "! The important people, places, geopolitical entities and other types of entities "! in your content. begin of T_ENTITIES_RESULT, + "! Entity type. TYPE type STRING, + "! The name of the entity. TEXT type STRING, + "! Relevance score from 0 to 1. Higher values indicate greater relevance. RELEVANCE type DOUBLE, + "! Confidence in the entity identification from 0 to 1. Higher values indicate + "! higher confidence. In standard entities requests, confidence is returned only + "! for English text. All entities requests that use custom models return the + "! confidence score. CONFIDENCE type DOUBLE, + "! Entity mentions and locations. MENTIONS type STANDARD TABLE OF T_ENTITY_MENTION WITH NON-UNIQUE DEFAULT KEY, + "! How many times the entity was mentioned in the text. COUNT type INTEGER, + "! Emotion analysis results for the entity, enabled with the `emotion` option. EMOTION type T_EMOTION_SCORES, + "! Sentiment analysis results for the entity, enabled with the `sentiment` option. SENTIMENT type T_FEATURE_SENTIMENT_RESULTS, + "! Disambiguation information for the entity. DISAMBIGUATION type T_DISAMBIGUATION_RESULT, end of T_ENTITIES_RESULT. types: "! Emotion results for a specified target. begin of T_TARGETED_EMOTION_RESULTS, + "! Targeted text. TEXT type STRING, + "! The emotion results for the target. EMOTION type T_EMOTION_SCORES, end of T_TARGETED_EMOTION_RESULTS. types: "! The important keywords in the content, organized by relevance. begin of T_KEYWORDS_RESULT, + "! Number of times the keyword appears in the analyzed text. COUNT type INTEGER, + "! Relevance score from 0 to 1. Higher values indicate greater relevance. RELEVANCE type DOUBLE, + "! The keyword text. TEXT type STRING, + "! Emotion analysis results for the keyword, enabled with the `emotion` option. EMOTION type T_EMOTION_SCORES, + "! Sentiment analysis results for the keyword, enabled with the `sentiment` option. + "! SENTIMENT type T_FEATURE_SENTIMENT_RESULTS, end of T_KEYWORDS_RESULT. types: - "! + "! No documentation available. begin of T_TARGETED_SENTIMENT_RESULTS, + "! Targeted text. TEXT type STRING, + "! Sentiment score from -1 (negative) to 1 (positive). SCORE type DOUBLE, end of T_TARGETED_SENTIMENT_RESULTS. types: "! Relevant text that contributed to the categorization. begin of T_CATEGORIES_RELEVANT_TEXT, + "! Text from the analyzed source that supports the categorization. TEXT type STRING, end of T_CATEGORIES_RELEVANT_TEXT. types: "! Emotion results for the document as a whole. begin of T_DOCUMENT_EMOTION_RESULTS, + "! Emotion results for the document as a whole. EMOTION type T_EMOTION_SCORES, end of T_DOCUMENT_EMOTION_RESULTS. types: - "! + "! No documentation available. begin of T_DOCUMENT_SENTIMENT_RESULTS, + "! Indicates whether the sentiment is positive, neutral, or negative. LABEL type STRING, + "! Sentiment score from -1 (negative) to 1 (positive). SCORE type DOUBLE, end of T_DOCUMENT_SENTIMENT_RESULTS. types: "! The sentiment of the content. begin of T_SENTIMENT_RESULT, + "! The document level sentiment. DOCUMENT type T_DOCUMENT_SENTIMENT_RESULTS, + "! The targeted sentiment to analyze. TARGETS type STANDARD TABLE OF T_TARGETED_SENTIMENT_RESULTS WITH NON-UNIQUE DEFAULT KEY, end of T_SENTIMENT_RESULT. types: - "! + "! No documentation available. begin of T_TOKEN_RESULT, + "! The token as it appears in the analyzed text. TEXT type STRING, + "! The part of speech of the token. For descriptions of the values, see [Universal + "! Dependencies POS tags](https://universaldependencies.org/u/pos/). PART_OF_SPEECH type STRING, + "! Character offsets indicating the beginning and end of the token in the analyzed + "! text. LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, + "! The [lemma](https://wikipedia.org/wiki/Lemma_%28morphology%29) of the token. LEMMA type STRING, end of T_TOKEN_RESULT. types: - "! + "! No documentation available. begin of T_SENTENCE_RESULT, + "! The sentence. TEXT type STRING, + "! Character offsets indicating the beginning and end of the sentence in the + "! analyzed text. LOCATION type STANDARD TABLE OF INTEGER WITH NON-UNIQUE DEFAULT KEY, end of T_SENTENCE_RESULT. types: "! Tokens and sentences returned from syntax analysis. begin of T_SYNTAX_RESULT, + "! No documentation available. TOKENS type STANDARD TABLE OF T_TOKEN_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! No documentation available. SENTENCES type STANDARD TABLE OF T_SENTENCE_RESULT WITH NON-UNIQUE DEFAULT KEY, end of T_SYNTAX_RESULT. types: "! The general concepts referenced or alluded to in the analyzed text. begin of T_CONCEPTS_RESULT, + "! Name of the concept. TEXT type STRING, + "! Relevance score between 0 and 1. Higher scores indicate greater relevance. RELEVANCE type DOUBLE, + "! Link to the corresponding DBpedia resource. DBPEDIA_RESOURCE type STRING, end of T_CONCEPTS_RESULT. types: "! Information that helps to explain what contributed to the categories result. begin of T_CTGRS_RESULT_EXPLANATION, + "! An array of relevant text from the source that contributed to the + "! categorization. The sorted array begins with the phrase that contributed most + "! significantly to the result, followed by phrases that were less and less + "! impactful. RELEVANT_TEXT type STANDARD TABLE OF T_CATEGORIES_RELEVANT_TEXT WITH NON-UNIQUE DEFAULT KEY, end of T_CTGRS_RESULT_EXPLANATION. types: "! A categorization of the analyzed text. begin of T_CATEGORIES_RESULT, + "! The path to the category through the 5-level taxonomy hierarchy. For the + "! complete list of categories, see the [Categories + "! hierarchy](https://cloud.ibm.com/docs/services/natural-language-understanding?t + "! opic=natural-language-understanding-categories#categories-hierarchy) + "! documentation. LABEL type STRING, + "! Confidence score for the category classification. Higher values indicate greater + "! confidence. SCORE type DOUBLE, + "! Information that helps to explain what contributed to the categories result. EXPLANATION type T_CTGRS_RESULT_EXPLANATION, end of T_CATEGORIES_RESULT. types: @@ -264,89 +404,125 @@ public section. "! content. Emotion information can be returned for detected entities, keywords, "! or user-specified target phrases found in the text. begin of T_EMOTION_RESULT, + "! Emotion results for the document as a whole. DOCUMENT type T_DOCUMENT_EMOTION_RESULTS, + "! Emotion results for specified targets. TARGETS type STANDARD TABLE OF T_TARGETED_EMOTION_RESULTS WITH NON-UNIQUE DEFAULT KEY, end of T_EMOTION_RESULT. types: "! Analysis results for each requested feature. begin of T_FEATURES_RESULTS, + "! The general concepts referenced or alluded to in the analyzed text. CONCEPTS type STANDARD TABLE OF T_CONCEPTS_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! The entities detected in the analyzed text. ENTITIES type STANDARD TABLE OF T_ENTITIES_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! The keywords from the analyzed text. KEYWORDS type STANDARD TABLE OF T_KEYWORDS_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! The categories that the service assigned to the analyzed text. CATEGORIES type STANDARD TABLE OF T_CATEGORIES_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! The anger, disgust, fear, joy, or sadness conveyed by the content. EMOTION type T_EMOTION_RESULT, + "! Webpage metadata, such as the author and the title of the page. METADATA type T_FEATURES_RESULTS_METADATA, + "! The relationships between entities in the content. RELATIONS type STANDARD TABLE OF T_RELATIONS_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! Sentences parsed into `subject`, `action`, and `object` form. SEMANTIC_ROLES type STANDARD TABLE OF T_SEMANTIC_ROLES_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! The sentiment of the content. SENTIMENT type T_SENTIMENT_RESULT, + "! Tokens and sentences returned from syntax analysis. SYNTAX type T_SYNTAX_RESULT, end of T_FEATURES_RESULTS. types: "! The authors, publication date, title, prominent page image, and RSS/ATOM feeds "! of the webpage. Supports URL and HTML input types. begin of T_METADATA_RESULT, + "! The authors of the document. AUTHORS type STANDARD TABLE OF T_AUTHOR WITH NON-UNIQUE DEFAULT KEY, + "! The publication date in the format ISO 8601. PUBLICATION_DATE type STRING, + "! The title of the document. TITLE type STRING, + "! URL of a prominent image on the webpage. IMAGE type STRING, + "! RSS/ATOM feeds found on the webpage. FEEDS type STANDARD TABLE OF T_FEED WITH NON-UNIQUE DEFAULT KEY, end of T_METADATA_RESULT. types: - "! + "! No documentation available. begin of T_ERROR_RESPONSE, + "! The HTTP error status code. CODE type INTEGER, + "! A message describing the error. ERROR type STRING, end of T_ERROR_RESPONSE. types: "! Detects anger, disgust, fear, joy, or sadness that is conveyed in the content or "! by the context around target phrases specified in the targets parameter. You "! can analyze emotion for detected entities with `entities.emotion` and for - "! keywords with `keywords.emotion`. - "! + "! keywords with `keywords.emotion`.
+ "!
"! Supported languages: English. begin of T_EMOTION_OPTIONS, + "! Set this to `false` to hide document-level emotion results. DOCUMENT type BOOLEAN, + "! Emotion results will be returned for each target string that is found in the + "! document. TARGETS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_EMOTION_OPTIONS. types: "! Usage information. begin of T_USAGE, + "! Number of features used in the API call. FEATURES type INTEGER, + "! Number of text characters processed. TEXT_CHARACTERS type INTEGER, + "! Number of 10,000-character units processed. TEXT_UNITS type INTEGER, end of T_USAGE. types: "! Analyzes the general sentiment of your content or the sentiment toward specific "! target phrases. You can analyze sentiment for detected entities with - "! `entities.sentiment` and for keywords with `keywords.sentiment`. - "! + "! `entities.sentiment` and for keywords with `keywords.sentiment`.
+ "!
"! Supported languages: Arabic, English, French, German, Italian, Japanese, "! Korean, Portuguese, Russian, Spanish. begin of T_SENTIMENT_OPTIONS, + "! Set this to `false` to hide document-level sentiment results. DOCUMENT type BOOLEAN, + "! Sentiment results will be returned for each target string that is found in the + "! document. TARGETS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_SENTIMENT_OPTIONS. types: - "! + "! No documentation available. begin of T_SEMANTIC_ROLES_ACTION, + "! Analyzed text that corresponds to the action. TEXT type STRING, + "! normalized version of the action. NORMALIZED type STRING, + "! No documentation available. VERB type T_SEMANTIC_ROLES_VERB, end of T_SEMANTIC_ROLES_ACTION. types: "! Tokenization options. begin of T_SYNTAX_OPTIONS_TOKENS, + "! Set this to `true` to return the lemma for each token. LEMMA type BOOLEAN, + "! Set this to `true` to return the part of speech for each token. PART_OF_SPEECH type BOOLEAN, end of T_SYNTAX_OPTIONS_TOKENS. types: - "! Returns important keywords in the content. - "! + "! Returns important keywords in the content.
+ "!
"! Supported languages: English, French, German, Italian, Japanese, Korean, "! Portuguese, Russian, Spanish, Swedish. begin of T_KEYWORDS_OPTIONS, + "! Maximum number of keywords to return. LIMIT type INTEGER, + "! Set this to `true` to return sentiment information for detected keywords. SENTIMENT type BOOLEAN, + "! Set this to `true` to analyze emotion for detected keywords. EMOTION type BOOLEAN, end of T_KEYWORDS_OPTIONS. types: @@ -354,38 +530,50 @@ public section. "! For example, an `awardedTo` relation might connect the entities "Nobel Prize" "! and "Albert Einstein". See [Relation "! types](https://cloud.ibm.com/docs/services/natural-language-understanding?topic - "! =natural-language-understanding-relations). - "! + "! =natural-language-understanding-relations).
+ "!
"! Supported languages: Arabic, English, German, Japanese, Korean, Spanish. "! Chinese, Dutch, French, Italian, and Portuguese custom models are also "! supported. begin of T_RELATIONS_OPTIONS, + "! Enter a [custom + "! model](https://cloud.ibm.com/docs/services/natural-language-understanding?topic + "! =natural-language-understanding-customizing) ID to override the default model. MODEL type STRING, end of T_RELATIONS_OPTIONS. types: "! Identifies people, cities, organizations, and other entities in the content. See "! [Entity types and "! subtypes](https://cloud.ibm.com/docs/services/natural-language-understanding?to - "! pic=natural-language-understanding-entity-types). - "! + "! pic=natural-language-understanding-entity-types).
+ "!
"! Supported languages: English, French, German, Italian, Japanese, Korean, "! Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported "! only through custom models. begin of T_ENTITIES_OPTIONS, + "! Maximum number of entities to return. LIMIT type INTEGER, + "! Set this to `true` to return locations of entity mentions. MENTIONS type BOOLEAN, + "! Enter a [custom + "! model](https://cloud.ibm.com/docs/services/natural-language-understanding?topic + "! =natural-language-understanding-customizing) ID to override the standard entity + "! detection model. MODEL type STRING, + "! Set this to `true` to return sentiment information for detected entities. SENTIMENT type BOOLEAN, + "! Set this to `true` to analyze emotion for detected keywords. EMOTION type BOOLEAN, end of T_ENTITIES_OPTIONS. types: "! Returns high-level concepts in the content. For example, a research paper about "! deep learning might return the concept, "Artificial Intelligence" although the - "! term is not mentioned. - "! + "! term is not mentioned.
+ "!
"! Supported languages: English, French, German, Italian, Japanese, Korean, "! Portuguese, Spanish. begin of T_CONCEPTS_OPTIONS, + "! Maximum number of concepts to return. LIMIT type INTEGER, end of T_CONCEPTS_OPTIONS. types: @@ -396,106 +584,247 @@ public section. types: "! Returns tokens and sentences from the input text. begin of T_SYNTAX_OPTIONS, + "! Tokenization options. TOKENS type T_SYNTAX_OPTIONS_TOKENS, + "! Set this to `true` to return sentence information. SENTENCES type BOOLEAN, end of T_SYNTAX_OPTIONS. types: "! Returns a five-level taxonomy of the content. The top three categories are - "! returned. - "! + "! returned.
+ "!
"! Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, "! Portuguese, Spanish. begin of T_CATEGORIES_OPTIONS, + "! Set this to `true` to return explanations for each categorization. **This is + "! available only for English categories.**. EXPLANATION type BOOLEAN, + "! Maximum number of categories to return. LIMIT type INTEGER, + "! Enter a [custom + "! model](https://cloud.ibm.com/docs/services/natural-language-understanding?topic + "! =natural-language-understanding-customizing) ID to override the standard + "! categories model.
+ "!
+ "! The custom categories experimental feature will be retired on 19 December 2019. + "! On that date, deployed custom categories models will no longer be accessible in + "! Natural Language Understanding. The feature will be removed from Knowledge + "! Studio on an earlier date. Custom categories models will no longer be + "! accessible in Knowledge Studio on 17 December 2019. MODEL type STRING, end of T_CATEGORIES_OPTIONS. types: "! Analysis features and options. begin of T_FEATURES, + "! Returns high-level concepts in the content. For example, a research paper about + "! deep learning might return the concept, "Artificial Intelligence" although the + "! term is not mentioned.
+ "!
+ "! Supported languages: English, French, German, Italian, Japanese, Korean, + "! Portuguese, Spanish. CONCEPTS type T_CONCEPTS_OPTIONS, + "! Detects anger, disgust, fear, joy, or sadness that is conveyed in the content or + "! by the context around target phrases specified in the targets parameter. You + "! can analyze emotion for detected entities with `entities.emotion` and for + "! keywords with `keywords.emotion`.
+ "!
+ "! Supported languages: English. EMOTION type T_EMOTION_OPTIONS, + "! Identifies people, cities, organizations, and other entities in the content. See + "! [Entity types and + "! subtypes](https://cloud.ibm.com/docs/services/natural-language-understanding?to + "! pic=natural-language-understanding-entity-types).
+ "!
+ "! Supported languages: English, French, German, Italian, Japanese, Korean, + "! Portuguese, Russian, Spanish, Swedish. Arabic, Chinese, and Dutch are supported + "! only through custom models. ENTITIES type T_ENTITIES_OPTIONS, + "! Returns important keywords in the content.
+ "!
+ "! Supported languages: English, French, German, Italian, Japanese, Korean, + "! Portuguese, Russian, Spanish, Swedish. KEYWORDS type T_KEYWORDS_OPTIONS, + "! Returns information from the document, including author name, title, RSS/ATOM + "! feeds, prominent page image, and publication date. Supports URL and HTML input + "! types only. METADATA type T_METADATA_OPTIONS, + "! Recognizes when two entities are related and identifies the type of relation. + "! For example, an `awardedTo` relation might connect the entities "Nobel Prize" + "! and "Albert Einstein". See [Relation + "! types](https://cloud.ibm.com/docs/services/natural-language-understanding?topic + "! =natural-language-understanding-relations).
+ "!
+ "! Supported languages: Arabic, English, German, Japanese, Korean, Spanish. + "! Chinese, Dutch, French, Italian, and Portuguese custom models are also + "! supported. RELATIONS type T_RELATIONS_OPTIONS, + "! Parses sentences into subject, action, and object form.
+ "!
+ "! Supported languages: English, German, Japanese, Korean, Spanish. SEMANTIC_ROLES type T_SEMANTIC_ROLES_OPTIONS, + "! Analyzes the general sentiment of your content or the sentiment toward specific + "! target phrases. You can analyze sentiment for detected entities with + "! `entities.sentiment` and for keywords with `keywords.sentiment`.
+ "!
+ "! Supported languages: Arabic, English, French, German, Italian, Japanese, + "! Korean, Portuguese, Russian, Spanish. SENTIMENT type T_SENTIMENT_OPTIONS, + "! Returns a five-level taxonomy of the content. The top three categories are + "! returned.
+ "!
+ "! Supported languages: Arabic, English, French, German, Italian, Japanese, Korean, + "! Portuguese, Spanish. CATEGORIES type T_CATEGORIES_OPTIONS, + "! Returns tokens and sentences from the input text. SYNTAX type T_SYNTAX_OPTIONS, end of T_FEATURES. types: "! Webpage metadata, such as the author and the title of the page. begin of T_ANALYSIS_RESULTS_METADATA, + "! The authors of the document. AUTHORS type STANDARD TABLE OF T_AUTHOR WITH NON-UNIQUE DEFAULT KEY, + "! The publication date in the format ISO 8601. PUBLICATION_DATE type STRING, + "! The title of the document. TITLE type STRING, + "! URL of a prominent image on the webpage. IMAGE type STRING, + "! RSS/ATOM feeds found on the webpage. FEEDS type STANDARD TABLE OF T_FEED WITH NON-UNIQUE DEFAULT KEY, end of T_ANALYSIS_RESULTS_METADATA. types: "! API usage information for the request. begin of T_ANALYSIS_RESULTS_USAGE, + "! Number of features used in the API call. FEATURES type INTEGER, + "! Number of text characters processed. TEXT_CHARACTERS type INTEGER, + "! Number of 10,000-character units processed. TEXT_UNITS type INTEGER, end of T_ANALYSIS_RESULTS_USAGE. types: "! Results of the analysis, organized by feature. begin of T_ANALYSIS_RESULTS, + "! Language used to analyze the text. LANGUAGE type STRING, + "! Text that was used in the analysis. ANALYZED_TEXT type STRING, + "! URL of the webpage that was analyzed. RETRIEVED_URL type STRING, + "! API usage information for the request. USAGE type T_ANALYSIS_RESULTS_USAGE, + "! The general concepts referenced or alluded to in the analyzed text. CONCEPTS type STANDARD TABLE OF T_CONCEPTS_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! The entities detected in the analyzed text. ENTITIES type STANDARD TABLE OF T_ENTITIES_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! The keywords from the analyzed text. KEYWORDS type STANDARD TABLE OF T_KEYWORDS_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! The categories that the service assigned to the analyzed text. CATEGORIES type STANDARD TABLE OF T_CATEGORIES_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! The anger, disgust, fear, joy, or sadness conveyed by the content. EMOTION type T_EMOTION_RESULT, + "! Webpage metadata, such as the author and the title of the page. METADATA type T_ANALYSIS_RESULTS_METADATA, + "! The relationships between entities in the content. RELATIONS type STANDARD TABLE OF T_RELATIONS_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! Sentences parsed into `subject`, `action`, and `object` form. SEMANTIC_ROLES type STANDARD TABLE OF T_SEMANTIC_ROLES_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! The sentiment of the content. SENTIMENT type T_SENTIMENT_RESULT, + "! Tokens and sentences returned from syntax analysis. SYNTAX type T_SYNTAX_RESULT, end of T_ANALYSIS_RESULTS. types: - "! + "! No documentation available. begin of T_SEMANTIC_ROLES_SUBJECT, + "! Text that corresponds to the subject role. TEXT type STRING, + "! An array of extracted entities. ENTITIES type STANDARD TABLE OF T_SEMANTIC_ROLES_ENTITY WITH NON-UNIQUE DEFAULT KEY, + "! An array of extracted keywords. KEYWORDS type STANDARD TABLE OF T_SEMANTIC_ROLES_KEYWORD WITH NON-UNIQUE DEFAULT KEY, end of T_SEMANTIC_ROLES_SUBJECT. types: "! Custom models that are available for entities and relations. begin of T_LIST_MODELS_RESULTS, + "! An array of available models. MODELS type STANDARD TABLE OF T_MODEL WITH NON-UNIQUE DEFAULT KEY, end of T_LIST_MODELS_RESULTS. types: - "! + "! No documentation available. begin of T_SEMANTIC_ROLES_OBJECT, + "! Object text. TEXT type STRING, + "! An array of extracted keywords. KEYWORDS type STANDARD TABLE OF T_SEMANTIC_ROLES_KEYWORD WITH NON-UNIQUE DEFAULT KEY, end of T_SEMANTIC_ROLES_OBJECT. types: "! An object containing request parameters. begin of T_PARAMETERS, + "! The plain text to analyze. One of the `text`, `html`, or `url` parameters is + "! required. TEXT type STRING, + "! The HTML file to analyze. One of the `text`, `html`, or `url` parameters is + "! required. HTML type STRING, + "! The webpage to analyze. One of the `text`, `html`, or `url` parameters is + "! required. URL type STRING, + "! Specific features to analyze the document for. FEATURES type T_FEATURES, + "! Set this to `false` to disable webpage cleaning. To learn more about webpage + "! cleaning, see the [Analyzing + "! webpages](https://cloud.ibm.com/docs/services/natural-language-understanding?to + "! pic=natural-language-understanding-analyzing-webpages) documentation. CLEAN type BOOLEAN, + "! An [XPath + "! query](https://cloud.ibm.com/docs/services/natural-language-understanding?topic + "! =natural-language-understanding-analyzing-webpages#xpath) to perform on `html` + "! or `url` input. Results of the query will be appended to the cleaned webpage + "! text before it is analyzed. To analyze only the results of the XPath query, set + "! the `clean` parameter to `false`. XPATH type STRING, + "! Whether to use raw HTML content if text cleaning fails. FALLBACK_TO_RAW type BOOLEAN, + "! Whether or not to return the analyzed text. RETURN_ANALYZED_TEXT type BOOLEAN, + "! ISO 639-1 code that specifies the language of your text. This overrides + "! automatic language detection. Language support differs depending on the + "! features you include in your analysis. See [Language + "! support](https://cloud.ibm.com/docs/services/natural-language-understanding?top + "! ic=natural-language-understanding-language-support) for more information. LANGUAGE type STRING, + "! Sets the maximum number of characters that are processed by the service. LIMIT_TEXT_CHARACTERS type INTEGER, end of T_PARAMETERS. types: "! Link to the corresponding DBpedia resource. T_DBPEDIA_RESOURCE type String. + types: + "! Metadata associated with this custom model. + begin of T_MODEL_FILE_AND_METADATA, + "! An optional name for the model. + NAME type STRING, + "! An optional map of metadata key-value pairs to store with this model. + USER_METADATA type MAP, + "! The language code of this model. + LANGUAGE type STRING, + "! An optional description of the model. + DESCRIPTION type STRING, + "! An optional version string. + VERSION type STRING, + "! ID of the Watson Knowledge Studio workspace that deployed this model to Natural + "! Language Understanding. + WORKSPACE_ID type STRING, + "! The description of the version. + VERSION_DESCRIPTION type STRING, + "! No documentation available. + FILE type FILE, + end of T_MODEL_FILE_AND_METADATA. types: "! Delete model results. begin of T_DELETE_MODEL_RESULTS, + "! model_id of the deleted model. DELETED type STRING, end of T_DELETE_MODEL_RESULTS. @@ -509,6 +838,7 @@ constants: T_SEMANTIC_ROLES_RESULT_ACTION type string value '|', T_SEMANTIC_ROLES_RESULT type string value '|', T_SEMANTIC_ROLES_OPTIONS type string value '|', + T_MODEL_METADATA type string value '|LANGUAGE|', T_RELATION_ENTITY type string value '|', T_RELATION_ARGUMENT type string value '|', T_RELATIONS_RESULT type string value '|', @@ -557,6 +887,7 @@ constants: T_LIST_MODELS_RESULTS type string value '|', T_SEMANTIC_ROLES_OBJECT type string value '|', T_PARAMETERS type string value '|FEATURES|', + T_MODEL_FILE_AND_METADATA type string value '|LANGUAGE|FILE|', T_DELETE_MODEL_RESULTS type string value '|', __DUMMY type string value SPACE, end of C_REQUIRED_FIELDS . @@ -592,6 +923,10 @@ constants: VERSION type string value 'version', VERSION_DESCRIPTION type string value 'version_description', CREATED type string value 'created', + NAME type string value 'name', + USER_METADATA type string value 'user_metadata', + INNER type string value 'inner', + FILE type string value 'file', ANALYZED_TEXT type string value 'analyzed_text', RETRIEVED_URL type string value 'retrieved_url', USAGE type string value 'usage', @@ -600,7 +935,6 @@ constants: TEXT_UNITS type string value 'text_units', RELEVANCE type string value 'relevance', DBPEDIA_RESOURCE type string value 'dbpedia_resource', - NAME type string value 'name', SUBTYPE type string value 'subtype', TYPE type string value 'type', CONFIDENCE type string value 'confidence', @@ -655,15 +989,16 @@ constants: "! Analyze text. "! - "! @parameter I_parameters | + "! @parameter I_PARAMETERS | "! An object containing request parameters. The `features` object and one of the "! `text`, `html`, or `url` attributes are required. "! @parameter E_RESPONSE | "! Service return value of type T_ANALYSIS_RESULTS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ANALYZE importing - !I_parameters type T_PARAMETERS + !I_PARAMETERS type T_PARAMETERS !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -675,6 +1010,7 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_LIST_MODELS_RESULTS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_MODELS importing @@ -685,14 +1021,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete model. "! - "! @parameter I_model_id | + "! @parameter I_MODEL_ID | "! Model ID of the model to delete. "! @parameter E_RESPONSE | "! Service return value of type T_DELETE_MODEL_RESULTS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_MODEL importing - !I_model_id type STRING + !I_MODEL_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_DELETE_MODEL_RESULTS @@ -735,7 +1072,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -776,7 +1113,7 @@ endmethod. * +--------------------------------------------------------------------------------------
method get_sdk_version_date. - e_sdk_version_date = '20191002122846'. + e_sdk_version_date = '20200210092822'. endmethod. @@ -785,7 +1122,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_NAT_LANG_UNDRSTND_V1->ANALYZE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_parameters TYPE T_PARAMETERS +* | [--->] I_PARAMETERS TYPE T_PARAMETERS * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ANALYSIS_RESULTS @@ -822,20 +1159,20 @@ method ANALYZE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_parameters ). + lv_datatype = get_datatype( i_PARAMETERS ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_parameters i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_PARAMETERS i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'parameters' i_value = i_parameters ). + lv_bodyparam = abap_to_json( i_name = 'parameters' i_value = i_PARAMETERS ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_parameters to . + assign i_PARAMETERS to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -916,7 +1253,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_NAT_LANG_UNDRSTND_V1->DELETE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_model_id TYPE STRING +* | [--->] I_MODEL_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_DELETE_MODEL_RESULTS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -931,7 +1268,7 @@ method DELETE_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/models/{model_id}'. - replace all occurrences of `{model_id}` in ls_request_prop-url-path with i_model_id ignoring case. + replace all occurrences of `{model_id}` in ls_request_prop-url-path with i_MODEL_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. diff --git a/src/zcl_ibmc_personal_insights_v3.clas.abap b/src/zcl_ibmc_personal_insights_v3.clas.abap index 870b7a8..c892aae 100644 --- a/src/zcl_ibmc_personal_insights_v3.clas.abap +++ b/src/zcl_ibmc_personal_insights_v3.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,21 +17,21 @@ "! communications. The service uses linguistic analytics to infer individuals' "! intrinsic personality characteristics, including Big Five, Needs, and Values, "! from digital communications such as email, text messages, tweets, and forum -"! posts. -"! +"! posts.
+"!
"! The service can automatically infer, from potentially noisy social media, "! portraits of individuals that reflect their personality characteristics. The "! service can infer consumption preferences based on the results of its analysis -"! and, for JSON content that is timestamped, can report temporal behavior. +"! and, for JSON content that is timestamped, can report temporal behavior.
"! * For information about the meaning of the models that the service uses to "! describe personality characteristics, see [Personality "! models](https://cloud.ibm.com/docs/services/personality-insights?topic=personal -"! ity-insights-models#models). +"! ity-insights-models#models).
"! * For information about the meaning of the consumption preferences, see "! [Consumption "! preferences](https://cloud.ibm.com/docs/services/personality-insights?topic=per -"! sonality-insights-preferences#preferences). -"! +"! sonality-insights-preferences#preferences).
+"!
"! **Note:** Request logging is disabled for the Personality Insights service. "! Regardless of whether you set the `X-Watson-Learning-Opt-Out` request header, "! the service does not log or retain data from requests and responses.
@@ -44,66 +44,182 @@ public section. types: "! The characteristics that the service inferred from the input content. begin of T_TRAIT, + "! The unique, non-localized identifier of the characteristic to which the results + "! pertain. IDs have the form
+ "! * `big5_{characteristic}` for Big Five personality dimensions
+ "! * `facet_{characteristic}` for Big Five personality facets
+ "! * `need_{characteristic}` for Needs
+ "! *`value_{characteristic}` for Values. TRAIT_ID type STRING, + "! The user-visible, localized name of the characteristic. NAME type STRING, + "! The category of the characteristic: `personality` for Big Five personality + "! characteristics, `needs` for Needs, and `values` for Values. CATEGORY type STRING, + "! The normalized percentile score for the characteristic. The range is 0 to 1. For + "! example, if the percentage for Openness is 0.60, the author scored in the 60th + "! percentile; the author is more open than 59 percent of the population and less + "! open than 39 percent of the population. PERCENTILE type DOUBLE, + "! The raw score for the characteristic. The range is 0 to 1. A higher score + "! generally indicates a greater likelihood that the author has that + "! characteristic, but raw scores must be considered in aggregate: The range of + "! values in practice might be much smaller than 0 to 1, so an individual score + "! must be considered in the context of the overall scores and their range.
+ "!
+ "! The raw score is computed based on the input and the service model; it is not + "! normalized or compared with a sample population. The raw score enables + "! comparison of the results against a different sampling population and with a + "! custom normalization approach. RAW_SCORE type DOUBLE, + "! **`2017-10-13`**: Indicates whether the characteristic is meaningful for the input + "! ** language. The field is always `true` for all characteristics of English, + "! ** Spanish, and Japanese input. The field is `false` for the subset of + "! ** characteristics of Arabic and Korean input for which the service's models are + "! ** unable to generate meaningful results. **`2016-10-19`**: Not returned. SIGNIFICANT type BOOLEAN, + "! For `personality` (Big Five) dimensions, more detailed results for the facets of + "! each dimension as inferred from the input text. CHILDREN type STANDARD TABLE OF DATA_REFERENCE WITH NON-UNIQUE DEFAULT KEY, end of T_TRAIT. types: "! The temporal behavior for the input content. begin of T_BEHAVIOR, + "! The unique, non-localized identifier of the characteristic to which the results + "! pertain. IDs have the form `behavior_{value}`. TRAIT_ID type STRING, + "! The user-visible, localized name of the characteristic. NAME type STRING, + "! The category of the characteristic: `behavior` for temporal data. CATEGORY type STRING, + "! For JSON content that is timestamped, the percentage of timestamped input data + "! that occurred during that day of the week or hour of the day. The range is 0 to + "! 1. PERCENTAGE type DOUBLE, end of T_BEHAVIOR. types: "! A consumption preference that the service inferred from the input content. begin of T_CONSUMPTION_PREFERENCES, + "! The unique, non-localized identifier of the consumption preference to which the + "! results pertain. IDs have the form + "! `consumption_preferences_{preference}`. CONSUMPTION_PREFERENCE_ID type STRING, + "! The user-visible, localized name of the consumption preference. NAME type STRING, + "! The score for the consumption preference:
+ "! * `0.0`: Unlikely
+ "! * `0.5`: Neutral
+ "! * `1.0`: Likely
+ "!
+ "! The scores for some preferences are binary and do not allow a neutral value. The + "! score is an indication of preference based on the results inferred from the + "! input text, not a normalized percentile. SCORE type DOUBLE, end of T_CONSUMPTION_PREFERENCES. types: "! A warning message that is associated with the input content. begin of T_WARNING, + "! The identifier of the warning message. WARNING_ID type STRING, + "! The message associated with the `warning_id`:
+ "! * `WORD_COUNT_MESSAGE`: "There were {number} words in the input. We + "! need a minimum of 600, preferably 1,200 or more, to compute statistically + "! significant estimates."
+ "! * `JSON_AS_TEXT`: "Request input was processed as text/plain as indicated, + "! however detected a JSON input. Did you mean application/json?"
+ "! * `CONTENT_TRUNCATED`: "For maximum accuracy while also optimizing processing + "! time, only the first 250KB of input text (excluding markup) was analyzed. + "! Accuracy levels off at approximately 3,000 words so this did not affect the + "! accuracy of the profile."
+ "! * `PARTIAL_TEXT_USED`, "The text provided to compute the profile was trimmed for + "! performance reasons. This action does not affect the accuracy of the output, as + "! not all of the input text was required." Applies only when Arabic input text + "! exceeds a threshold at which additional words do not contribute to the accuracy + "! of the profile. MESSAGE type STRING, end of T_WARNING. types: "! The consumption preferences that the service inferred from the input content. begin of T_CNSMPTN_PREFERENCES_CATEGORY, + "! The unique, non-localized identifier of the consumption preferences category to + "! which the results pertain. IDs have the form + "! `consumption_preferences_{category}`. CNSMPTN_PREFERENCE_CATEGORY_ID type STRING, + "! The user-visible name of the consumption preferences category. NAME type STRING, + "! Detailed results inferred from the input text for the individual preferences of + "! the category. CONSUMPTION_PREFERENCES type STANDARD TABLE OF T_CONSUMPTION_PREFERENCES WITH NON-UNIQUE DEFAULT KEY, end of T_CNSMPTN_PREFERENCES_CATEGORY. types: "! The personality profile that the service generated for the input content. begin of T_PROFILE, + "! The language model that was used to process the input. PROCESSED_LANGUAGE type STRING, + "! The number of words from the input that were used to produce the profile. WORD_COUNT type INTEGER, + "! When guidance is appropriate, a string that provides a message that indicates + "! the number of words found and where that value falls in the range of required + "! or suggested number of words. WORD_COUNT_MESSAGE type STRING, + "! A recursive array of `Trait` objects that provides detailed results for the Big + "! Five personality characteristics (dimensions and facets) inferred from the + "! input text. PERSONALITY type STANDARD TABLE OF T_TRAIT WITH NON-UNIQUE DEFAULT KEY, + "! Detailed results for the Needs characteristics inferred from the input text. NEEDS type STANDARD TABLE OF T_TRAIT WITH NON-UNIQUE DEFAULT KEY, + "! Detailed results for the Values characteristics inferred from the input text. VALUES type STANDARD TABLE OF T_TRAIT WITH NON-UNIQUE DEFAULT KEY, + "! For JSON content that is timestamped, detailed results about the social behavior + "! disclosed by the input in terms of temporal characteristics. The results + "! include information about the distribution of the content over the days of the + "! week and the hours of the day. BEHAVIOR type STANDARD TABLE OF T_BEHAVIOR WITH NON-UNIQUE DEFAULT KEY, + "! If the **consumption_preferences** parameter is `true`, detailed results for + "! each category of consumption preferences. Each element of the array provides + "! information inferred from the input text for the individual preferences of that + "! category. CONSUMPTION_PREFERENCES type STANDARD TABLE OF T_CNSMPTN_PREFERENCES_CATEGORY WITH NON-UNIQUE DEFAULT KEY, + "! An array of warning messages that are associated with the input text for the + "! request. The array is empty if the input generated no warnings. WARNINGS type STANDARD TABLE OF T_WARNING WITH NON-UNIQUE DEFAULT KEY, end of T_PROFILE. types: "! An input content item that the service is to analyze. begin of T_CONTENT_ITEM, + "! The content that is to be analyzed. The service supports up to 20 MB of content + "! for all `ContentItem` objects combined. CONTENT type STRING, + "! A unique identifier for this content item. ID type STRING, + "! A timestamp that identifies when this content was created. Specify a value in + "! milliseconds since the UNIX Epoch (January 1, 1970, at 0:00 UTC). Required only + "! for results that include temporal behavior data. CREATED type LONG, + "! A timestamp that identifies when this content was last updated. Specify a value + "! in milliseconds since the UNIX Epoch (January 1, 1970, at 0:00 UTC). Required + "! only for results that include temporal behavior data. UPDATED type LONG, + "! The MIME type of the content. The default is plain text. The tags are stripped + "! from HTML content before it is analyzed; plain text is processed as submitted. CONTENTTYPE type STRING, + "! The language identifier (two-letter ISO 639-1 identifier) for the language of + "! the content item. The default is `en` (English). Regional variants are treated + "! as their parent language; for example, `en-US` is interpreted as `en`. A + "! language specified with the **Content-Type** parameter overrides the value of + "! this parameter; any content items that specify a different language are + "! ignored. Omit the **Content-Type** parameter to base the language on the most + "! prevalent specification among the content items; again, content items that + "! specify a different language are ignored. You can specify any combination of + "! languages for the input and response content. LANGUAGE type STRING, + "! The unique ID of the parent content item for this item. Used to identify + "! hierarchical relationships between posts/replies, messages/replies, and so on. PARENTID type STRING, + "! Indicates whether this content item is a reply to another content item. REPLY type BOOLEAN, + "! Indicates whether this content item is a forwarded/copied version of another + "! content item. FORWARD type BOOLEAN, end of T_CONTENT_ITEM. types: @@ -113,14 +229,21 @@ public section. types: "! The error response from a failed request. begin of T_ERROR_MODEL, + "! The HTTP status code. CODE type INTEGER, + "! A service-specific error code. SUB_CODE type STRING, + "! A description of the error. ERROR type STRING, + "! A URL to documentation explaining the cause and possibly solutions for the + "! error. HELP type STRING, end of T_ERROR_MODEL. types: "! The full input content that the service is to analyze. begin of T_CONTENT, + "! An array of `ContentItem` objects that provides the text that is to be analyzed. + "! CONTENTITEMS type STANDARD TABLE OF T_CONTENT_ITEM WITH NON-UNIQUE DEFAULT KEY, end of T_CONTENT. @@ -191,20 +314,20 @@ constants: "! Get profile. "! - "! @parameter I_content | + "! @parameter I_CONTENT | "! A maximum of 20 MB of content to analyze, though the service requires much less "! text; for more information, see [Providing sufficient "! input](https://cloud.ibm.com/docs/services/personality-insights?topic=personali "! ty-insights-input#sufficient). For JSON input, provide an object of type "! `Content`. - "! @parameter I_Content_Type | + "! @parameter I_CONTENT_TYPE | "! The type of the input. For more information, see **Content types** in the method "! description. - "! @parameter I_Content_Language | + "! @parameter I_CONTENT_LANGUAGE | "! The language of the input text for the request: Arabic, English, Japanese, "! Korean, or Spanish. Regional variants are treated as their parent language; for - "! example, `en-US` is interpreted as `en`. - "! + "! example, `en-US` is interpreted as `en`.
+ "!
"! The effect of the **Content-Language** parameter depends on the **Content-Type** "! parameter. When **Content-Type** is `text/plain` or `text/html`, "! **Content-Language** is the only way to specify the language. When @@ -214,34 +337,35 @@ constants: "! parameter to base the language on the specification of the content items. You "! can specify any combination of languages for **Content-Language** and "! **Accept-Language**. - "! @parameter I_Accept_Language | + "! @parameter I_ACCEPT_LANGUAGE | "! The desired language of the response. For two-character arguments, regional "! variants are treated as their parent language; for example, `en-US` is "! interpreted as `en`. You can specify any combination of languages for the input "! and response content. - "! @parameter I_raw_scores | + "! @parameter I_RAW_SCORES | "! Indicates whether a raw score in addition to a normalized percentile is returned "! for each characteristic; raw scores are not compared with a sample population. "! By default, only normalized percentiles are returned. - "! @parameter I_csv_headers | + "! @parameter I_CSV_HEADERS | "! Indicates whether column labels are returned with a CSV response. By default, no "! column labels are returned. Applies only when the response type is CSV "! (`text/csv`). - "! @parameter I_consumption_preferences | + "! @parameter I_CONSUMPTION_PREFERENCES | "! Indicates whether consumption preferences are returned with the results. By "! default, no consumption preferences are returned. "! @parameter E_RESPONSE | "! Service return value of type T_PROFILE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods PROFILE importing - !I_content type T_CONTENT - !I_Content_Type type STRING default 'text/plain' - !I_Content_Language type STRING default 'en' - !I_Accept_Language type STRING default 'en' - !I_raw_scores type BOOLEAN default c_boolean_false - !I_csv_headers type BOOLEAN default c_boolean_false - !I_consumption_preferences type BOOLEAN default c_boolean_false + !I_CONTENT type T_CONTENT + !I_CONTENT_TYPE type STRING default 'text/plain' + !I_CONTENT_LANGUAGE type STRING default 'en' + !I_ACCEPT_LANGUAGE type STRING default 'en' + !I_RAW_SCORES type BOOLEAN default c_boolean_false + !I_CSV_HEADERS type BOOLEAN default c_boolean_false + !I_CONSUMPTION_PREFERENCES type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_PROFILE @@ -249,20 +373,20 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get profile as csv. "! - "! @parameter I_content | + "! @parameter I_CONTENT | "! A maximum of 20 MB of content to analyze, though the service requires much less "! text; for more information, see [Providing sufficient "! input](https://cloud.ibm.com/docs/services/personality-insights?topic=personali "! ty-insights-input#sufficient). For JSON input, provide an object of type "! `Content`. - "! @parameter I_Content_Type | + "! @parameter I_CONTENT_TYPE | "! The type of the input. For more information, see **Content types** in the method "! description. - "! @parameter I_Content_Language | + "! @parameter I_CONTENT_LANGUAGE | "! The language of the input text for the request: Arabic, English, Japanese, "! Korean, or Spanish. Regional variants are treated as their parent language; for - "! example, `en-US` is interpreted as `en`. - "! + "! example, `en-US` is interpreted as `en`.
+ "!
"! The effect of the **Content-Language** parameter depends on the **Content-Type** "! parameter. When **Content-Type** is `text/plain` or `text/html`, "! **Content-Language** is the only way to specify the language. When @@ -272,33 +396,38 @@ constants: "! parameter to base the language on the specification of the content items. You "! can specify any combination of languages for **Content-Language** and "! **Accept-Language**. - "! @parameter I_Accept_Language | + "! @parameter I_ACCEPT_LANGUAGE | "! The desired language of the response. For two-character arguments, regional "! variants are treated as their parent language; for example, `en-US` is "! interpreted as `en`. You can specify any combination of languages for the input "! and response content. - "! @parameter I_raw_scores | + "! @parameter I_RAW_SCORES | "! Indicates whether a raw score in addition to a normalized percentile is returned "! for each characteristic; raw scores are not compared with a sample population. "! By default, only normalized percentiles are returned. - "! @parameter I_csv_headers | + "! @parameter I_CSV_HEADERS | "! Indicates whether column labels are returned with a CSV response. By default, no "! column labels are returned. Applies only when the response type is CSV "! (`text/csv`). - "! @parameter I_consumption_preferences | + "! @parameter I_CONSUMPTION_PREFERENCES | "! Indicates whether consumption preferences are returned with the results. By "! default, no consumption preferences are returned. + "! @parameter E_RESPONSE | + "! Service return value of type STRING + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods PROFILE_AS_CSV importing - !I_content type T_CONTENT - !I_Content_Type type STRING default 'text/plain' - !I_Content_Language type STRING default 'en' - !I_Accept_Language type STRING default 'en' - !I_raw_scores type BOOLEAN default c_boolean_false - !I_csv_headers type BOOLEAN default c_boolean_false - !I_consumption_preferences type BOOLEAN default c_boolean_false + !I_CONTENT type T_CONTENT + !I_CONTENT_TYPE type STRING default 'text/plain' + !I_CONTENT_LANGUAGE type STRING default 'en' + !I_ACCEPT_LANGUAGE type STRING default 'en' + !I_RAW_SCORES type BOOLEAN default c_boolean_false + !I_CSV_HEADERS type BOOLEAN default c_boolean_false + !I_CONSUMPTION_PREFERENCES type BOOLEAN default c_boolean_false !I_accept type string default 'text/csv' + exporting + !E_RESPONSE type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . @@ -338,7 +467,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -374,7 +503,7 @@ endmethod. * +--------------------------------------------------------------------------------------
method get_sdk_version_date. - e_sdk_version_date = '20191002122847'. + e_sdk_version_date = '20200210092823'. endmethod. @@ -383,13 +512,13 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_PERSONAL_INSIGHTS_V3->PROFILE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_content TYPE T_CONTENT -* | [--->] I_Content_Type TYPE STRING (default ='text/plain') -* | [--->] I_Content_Language TYPE STRING (default ='en') -* | [--->] I_Accept_Language TYPE STRING (default ='en') -* | [--->] I_raw_scores TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_csv_headers TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_consumption_preferences TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_CONTENT TYPE T_CONTENT +* | [--->] I_CONTENT_TYPE TYPE STRING (default ='text/plain') +* | [--->] I_CONTENT_LANGUAGE TYPE STRING (default ='en') +* | [--->] I_ACCEPT_LANGUAGE TYPE STRING (default ='en') +* | [--->] I_RAW_SCORES TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_CSV_HEADERS TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_CONSUMPTION_PREFERENCES TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_PROFILE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -415,8 +544,8 @@ method PROFILE. data: lv_queryparam type string. - if i_raw_scores is supplied. - lv_queryparam = i_raw_scores. + if i_RAW_SCORES is supplied. + lv_queryparam = i_RAW_SCORES. add_query_parameter( exporting i_parameter = `raw_scores` @@ -426,8 +555,8 @@ method PROFILE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_csv_headers is supplied. - lv_queryparam = i_csv_headers. + if i_CSV_HEADERS is supplied. + lv_queryparam = i_CSV_HEADERS. add_query_parameter( exporting i_parameter = `csv_headers` @@ -437,8 +566,8 @@ method PROFILE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_consumption_preferences is supplied. - lv_queryparam = i_consumption_preferences. + if i_CONSUMPTION_PREFERENCES is supplied. + lv_queryparam = i_CONSUMPTION_PREFERENCES. add_query_parameter( exporting i_parameter = `consumption_preferences` @@ -452,12 +581,12 @@ method PROFILE. data: lv_headerparam type string ##NEEDED. - if i_Content_Type is supplied. - ls_request_prop-header_content_type = I_Content_Type. + if i_CONTENT_TYPE is supplied. + ls_request_prop-header_content_type = I_CONTENT_TYPE. endif. - if i_Content_Language is supplied. - lv_headerparam = I_Content_Language. + if i_CONTENT_LANGUAGE is supplied. + lv_headerparam = I_CONTENT_LANGUAGE. add_header_parameter( exporting i_parameter = 'Content-Language' @@ -466,8 +595,8 @@ method PROFILE. c_headers = ls_request_prop-headers ) ##NO_TEXT. endif. - if i_Accept_Language is supplied. - lv_headerparam = I_Accept_Language. + if i_ACCEPT_LANGUAGE is supplied. + lv_headerparam = I_ACCEPT_LANGUAGE. add_header_parameter( exporting i_parameter = 'Accept-Language' @@ -486,20 +615,20 @@ method PROFILE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_content ). + lv_datatype = get_datatype( i_CONTENT ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_content i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_CONTENT i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'content' i_value = i_content ). + lv_bodyparam = abap_to_json( i_name = 'content' i_value = i_CONTENT ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_content to . + assign i_CONTENT to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -533,14 +662,15 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_PERSONAL_INSIGHTS_V3->PROFILE_AS_CSV * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_content TYPE T_CONTENT -* | [--->] I_Content_Type TYPE STRING (default ='text/plain') -* | [--->] I_Content_Language TYPE STRING (default ='en') -* | [--->] I_Accept_Language TYPE STRING (default ='en') -* | [--->] I_raw_scores TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_csv_headers TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_consumption_preferences TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_CONTENT TYPE T_CONTENT +* | [--->] I_CONTENT_TYPE TYPE STRING (default ='text/plain') +* | [--->] I_CONTENT_LANGUAGE TYPE STRING (default ='en') +* | [--->] I_ACCEPT_LANGUAGE TYPE STRING (default ='en') +* | [--->] I_RAW_SCORES TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_CSV_HEADERS TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_CONSUMPTION_PREFERENCES TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='text/csv') +* | [<---] E_RESPONSE TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method PROFILE_AS_CSV. @@ -564,8 +694,8 @@ method PROFILE_AS_CSV. data: lv_queryparam type string. - if i_raw_scores is supplied. - lv_queryparam = i_raw_scores. + if i_RAW_SCORES is supplied. + lv_queryparam = i_RAW_SCORES. add_query_parameter( exporting i_parameter = `raw_scores` @@ -575,8 +705,8 @@ method PROFILE_AS_CSV. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_csv_headers is supplied. - lv_queryparam = i_csv_headers. + if i_CSV_HEADERS is supplied. + lv_queryparam = i_CSV_HEADERS. add_query_parameter( exporting i_parameter = `csv_headers` @@ -586,8 +716,8 @@ method PROFILE_AS_CSV. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_consumption_preferences is supplied. - lv_queryparam = i_consumption_preferences. + if i_CONSUMPTION_PREFERENCES is supplied. + lv_queryparam = i_CONSUMPTION_PREFERENCES. add_query_parameter( exporting i_parameter = `consumption_preferences` @@ -601,12 +731,12 @@ method PROFILE_AS_CSV. data: lv_headerparam type string ##NEEDED. - if i_Content_Type is supplied. - ls_request_prop-header_content_type = I_Content_Type. + if i_CONTENT_TYPE is supplied. + ls_request_prop-header_content_type = I_CONTENT_TYPE. endif. - if i_Content_Language is supplied. - lv_headerparam = I_Content_Language. + if i_CONTENT_LANGUAGE is supplied. + lv_headerparam = I_CONTENT_LANGUAGE. add_header_parameter( exporting i_parameter = 'Content-Language' @@ -615,8 +745,8 @@ method PROFILE_AS_CSV. c_headers = ls_request_prop-headers ) ##NO_TEXT. endif. - if i_Accept_Language is supplied. - lv_headerparam = I_Accept_Language. + if i_ACCEPT_LANGUAGE is supplied. + lv_headerparam = I_ACCEPT_LANGUAGE. add_header_parameter( exporting i_parameter = 'Accept-Language' @@ -635,20 +765,20 @@ method PROFILE_AS_CSV. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_content ). + lv_datatype = get_datatype( i_CONTENT ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_content i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_CONTENT i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'content' i_value = i_content ). + lv_bodyparam = abap_to_json( i_name = 'content' i_value = i_CONTENT ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_content to . + assign i_CONTENT to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -668,6 +798,8 @@ method PROFILE_AS_CSV. lo_response = HTTP_POST( i_request_prop = ls_request_prop ). + " retrieve file data + e_response = get_response_string( lo_response ). endmethod. diff --git a/src/zcl_ibmc_service.clas.abap b/src/zcl_ibmc_service.clas.abap index d3ee132..0767c32 100644 --- a/src/zcl_ibmc_service.clas.abap +++ b/src/zcl_ibmc_service.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019,2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,15 +72,8 @@ public section. end of TS_FILE_WITH_METADATA . types: TT_FILE_WITH_METADATA type standard table of TS_FILE_WITH_METADATA with non-unique default key . - types: - begin of TS_FORM_PART, - CONTENT_TYPE type STRING, - CONTENT_DISPOSITION type STRING, - CDATA type STRING, - XDATA type XSTRING, - end of TS_FORM_PART . - types: - TT_FORM_PART type standard table of TS_FORM_PART . + types TS_FORM_PART type ZIF_IBMC_SERVICE_ARCH~TS_FORM_PART . + types TT_FORM_PART type ZIF_IBMC_SERVICE_ARCH~TT_FORM_PART . constants C_BOOLEAN_FALSE type BOOLEAN value SPACE ##NO_TEXT. constants C_BOOLEAN_TRUE type BOOLEAN value 'X' ##NO_TEXT. @@ -101,6 +94,19 @@ public section. data P_DEBUG_MODE type CHAR value SPACE ##NO_TEXT. data P_VERSION type STRING . + "! Raises an exception + "! + "! @parameter I_MSGNO | Message number. + "! @parameter I_MSGV1 | Substitution for 1st placeholder in message. + "! @parameter I_MSGV2 | Substitution for 2nd placeholder in message. + "! @parameter I_MSGV3 | Substitution for 3rd placeholder in message. + "! @parameter I_MSGV4 | Substitution for 4th placeholder in message. + "! @parameter I_TEXT | Message text; specify if message number is not specified. + "! @parameter I_SUBRC | Return code being returned. + "! @parameter I_PREVIOUS | Exception that has been captured before. + "! @parameter I_HTTP_STATUS | HTTP status code if exception is triggered by HTTP error + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised. + "! class-methods RAISE_EXCEPTION importing !I_MSGNO type SY-MSGNO optional @@ -114,32 +120,88 @@ public section. !I_HTTP_STATUS type TS_HTTP_STATUS optional raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Returns field type and length of a given parameter + "! + "! @parameter I_FIELD | Field of type that is supposed to be determined. + "! @parameter E_TECHNICAL_TYPE | Technical type (= base type) of I_FIELD. + "! @parameter E_RELATIVE_TYPE | Relative type (= data type) of I_FIELD. + "! @parameter E_LENGTH | Length of type of I_FIELD. + "! + class-methods GET_FIELD_TYPE + importing + !I_FIELD type ANY + exporting + !E_TECHNICAL_TYPE type ZIF_IBMC_SERVICE_ARCH~CHAR + !E_RELATIVE_TYPE type STRING + !E_LENGTH type I . + "! Returns component names of a given structure + "! + "! @parameter I_STRUCTURE | Structure with components. + "! @parameter E_COMPONENTS | Internal table of component names. + "! + class-methods GET_COMPONENTS + importing + !I_STRUCTURE type ANY + exporting + value(E_COMPONENTS) type ZIF_IBMC_SERVICE_ARCH~TT_STRING . + "! Parses a JSON string into an ABAP structure + "! + "! @parameter I_JSON | JSON string. + "! @parameter I_DICTIONARY | Dictionary for mapping of identifier names. + "! @parameter C_ABAP | ABAP structure to be filled + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + class-methods PARSE_JSON + importing + !I_JSON type STRING + !I_DICTIONARY type ANY optional + changing + value(C_ABAP) type ANY + raising + ZCX_IBMC_SERVICE_EXCEPTION . + "! Method for internal use. + "! methods GET_REQUEST_PROP importing !I_AUTH_METHOD type STRING default C_DEFAULT returning value(E_REQUEST_PROP) type TS_REQUEST_PROP . + "! Returns data type of a given parameter + "! + "! @parameter I_FIELD | Field of type that is supposed to be determined. + "! @parameter E_DATATYPE | Technical type (= base type) of I_FIELD. + "! class-methods GET_DATATYPE importing !I_FIELD type ANY returning value(E_DATATYPE) type ZIF_IBMC_SERVICE_ARCH~CHAR . - methods ADD_FORM_PART - importing - !I_CLIENT type TS_CLIENT - !IT_FORM_PART type TT_FORM_PART - raising - ZCX_IBMC_SERVICE_EXCEPTION . + "! Unescape unicode codepoints to characters in a string, e.g. '\u0041 b \u0063' -> 'A b c' + "! + "! @parameter I_IN | String with unicode codepoints. + "! @parameter E_OUT | Unescaped string. + "! class-methods UNESCAPE_UNICODE importing !I_IN type STRING returning value(E_OUT) type STRING . + "! Returns the file extension for a mime type, e.g. 'text/plain' -> 'txt' + "! + "! @parameter I_MIME_TYPE | MIME type. + "! @parameter E_EXTENSION | File extension (without leading dot). + "! class-methods GET_FILE_EXTENSION importing value(I_MIME_TYPE) type STRING returning value(E_EXTENSION) type STRING . + "! Moves a referenced data structure to an ABAP structure + "! + "! @parameter I_DATA_REFERENCE | Reference to data object. + "! @parameter E_ABAP | ABAP structure to be filled. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! class-methods MOVE_DATA_REFERENCE_TO_ABAP importing !I_DATA_REFERENCE type DATA_REFERENCE @@ -147,6 +209,8 @@ public section. value(E_ABAP) type ANY raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Method for internal use. + "! class-methods ADD_QUERY_PARAMETER importing !I_PARAMETER type STRING @@ -154,6 +218,8 @@ public section. !I_IS_BOOLEAN type BOOLEAN default C_BOOLEAN_FALSE changing !C_URL type TS_URL . + "! Method for internal use. + "! class-methods ADD_HEADER_PARAMETER importing !I_PARAMETER type STRING @@ -161,17 +227,38 @@ public section. !I_IS_BOOLEAN type BOOLEAN default C_BOOLEAN_FALSE changing !C_HEADERS type ZIF_IBMC_SERVICE_ARCH~TS_REQUEST_PROP-HEADERS . + "! Method for internal use. + "! class-methods GET_FULL_URL importing !I_URL type TS_URL returning value(E_URL) type STRING . + "! Returns the service name. + "! + "! @parameter E_APPNAME | Name of the service. + "! methods GET_APPNAME returning value(E_APPNAME) type STRING . + "! Method for internal use. + "! class-methods NORMALIZE_URL changing !C_URL type TS_URL . + "! Extracts a JSON string from an ABAP structure. + "! + "! @parameter I_NAME | Name of component to be extracted. + "! @parameter I_VALUE | ABAP structure to be converted to JSON string. + "! @parameter I_DICTIONARY | Dictionary to be used for mapping ABAP identifiers to JSON keys. + "! @parameter I_REQUIRED_FIELDS | + "! Dictionary of required fields.
+ "! If a field is required, an initial value appears as initial value in JSON structure. + "! Otherwise it is omitted in JSON string. + "! @parameter I_LOWER_CASE | If set to C_BOOLEAN_TRUE all keys in JSON string will be lower case. + "! @parameter E_JSON | JSON string. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! class-methods ABAP_TO_JSON importing !I_NAME type STRING optional @@ -187,8 +274,22 @@ public section. !I_URL type TS_URL optional raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Class constructor. + "! + "! @parameter I_URL | URL of the service. + "! @parameter I_HOST | Host of the service. I_URL and I_HOST can be used synonymously. + "! @parameter I_PROXY_HOST | Proxy server, not applicable on SAP Cloud Platform. + "! @parameter I_PROXY_PORT | Proxy server port, not applicable on SAP Cloud Platform. + "! @parameter I_USERNAME | User name to authenticate on service. + "! @parameter I_PASSWORD | User password to authenticate on service. + "! @parameter I_APIKEY | API key password to authenticate on service. + "! @parameter I_ACCESS_TOKEN | Access token to authenticate on service. + "! @parameter I_SSL_ID | ID of PSE, not applicable on SAP Cloud Platform. + "! @parameter I_DEBUG_MODE | not used. + "! methods CONSTRUCTOR importing + !I_URL type STRING optional !I_HOST type STRING optional !I_PROXY_HOST type STRING optional !I_PROXY_PORT type STRING optional @@ -198,6 +299,8 @@ public section. !I_ACCESS_TOKEN type TS_ACCESS_TOKEN optional !I_SSL_ID type ZIF_IBMC_SERVICE_ARCH~TY_SSL_ID optional !I_DEBUG_MODE type CHAR default SPACE . + "! Method for internal use. + "! methods GET_REST_CLIENT importing !I_REQUEST_PROP type TS_REQUEST_PROP @@ -205,6 +308,8 @@ public section. value(E_CLIENT) type TS_CLIENT raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Method for internal use. + "! methods GET_ACCESS_TOKEN importing !I_REQUEST_PROP type TS_REQUEST_PROP optional @@ -212,6 +317,12 @@ public section. value(E_ACCESS_TOKEN) type TS_ACCESS_TOKEN raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Sends a HTTP DELETE request. + "! + "! @parameter I_REQUEST_PROP | Request properties. + "! @parameter E_RESPONSE | Response returned by service. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! methods HTTP_DELETE importing !I_REQUEST_PROP type TS_REQUEST_PROP @@ -219,11 +330,22 @@ public section. value(E_RESPONSE) type TO_REST_RESPONSE raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Sets an access token explicitly. + "! + "! @parameter I_ACCESS_TOKEN | Access token. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! methods SET_ACCESS_TOKEN importing !I_ACCESS_TOKEN type TS_ACCESS_TOKEN raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Sends a HTTP GET request. + "! + "! @parameter I_REQUEST_PROP | Request properties. + "! @parameter E_RESPONSE | Response returned by service. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! methods HTTP_GET importing !I_REQUEST_PROP type TS_REQUEST_PROP @@ -231,6 +353,12 @@ public section. value(E_RESPONSE) type TO_REST_RESPONSE raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Sends a HTTP POST request. + "! + "! @parameter I_REQUEST_PROP | Request properties. + "! @parameter E_RESPONSE | Response returned by service. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! methods HTTP_POST importing !I_REQUEST_PROP type TS_REQUEST_PROP @@ -238,6 +366,13 @@ public section. value(E_RESPONSE) type TO_REST_RESPONSE raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Sends a HTTP POST request with multipart body. + "! + "! @parameter I_REQUEST_PROP | Request properties. + "! @parameter IT_FORM_PART | Internal table of form parts in request body. + "! @parameter E_RESPONSE | Response returned by service. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! methods HTTP_POST_MULTIPART importing !I_REQUEST_PROP type TS_REQUEST_PROP @@ -246,6 +381,12 @@ public section. value(E_RESPONSE) type TO_REST_RESPONSE raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Sends a HTTP PUT request. + "! + "! @parameter I_REQUEST_PROP | Request properties. + "! @parameter E_RESPONSE | Response returned by service. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! methods HTTP_PUT importing !I_REQUEST_PROP type TS_REQUEST_PROP @@ -295,6 +436,7 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. lv_pattern type string, lv_str type string. field-symbols: + type any, type string, type any, type i, @@ -311,12 +453,27 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. importing e_technical_type = lv_type e_relative_type = lv_relative_type ). + if lv_type eq zif_ibmc_service_arch~c_datatype-dataref or lv_type eq zif_ibmc_service_arch~c_datatype-objectref. + if i_value is initial. + return. + endif. + assign i_value->* to . + get_field_type( + exporting + i_field = + importing + e_technical_type = lv_type + e_relative_type = lv_relative_type ). + else. + assign i_value to . + endif. + if lv_type ne zif_ibmc_service_arch~c_datatype-struct and lv_type ne zif_ibmc_service_arch~c_datatype-struct_deep and lv_type ne zif_ibmc_service_arch~c_datatype-itab. " simple type if lv_type eq 'C' or lv_type eq 'N' or lv_type eq 'g'. - lv_str = i_value. + lv_str = . if lv_str eq c_blank. " parameter is blank, not initial (i.e. null) lv_str = ''. @@ -343,26 +500,26 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. " special handling for optional parameters explicitly set to initial if lv_type eq 'I'. - assign i_value to . + assign to . if = c_i_zero. lv_json_num = '0'. exit. endif. elseif lv_type eq '8'. - assign i_value to . + assign to . if = c_i8_zero. lv_json_num = '0'. exit. endif. elseif lv_type eq 'F'. - assign i_value to . + assign to . if = c_f_zero. lv_json_num = '0'. exit. endif. endif. - lv_json_num = conv #( i_value ). + lv_json_num = conv #( ). condense lv_json_num no-gaps. enddo. lv_json = lv_json_num. @@ -373,13 +530,13 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. get_components( exporting - i_structure = i_value + i_structure = importing e_components = lt_compname ). clear lv_sep. lv_json = lv_json && `{`. loop at lt_compname assigning . - assign component of structure i_value to . + assign component of structure to . if sy-subrc <> 0. continue. endif. @@ -425,7 +582,7 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. lv_json = lv_json && `[`. clear lv_sep. - assign i_value to . + assign to . loop at assigning . lv_json_comp = abap_to_json( i_value = i_lower_case = i_lower_case i_dictionary = i_dictionary i_required_fields = i_required_fields ). lv_json = lv_json && lv_sep && lv_json_comp. @@ -454,32 +611,6 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. e_json = lv_json. endif. - - endmethod. - - - method add_form_part. - - data: - ls_form_part type ts_form_part, - lo_part type to_form_part. - - loop at it_form_part into ls_form_part. - lo_part = form_part_add( i_client = i_client ). - if not ls_form_part-content_type is initial. - form_part_set_header( i_form_part = lo_part i_name = 'Content-Type' i_value = ls_form_part-content_type ) ##NO_TEXT. - endif. - if not ls_form_part-content_disposition is initial. - form_part_set_header( i_form_part = lo_part i_name = 'Content-Disposition' i_value = ls_form_part-content_disposition ) ##NO_TEXT. - endif. - if not ls_form_part-xdata is initial. - form_part_set_xdata( i_form_part = lo_part i_data = ls_form_part-xdata ). - endif. - if not ls_form_part-cdata is initial. - form_part_set_cdata( i_form_part = lo_part i_data = ls_form_part-cdata ). - endif. - endloop. - endmethod. @@ -585,13 +716,16 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. lv_full_url type string, ls_url type ts_url, lv_strlen type i, + lv_code type string, lo_service_exception type ref to zcx_ibmc_service_exception. lv_http_status = get_http_status( i_rest_response = i_response ). - if lv_http_status-code ne '200' and " ok - lv_http_status-code ne '201' and " ok with response - lv_http_status-code ne '202' and " Accepted (asynchronous function call) - lv_http_status-code ne '204'. " Deleted + lv_code = lv_http_status-code. + shift lv_code left deleting leading space. + if lv_code ne '200' and " ok + lv_code ne '201' and " ok with response + lv_code ne '202' and " Accepted (asynchronous function call) + lv_code ne '204'. " Deleted ls_url = i_url. merge_structure( @@ -602,9 +736,9 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. lv_full_url = get_full_url( ls_url ). try. - raise_exception( + raise_exception( i_msgno = '003' " HTTP Status: &1 (&2) - i_msgv1 = lv_http_status-code + i_msgv1 = lv_code i_msgv2 = lv_http_status-reason i_msgv3 = lv_full_url i_http_status = lv_http_status ). @@ -620,9 +754,19 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. method constructor. + data: + lv_host type string. + super->constructor( ). - p_request_prop_default-url-host = i_host. + " use i_url and i_host synonymously + if not i_url is initial. + lv_host = i_url. + else. + lv_host = i_host. + endif. + + p_request_prop_default-url-host = lv_host. p_request_prop_default-username = i_username. p_request_prop_default-password = i_password. p_request_prop_default-apikey = i_apikey. @@ -667,6 +811,26 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. endmethod. + method get_components. + + data: + lo_abap_struc type ref to cl_abap_structdescr, + lt_comp type cl_abap_structdescr=>component_table. + + field-symbols: + type line of cl_abap_structdescr=>component_table. + + lo_abap_struc ?= cl_abap_structdescr=>describe_by_data( i_structure ). + lt_comp = lo_abap_struc->get_components( ). + + clear e_components[]. + loop at lt_comp assigning . + append -name to e_components. + endloop. + + endmethod. + + method get_datatype. get_field_type( @@ -678,6 +842,42 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. endmethod. + method get_field_type. + data: + lo_abap_type type ref to cl_abap_typedescr, + lo_typedescr type ref to cl_abap_typedescr. + + call method cl_abap_typedescr=>describe_by_data + exporting + p_data = i_field + receiving + p_descr_ref = lo_typedescr. + + e_technical_type = lo_typedescr->type_kind. + + if e_relative_type is requested. + if e_technical_type eq zif_ibmc_service_arch~c_datatype-objectref. + data lo_refdescr type ref to cl_abap_refdescr. + lo_refdescr ?= cl_abap_typedescr=>describe_by_data( i_field ). + lo_abap_type ?= lo_refdescr->get_referenced_type( ). + else. + lo_abap_type = cl_abap_typedescr=>describe_by_data( i_field ). + endif. + e_relative_type = lo_abap_type->get_relative_name( ). + endif. + + if e_length is requested. + if e_technical_type eq zif_ibmc_service_arch~c_datatype-c or + e_technical_type eq zif_ibmc_service_arch~c_datatype-n. + e_length = lo_typedescr->length. + else. + e_length = 0. + endif. + endif. + + endmethod. + + method get_file_extension. data: @@ -1055,56 +1255,114 @@ CLASS ZCL_IBMC_SERVICE IMPLEMENTATION. method normalize_url. - data: - lv_path_base type string value is initial, - lv_path type string, - lv_protocol type ts_url-protocol, - lv_host type ts_url-host, - lv_strlen type i, - lv_offset type i. - check not c_url is initial. - if not c_url-path_base is initial. - lv_path = c_url-path_base. - else. - lv_path = c_url-path. - endif. - - " extract host from path - if lv_path cp 'http:*' or lv_path cp 'https:*'. - find regex '(http.?:\/\/[^\/]*)' in lv_path submatches lv_host. - lv_strlen = strlen( lv_host ). - lv_path = lv_path+lv_strlen. - c_url-host = lv_host. + data(lv_protocol) = c_url-protocol. + if not lv_protocol is initial and lv_protocol np '*://'. + lv_protocol = lv_protocol && '://'. endif. - " extract protocol from host + data(lv_host) = c_url-host. if c_url-host cp 'http:*' or c_url-host cp 'https:*'. - find regex '(http.?):\/\/' in c_url-host submatches lv_protocol. - lv_strlen = strlen( lv_protocol ). - lv_strlen = lv_strlen + 3. " for :// - c_url-host = c_url-host+lv_strlen. - c_url-protocol = lv_protocol. + clear lv_protocol. + endif. + shift lv_host right deleting trailing '/'. + if not c_url-path_base is initial. + shift c_url-path_base left deleting leading '/'. + lv_host = lv_host && '/' && c_url-path_base. + shift lv_host right deleting trailing '/'. endif. + shift lv_host left deleting leading space. - " extrcat base path from host - find first occurrence of '/' in c_url-host match offset lv_offset. - if sy-subrc = 0. - lv_path_base = c_url-host+lv_offset. - c_url-host = c_url-host+0(lv_offset). + data(lv_path) = c_url-path. + if not lv_path is initial. + if lv_path np '/*'. + lv_path = '/' && lv_path. + endif. endif. - if c_url-path_base is initial. - c_url-path_base = lv_path_base. - c_url-path = lv_path. - else. - c_url-path_base = lv_path_base && lv_path. + data(lv_url_full) = lv_protocol && lv_host && lv_path. + shift lv_url_full right deleting trailing '/'. + shift lv_url_full left deleting leading space. + + clear: c_url-protocol, c_url-host, c_url-path_base, c_url-path. " do not clear other components + find regex '^(http.?:\/\/)?([^\/]*)(.*)$' in lv_url_full submatches c_url-protocol c_url-host c_url-path. + + shift c_url-protocol right deleting trailing '/'. + shift c_url-protocol right deleting trailing ':'. + shift c_url-protocol left deleting leading space. + + " split path into base_path and path + if not lv_host is initial. + find lv_host in lv_url_full match offset data(lv_offset) match length data(lv_length). + if sy-subrc = 0. + data(lv_strlen_url) = strlen( lv_url_full ). + data(lv_strlen_path) = strlen( c_url-path ). + data(lv_splitpoint) = lv_strlen_path - ( lv_strlen_url - lv_offset - lv_length ). + c_url-path_base = c_url-path+0(lv_splitpoint). + c_url-path = c_url-path+lv_splitpoint. + endif. endif. + return. + endmethod. + method PARSE_JSON. + + data: + lv_json type string, + lt_dictionary type zif_ibmc_service_arch~tt_string, + lv_dictionary type string, + lv_orgname type string, + lv_abapname type string, + lv_regex type string, + lo_json type ref to /ui2/cl_json, + lv_msg type string, + lr_exception type ref to cx_sy_move_cast_error. + field-symbols: + type string. + + if not i_json is initial. + + lv_json = i_json. + + if i_dictionary is supplied. + get_components( + exporting + i_structure = i_dictionary + importing + e_components = lt_dictionary ). + + loop at lt_dictionary into lv_dictionary. + assign component lv_dictionary of structure i_dictionary to . + lv_orgname = . + translate lv_orgname to upper case. + if lv_dictionary ne lv_orgname. + lv_regex = `"` && && `"\s*:`. + lv_abapname = `"` && lv_dictionary && `":`. + replace all occurrences of regex lv_regex in lv_json with lv_abapname. + endif. + endloop. + + endif. + + " copy code to execute /ui2/cl_json=>deserialize( exporting json = lv_json changing data = c_abap ) and catch exception + create object lo_json. + try. + lo_json->deserialize_int( exporting json = lv_json changing data = c_abap ). + catch cx_sy_move_cast_error into lr_exception. + zcl_ibmc_service=>raise_exception( + exporting + i_msgno = 20 ). + endtry. + + endif. + + endmethod. + + method raise_exception. data: diff --git a/src/zcl_ibmc_service.clas.xml b/src/zcl_ibmc_service.clas.xml index c890b4f..ededc14 100644 --- a/src/zcl_ibmc_service.clas.xml +++ b/src/zcl_ibmc_service.clas.xml @@ -12,23 +12,149 @@ X + + ZCL_IBMC_SERVICE + ABAP_TO_JSON + E + Generates a JSON string from any ABAP structure + + + ZCL_IBMC_SERVICE + ADD_HEADER_PARAMETER + E + Adds a HTTP header parameter + + + ZCL_IBMC_SERVICE + ADD_QUERY_PARAMETER + E + Adds a REST query parameter + + + ZCL_IBMC_SERVICE + CHECK_HTTP_RESPONSE + E + Throws an exception, if HTTP response indicates an error + + + ZCL_IBMC_SERVICE + CONSTRUCTOR + E + Class constructor + + + ZCL_IBMC_SERVICE + GET_ACCESS_TOKEN + E + Reads or generates an authorization token + + + ZCL_IBMC_SERVICE + GET_APPNAME + E + Returns the API or service name, resp. + + + ZCL_IBMC_SERVICE + GET_COMPONENTS + E + Returns the component names of a given structure + ZCL_IBMC_SERVICE GET_DATATYPE E Returns data type of a variable + + ZCL_IBMC_SERVICE + GET_FIELD_TYPE + E + Returns the absolute type of a field + ZCL_IBMC_SERVICE GET_FILE_EXTENSION E Returns file extension for given mime type + + ZCL_IBMC_SERVICE + GET_FULL_URL + E + Returns complete URL string + + + ZCL_IBMC_SERVICE + GET_REQUEST_PROP + E + Returns default request properties + + + ZCL_IBMC_SERVICE + GET_REST_CLIENT + E + Creates a REST client instance + + + ZCL_IBMC_SERVICE + HTTP_DELETE + E + Performs a http DELETE request + + + ZCL_IBMC_SERVICE + HTTP_GET + E + Performs a http GET request + + + ZCL_IBMC_SERVICE + HTTP_POST + E + Performs a http POST request + + + ZCL_IBMC_SERVICE + HTTP_POST_MULTIPART + E + Performs a HTTP POST request with multipart body + + + ZCL_IBMC_SERVICE + HTTP_PUT + E + Performs a http PUT request + ZCL_IBMC_SERVICE MOVE_DATA_REFERENCE_TO_ABAP E - moves type DATA_REFERENCE to ABAP structure + Moves type DATA_REFERENCE to ABAP structure + + + ZCL_IBMC_SERVICE + NORMALIZE_URL + E + Normalize URL in structure of type TS_URL + + + ZCL_IBMC_SERVICE + PARSE_JSON + E + Parses a JSON string into an ABAP structure + + + ZCL_IBMC_SERVICE + RAISE_EXCEPTION + E + Throws an exception of type ZCX_IBMC_SERVICE_EXCEPTION + + + ZCL_IBMC_SERVICE + SET_ACCESS_TOKEN + E + Sets an authorization token explicitly ZCL_IBMC_SERVICE diff --git a/src/zcl_ibmc_service_arch.clas.abap b/src/zcl_ibmc_service_arch.clas.abap index 931afd7..23f7342 100644 --- a/src/zcl_ibmc_service_arch.clas.abap +++ b/src/zcl_ibmc_service_arch.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019,2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,13 +44,6 @@ public section. class-methods GET_PROGNAME returning value(E_PROGNAME) type STRING . - class-methods GET_FIELD_TYPE - importing - !I_FIELD type ANY - exporting - !E_TECHNICAL_TYPE type ZIF_IBMC_SERVICE_ARCH~CHAR - !E_RELATIVE_TYPE type STRING - !E_LENGTH type I . class-methods BASE64_DECODE importing !I_BASE64 type STRING @@ -66,24 +59,12 @@ public section. !E_CLIENT type TS_CLIENT raising ZCX_IBMC_SERVICE_EXCEPTION . - class-methods FORM_PART_SET_CDATA - importing - !I_FORM_PART type TO_FORM_PART - !I_DATA type STRING . - class-methods FORM_PART_SET_HEADER - importing - !I_FORM_PART type TO_FORM_PART - !I_NAME type STRING - !I_VALUE type STRING . - class-methods FORM_PART_SET_XDATA - importing - !I_FORM_PART type TO_FORM_PART - !I_DATA type XSTRING . - class-methods GET_COMPONENTS + methods ADD_FORM_PART importing - !I_STRUCTURE type ANY - exporting - value(E_COMPONENTS) type ZIF_IBMC_SERVICE_ARCH~TT_STRING . + !I_CLIENT type TS_CLIENT + !IT_FORM_PART type ZIF_IBMC_SERVICE_ARCH=>TT_FORM_PART + raising + ZCX_IBMC_SERVICE_EXCEPTION . class-methods GET_DEFAULT_PROXY importing !I_URL type TS_URL optional @@ -104,11 +85,6 @@ public section. importing !I_CLIENT type TS_CLIENT !I_URI type STRING . - class-methods FORM_PART_ADD - importing - !I_CLIENT type TS_CLIENT - returning - value(E_FORM_PART) type TO_FORM_PART . class-methods EXECUTE importing !I_CLIENT type TS_CLIENT @@ -122,14 +98,6 @@ public section. !I_RESPONSE type TO_REST_RESPONSE returning value(E_DATA) type STRING . - class-methods PARSE_JSON - importing - !I_JSON type STRING - !I_DICTIONARY type ANY optional - changing - value(C_ABAP) type ANY - raising - ZCX_IBMC_SERVICE_EXCEPTION . class-methods SET_REQUEST_BODY_CDATA importing !I_CLIENT type TS_CLIENT @@ -138,11 +106,6 @@ public section. importing !I_CLIENT type TS_CLIENT !I_DATA type XSTRING . - class-methods ESCAPE_URL - importing - !I_UNESCAPED type STRING - returning - value(E_ESCAPED) type STRING . class-methods GET_RESPONSE_BINARY importing !I_RESPONSE type TO_REST_RESPONSE @@ -174,6 +137,36 @@ ENDCLASS. CLASS ZCL_IBMC_SERVICE_ARCH IMPLEMENTATION. + method add_form_part. + + data: + ls_form_part type zif_ibmc_service_arch=>ts_form_part, + lo_part type to_form_part. + + loop at it_form_part into ls_form_part. + lo_part = i_client-http->request->if_http_entity~add_multipart( ). "form_part_add( i_client = i_client ). + if not ls_form_part-content_type is initial. + lo_part->set_header_field( name = 'Content-Type' value = ls_form_part-content_type ) ##NO_TEXT. + "form_part_set_header( i_form_part = lo_part i_name = 'Content-Type' i_value = ls_form_part-content_type ) ##NO_TEXT. + endif. + if not ls_form_part-content_disposition is initial. + lo_part->set_header_field( name = 'Content-Disposition' value = ls_form_part-content_disposition ) ##NO_TEXT. + "form_part_set_header( i_form_part = lo_part i_name = 'Content-Disposition' i_value = ls_form_part-content_disposition ) ##NO_TEXT. + endif. + if not ls_form_part-xdata is initial. + data(lv_length) = xstrlen( ls_form_part-xdata ). + lo_part->set_data( data = ls_form_part-xdata offset = 0 length = lv_length ). + "form_part_set_xdata( i_form_part = lo_part i_data = ls_form_part-xdata ). + endif. + if not ls_form_part-cdata is initial. + lo_part->append_cdata( data = ls_form_part-cdata ). + "form_part_set_cdata( i_form_part = lo_part i_data = ls_form_part-cdata ). + endif. + endloop. + + endmethod. + + method base64_decode. call function 'SCMS_BASE64_DECODE_STR' @@ -270,13 +263,6 @@ CLASS ZCL_IBMC_SERVICE_ARCH IMPLEMENTATION. endmethod. - method escape_url. - - e_escaped = cl_http_utility=>escape_url( unescaped = i_unescaped ). - - endmethod. - - method execute. data: @@ -315,58 +301,6 @@ CLASS ZCL_IBMC_SERVICE_ARCH IMPLEMENTATION. endmethod. - method form_part_add. - - e_form_part = i_client-http->request->if_http_entity~add_multipart( ). - - endmethod. - - - method form_part_set_cdata. - - i_form_part->append_cdata( data = i_data ). - - endmethod. - - - method form_part_set_header. - - i_form_part->set_header_field( name = i_name value = i_value ). - - endmethod. - - - method form_part_set_xdata. - - data: - lv_length type i. - - lv_length = xstrlen( i_data ). - i_form_part->set_data( data = i_data offset = 0 length = lv_length ). - - endmethod. - - - method get_components. - - data: - lo_abap_struc type ref to cl_abap_structdescr, - lt_comp type cl_abap_structdescr=>component_table. - - field-symbols: - type line of cl_abap_structdescr=>component_table. - - lo_abap_struc ?= cl_abap_structdescr=>describe_by_data( i_structure ). - lt_comp = lo_abap_struc->get_components( ). - - clear e_components[]. - loop at lt_comp assigning . - append -name to e_components. - endloop. - - endmethod. - - method get_default_proxy. data: @@ -404,35 +338,6 @@ CLASS ZCL_IBMC_SERVICE_ARCH IMPLEMENTATION. endmethod. - method get_field_type. - data: - lo_abap_type type ref to cl_abap_typedescr. - - describe field i_field type e_technical_type. - - if e_relative_type is requested. - if e_technical_type eq zif_ibmc_service_arch~c_datatype-objectref. - data lo_refdescr type ref to cl_abap_refdescr. - lo_refdescr ?= cl_abap_typedescr=>describe_by_data( i_field ). - lo_abap_type ?= lo_refdescr->get_referenced_type( ). - else. - lo_abap_type = cl_abap_typedescr=>describe_by_data( i_field ). - endif. - e_relative_type = lo_abap_type->get_relative_name( ). - endif. - - if e_length is requested. - if e_technical_type eq zif_ibmc_service_arch~c_datatype-c or - e_technical_type eq zif_ibmc_service_arch~c_datatype-n. - describe field i_field length e_length in character mode. - else. - e_length = 0. - endif. - endif. - - endmethod. - - method get_http_status. e_status-code = i_rest_response->get_header_field( '~status_code' ). @@ -477,61 +382,6 @@ CLASS ZCL_IBMC_SERVICE_ARCH IMPLEMENTATION. endmethod. - method PARSE_JSON. - - data: - lv_json type string, - lt_dictionary type zif_ibmc_service_arch~tt_string, - lv_dictionary type string, - lv_orgname type string, - lv_abapname type string, - lv_regex type string, - lo_json type ref to /ui2/cl_json, - lv_msg type string, - lr_exception type ref to cx_sy_move_cast_error. - field-symbols: - type string. - - if not i_json is initial. - - lv_json = i_json. - - if i_dictionary is supplied. - get_components( - exporting - i_structure = i_dictionary - importing - e_components = lt_dictionary ). - - loop at lt_dictionary into lv_dictionary. - assign component lv_dictionary of structure i_dictionary to . - lv_orgname = . - translate lv_orgname to upper case. - if lv_dictionary ne lv_orgname. - lv_regex = `"` && && `"\s*:`. - lv_abapname = `"` && lv_dictionary && `":`. - replace all occurrences of regex lv_regex in lv_json with lv_abapname. - endif. - endloop. - - endif. - - - " copy code to execute /ui2/cl_json=>deserialize( exporting json = lv_json changing data = c_abap ) and catch exception - create object lo_json. - try. - lo_json->deserialize_int( exporting json = lv_json changing data = c_abap ). - catch cx_sy_move_cast_error into lr_exception. - zcl_ibmc_service=>raise_exception( - exporting - i_msgno = 20 ). - endtry. - - endif. - - endmethod. - - method set_authentication_basic. i_client-http->authenticate( username = i_username password = i_password ). diff --git a/src/zcl_ibmc_service_arch.clas.xml b/src/zcl_ibmc_service_arch.clas.xml index 53546d8..348dddf 100644 --- a/src/zcl_ibmc_service_arch.clas.xml +++ b/src/zcl_ibmc_service_arch.clas.xml @@ -16,79 +16,43 @@ ZCL_IBMC_SERVICE_ARCH BASE64_DECODE E - decodes base64 encoded data to binary + Decodes base64 encoded data to binary ZCL_IBMC_SERVICE_ARCH - CREATE_CLIENT_BY_URL + CONVERT_STRING_TO_UTF8 E - returns a HTTP/REST client based on an URL + Converts STRING data to UTF8 encoded XSTRING ZCL_IBMC_SERVICE_ARCH - ESCAPE_URL + CREATE_CLIENT_BY_URL E - Makes a string to url conform + Returns a HTTP/REST client based on an URL ZCL_IBMC_SERVICE_ARCH EXECUTE E - executes a HTTP request (GET, POST or DELETE) - - - ZCL_IBMC_SERVICE_ARCH - FORM_PART_ADD - E - adds a part to a multipart request - - - ZCL_IBMC_SERVICE_ARCH - FORM_PART_SET_CDATA - E - sets character data for a part of a multipart request - - - ZCL_IBMC_SERVICE_ARCH - FORM_PART_SET_HEADER - E - sets a header within a part of a multiform request - - - ZCL_IBMC_SERVICE_ARCH - FORM_PART_SET_XDATA - E - sets binary data for a part of a multipart request - - - ZCL_IBMC_SERVICE_ARCH - GET_COMPONENTS - E - returns the component names of a given structure + Executes a HTTP request (GET, POST or DELETE) ZCL_IBMC_SERVICE_ARCH GET_DEFAULT_PROXY E - returns the default proxy host and port - - - ZCL_IBMC_SERVICE_ARCH - GET_FIELD_TYPE - E - returns the absolute type of a field + Returns the default proxy host and port ZCL_IBMC_SERVICE_ARCH GET_HTTP_STATUS E - returns the status of a http response + Returns the status of a http response ZCL_IBMC_SERVICE_ARCH GET_PROGNAME E - returns the ABAP program name + Returns the ABAP program name ZCL_IBMC_SERVICE_ARCH @@ -106,43 +70,43 @@ ZCL_IBMC_SERVICE_ARCH GET_REST_REQUEST E - returns a request object from a HTTP client object + Returns a request object from a HTTP client object ZCL_IBMC_SERVICE_ARCH GET_TIMEZONE E - returns the user's time zone + Returns the user's time zone ZCL_IBMC_SERVICE_ARCH SET_AUTHENTICATION_BASIC E - sets request header for basic authentication + Sets request header for basic authentication ZCL_IBMC_SERVICE_ARCH SET_REQUEST_BODY_CDATA E - sets the body of a HTTP request object + Sets the body of a HTTP request object ZCL_IBMC_SERVICE_ARCH SET_REQUEST_BODY_XDATA E - sets the body of a HTTP request object + Sets the body of a HTTP request object ZCL_IBMC_SERVICE_ARCH SET_REQUEST_HEADER E - sets a HTTP header + Sets a HTTP header ZCL_IBMC_SERVICE_ARCH SET_REQUEST_URI E - sets the URI for a HTTP request + Sets the URI for a HTTP request ZCL_IBMC_SERVICE_ARCH diff --git a/src/zcl_ibmc_service_ext.clas.abap b/src/zcl_ibmc_service_ext.clas.abap index e0f719b..da380b1 100644 --- a/src/zcl_ibmc_service_ext.clas.abap +++ b/src/zcl_ibmc_service_ext.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019,2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,18 +44,37 @@ public section. constants C_TOKEN_GENERATION_NEVER type CHAR value 'N' ##NO_TEXT. constants C_TOKEN_GENERATION_ALWAYS type CHAR value 'A' ##NO_TEXT. constants C_TOKEN_GENERATION_AUTO type CHAR value SPACE ##NO_TEXT. + constants C_IAM_TOKEN_HOST type STRING value 'iam.cloud.ibm.com' ##NO_TEXT. + constants C_IAM_TOKEN_PATH type STRING value '/identity/token' ##NO_TEXT. data P_INSTANCE_ID type TY_INSTANCE_ID . data P_SERVICENAME type TY_SERVICENAME . + "! Sends a HTTP PUT request. + "! + "! @parameter I_REQUEST_PROP | Request properties. + "! @parameter E_RESPONSE | Response returned by service. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! methods GET_BEARER_TOKEN returning value(E_BEARER_TOKEN) type STRING . + "! Returns the SDK built date. + "! + "! @parameter E_SDK_VERSION_DATE | Built data in format YYYYMMDD. + "! methods GET_SDK_VERSION_DATE returning value(E_SDK_VERSION_DATE) type STRING . + "! Method for internal use. + "! methods SET_BEARER_TOKEN importing !I_BEARER_TOKEN type STRING . + "! Retrieves a value of a configuration parameter from table ZIBMC_CONFIG. + "! + "! @parameter I_DEFUALT | Default value, if configuration parameter is not found. + "! @parameter I_PARAM | Configuration parameter name. + "! methods GET_CONFIG_VALUE importing !I_DEFAULT type ZIBMC_CONFIG-VALUE optional @@ -64,9 +83,31 @@ public section. value(E_VALUE) type ZIBMC_CONFIG-VALUE raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Factory method to instantiate a service specific wrapper class. + "! + "! @parameter I_INSTANCE_ID | + "! Value of field INSTANCE_UID in table ZIBMC_CONFIG. + "! Service credentials are read from table ZIBMC_CONFIG with key SERVICE = Name of service wrapper class without prefix ZCL_IBMC_ and INSTANCE_UID. + "! @parameter I_URL | URL of the service. + "! @parameter I_HOST | Host of the service. I_URL and I_HOST can be used synonymously. + "! @parameter I_USERNAME | User password to authenticate on service. + "! @parameter I_PASSWORD | User password to authenticate on service. + "! @parameter I_PROXY_HOST | Proxy server, not applicable on SAP Cloud Platform. + "! @parameter I_PROXY_PORT | Proxy server port, not applicable on SAP Cloud Platform. + "! @parameter I_APIKEY | API key password to authenticate on service. + "! @parameter I_AUTH_METHOD | Authentication method. Possible values are "IAM", "ICP4D", "basicAuth", "NONE". + "! @parameter I_I_OAUTH_PROP | Credentials to generate token for OAuth authentication. + "! @parameter I_TOKEN_GENERATION | Method for access token refresh:
+ "! C_TOKEN_GENERATION_NEVER - Access token is not refreshed. + "! C_TOKEN_GENERATION_ALWAYS - Access to token is refreshed for each service call. + "! C_TOKEN_GENERATION_AUTO - Access to token is refreshed just before it expires. + "! @parameter I_REQUEST_HEADERS | List of headers sent with every request, format 'Header1=Value1;Header2=Value2'. + "! @parameter I_VERSION | Value of query parameter VERSION. + "! class-methods GET_INSTANCE importing !I_INSTANCE_ID type TY_INSTANCE_ID optional + !I_URL type STRING optional !I_HOST type STRING optional !I_USERNAME type STRING optional !I_PASSWORD type STRING optional @@ -80,6 +121,20 @@ public section. !I_VERSION type STRING optional exporting value(EO_INSTANCE) type ANY . + "! Compresses multiple images from an internal table to a one or more xstrings in ZIP format. + "! + "! @parameter IT_EXAMPLES | Internal table of images. + "! @parameter IV_FIELD_CLASS | + "! Field in IT_EXAMPLES that contains the file class. + "! All records in IT_EXAMPLES with same class will be compress into one ZIP xstring. + "! @parameter IV_FIELD_FILENAME | Field in IT_EXAMPLES that contains the filename for the image. + "! @parameter IV_FIELD_IMAGE | Field in IT_EXAMPLES that contains the image. + "! @parameter IV_IMAGE_FORMAT | Format of the image. Possible values are + "! C_FORMAT_JPG, C_FORMAT_PNG, C_FORMAT_GIF, C_FORMAT_TIF, C_FORMAT_ALL. + "! @parameter IV_IMAGE_NAME | Name of the image. + "! @parameter ET_ZIPDATA | Internal table containing a compressed ZIP xstring for each image class. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! class-methods GET_ZIPDATA importing !IT_EXAMPLES type ANY TABLE @@ -95,21 +150,27 @@ public section. methods GET_ACCESS_TOKEN redefinition . + methods GET_REQUEST_PROP + redefinition . methods SET_ACCESS_TOKEN redefinition . - protected section. +protected section. private section. data P_OAUTH_PROP type TS_OAUTH_PROP . data P_TOKEN_GENERATION type CHAR . data P_TOKEN_SAVED type ZIBMC_TOKEN . + "! Method for internal use. + "! class-methods ADD_CONFIG_PROP importing !I_SERVICENAME type TY_SERVICENAME !I_INSTANCE_ID type TY_INSTANCE_ID optional changing !C_REQUEST_PROP type ANY . + "! Method for internal use. + "! class-methods ADD_IMAGE_TO_ZIP importing !IS_TABLELINE type ANY @@ -120,6 +181,8 @@ private section. !IV_FIELD_FILENAME type FIELDNAME optional raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Method for internal use. + "! class-methods GET_FIELD_DATA importing !IS_TABLELINE type ANY @@ -143,16 +206,18 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. method add_config_prop. data: - lt_compname type tt_string, - lv_type type char, - ls_config type zibmc_config, - lt_config type standard table of zibmc_config, - lt_ref type standard table of ref to data, - lr_data type ref to data, - lv_index type i value 0. + lt_compname type tt_string, + lv_type type char, + ls_config type zibmc_config, + lt_config type standard table of zibmc_config, + lt_ref type standard table of ref to data, + lr_data type ref to data, + lv_index type i value 0, + ls_url type ts_url value is initial. field-symbols: type any, + type any, type string, type any. @@ -174,6 +239,12 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. " quit, if no relevant entry in config table exists check sy-subrc = 0. + " change config parameter "URL" to "HOST" + ls_config-param = 'HOST'. + modify lt_config from ls_config transporting param where param = 'URL'. + + " perform breadth-first search on c_request_prop to allow setting values on deeper levels, + " e.g. HOST -> c_request_prop-url-host lr_data = ref #( c_request_prop ). append lr_data to lt_ref. @@ -199,13 +270,15 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. i_field = importing e_technical_type = lv_type ). - if lv_type eq 'u' or lv_type eq 'v'. " structure + if lv_type eq zif_ibmc_service_arch~c_datatype-struct or + lv_type eq zif_ibmc_service_arch~c_datatype-struct_deep. lr_data = ref #( ). append lr_data to lt_ref. else. if is initial. read table lt_config into ls_config with key param = ##WARN_OK. if sy-subrc = 0. + condense ls_config-value. = ls_config-value. endif. endif. @@ -258,10 +331,8 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. method get_access_token. data: - lv_service type zibmc_token-service, lo_response type to_rest_response, lv_grand_urlencoded type string, -* lv_usr_urlencoded type string, lv_key_urlencoded type string, lv_json type string, lv_seconds type i, @@ -287,7 +358,7 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. " check if access token has expired get time stamp field ls_timestamp. if ls_timestamp >= ls_token-expires_ts. - clear ls_token-access_token. + clear ls_token. endif. " (re)new token unless it is still valid @@ -318,7 +389,6 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. ls_token_request_prop-body = `grant_type=` && lv_grand_urlencoded && `&apikey=` && lv_key_urlencoded ##NO_TEXT. elseif not p_oauth_prop-password is initial. lv_grand_urlencoded = escape( val = 'urn:ibm:params:oauth:grant-type:password' format = cl_abap_format=>e_uri_full ) ##NO_TEXT. -* lv_usr_urlencoded = escape( val = p_oauth_prop-username format = cl_abap_format=>e_uri_full ). lv_key_urlencoded = escape( val = p_oauth_prop-password format = cl_abap_format=>e_uri_full ). ls_token_request_prop-body = `grant_type=` && lv_grand_urlencoded && `&username=` && p_oauth_prop-username && `&password=` && p_oauth_prop-password ##NO_TEXT. else. @@ -387,7 +457,7 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. ls_token-expires_ts = cl_abap_tstmp=>add( tstmp = lv_timestamp secs = lv_seconds ). endif. - ls_token-service = lv_service. + ls_token-service = p_servicename. ls_token-instance_uid = p_instance_id. if p_token_generation eq c_token_generation_auto. @@ -611,6 +681,7 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. lv_headerstr type string, ls_header type ts_header. + " instantiate object of type of exporting parameter get_field_type( exporting i_field = eo_instance @@ -619,6 +690,7 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. create object eo_instance type (lv_classname) exporting + i_url = i_url i_host = i_host i_username = i_username i_password = i_password @@ -665,6 +737,8 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. changing c_request_prop = lo_instance->p_request_prop_default ). + normalize_url( changing c_url = lo_instance->p_request_prop_default-url ). + " Merge properties from config table for this service type add_config_prop( exporting @@ -672,6 +746,8 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. changing c_request_prop = lo_instance->p_request_prop_default ). + normalize_url( changing c_url = lo_instance->p_request_prop_default-url ). + " Get service default properties ls_request_prop = lo_instance->get_request_prop( i_auth_method = i_auth_method ). merge_structure( @@ -693,11 +769,11 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. if ls_request_prop-auth_name eq 'IAM' ##NO_TEXT. if lo_instance->p_oauth_prop-url-host is initial. lo_instance->p_oauth_prop-url-protocol = 'https' ##NO_TEXT. - lo_instance->p_oauth_prop-url-host = 'iam.bluemix.net' ##NO_TEXT. + lo_instance->p_oauth_prop-url-host = c_iam_token_host. endif. if lo_instance->p_oauth_prop-url-path_base is initial and lo_instance->p_oauth_prop-url-path is initial. " Set path_base (not path), otherwise the default service path_base would be added, which is not correct - lo_instance->p_oauth_prop-url-path_base = '/identity/token' ##NO_TEXT. + lo_instance->p_oauth_prop-url-path_base = c_iam_token_path. endif. if lo_instance->p_oauth_prop-password is initial and lo_instance->p_oauth_prop-apikey is initial. lo_instance->p_oauth_prop-username = lo_instance->p_request_prop_default-username. @@ -713,9 +789,41 @@ CLASS ZCL_IBMC_SERVICE_EXT IMPLEMENTATION. endmethod. + method get_request_prop. + data: + lv_auth_method type string. + + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). + + lv_auth_method = i_auth_method. + if lv_auth_method eq c_default. + lv_auth_method = 'IAM'. + endif. + if lv_auth_method is initial. + e_request_prop-auth_basic = c_boolean_false. + e_request_prop-auth_oauth = c_boolean_false. + e_request_prop-auth_apikey = c_boolean_false. + elseif lv_auth_method eq 'IAM'. + e_request_prop-auth_name = 'IAM'. + e_request_prop-auth_type = 'apiKey'. + e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_header = c_boolean_true. + elseif lv_auth_method eq 'ICP4D'. + e_request_prop-auth_name = 'ICP4D'. + e_request_prop-auth_type = 'apiKey'. + e_request_prop-auth_headername = 'Authorization'. + e_request_prop-auth_header = c_boolean_true. + elseif lv_auth_method eq 'basicAuth'. + e_request_prop-auth_name = 'basicAuth'. + e_request_prop-auth_type = 'http'. + e_request_prop-auth_basic = c_boolean_true. + endif. + endmethod. + + method get_sdk_version_date. - e_sdk_version_date = '20191001'. + e_sdk_version_date = ''. endmethod. diff --git a/src/zcl_ibmc_speech_to_text_v1.clas.abap b/src/zcl_ibmc_speech_to_text_v1.clas.abap index 35b8c3d..e95d39a 100644 --- a/src/zcl_ibmc_speech_to_text_v1.clas.abap +++ b/src/zcl_ibmc_speech_to_text_v1.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,21 +18,21 @@ "! addition to basic transcription, the service can produce detailed information "! about many different aspects of the audio. For most languages, the service "! supports two sampling rates, broadband and narrowband. It returns all JSON -"! response content in the UTF-8 character set. -"! +"! response content in the UTF-8 character set.
+"!
"! For speech recognition, the service supports synchronous and asynchronous HTTP "! Representational State Transfer (REST) interfaces. It also supports a WebSocket "! interface that provides a full-duplex, low-latency communication channel: "! Clients send requests and audio to the service and receive results over a -"! single connection asynchronously. -"! +"! single connection asynchronously.
+"!
"! The service also offers two customization interfaces. Use language model "! customization to expand the vocabulary of a base model with domain-specific "! terminology. Use acoustic model customization to adapt a base model for the "! acoustic characteristics of your audio. For language model customization, the "! service also supports grammars. A grammar is a formal language specification -"! that lets you restrict the phrases that the service can recognize. -"! +"! that lets you restrict the phrases that the service can recognize.
+"!
"! Language model customization is generally available for production use with most "! supported languages. Acoustic model customization is beta functionality that is "! available for all supported languages.
@@ -45,26 +45,45 @@ public section. types: "! A warning from training of a custom language or custom acoustic model. begin of T_TRAINING_WARNING, + "! An identifier for the type of invalid resources listed in the `description` + "! field. CODE type STRING, + "! A warning message that lists the invalid resources that are excluded from the + "! custom model's training. The message has the following format: `Analysis of the + "! following {resource_type} has not completed successfully: + "! [{resource_names}]. They will be excluded from custom + "! {model_type} model training.`. MESSAGE type STRING, end of T_TRAINING_WARNING. types: "! The response from training of a custom language or custom acoustic model. begin of T_TRAINING_RESPONSE, + "! An array of `TrainingWarning` objects that lists any invalid resources contained + "! in the custom model. For custom language models, invalid resources are grouped + "! and identified by type of resource. The method can return warnings only if the + "! `strict` parameter is set to `false`. WARNINGS type STANDARD TABLE OF T_TRAINING_WARNING WITH NON-UNIQUE DEFAULT KEY, end of T_TRAINING_RESPONSE. types: "! An alternative hypothesis for a word from speech recognition results. begin of T_WORD_ALTERNATIVE_RESULT, + "! A confidence score for the word alternative hypothesis in the range of 0.0 to + "! 1.0. CONFIDENCE type DOUBLE, + "! An alternative hypothesis for a word from the input audio. WORD type STRING, end of T_WORD_ALTERNATIVE_RESULT. types: "! Information about alternative hypotheses for words from speech recognition "! results. begin of T_WORD_ALTERNATIVE_RESULTS, + "! The start time in seconds of the word from the input audio that corresponds to + "! the word alternatives. START_TIME type DOUBLE, + "! The end time in seconds of the word from the input audio that corresponds to the + "! word alternatives. END_TIME type DOUBLE, + "! An array of alternative hypotheses for a word from the input audio. ALTERNATIVES type STANDARD TABLE OF T_WORD_ALTERNATIVE_RESULT WITH NON-UNIQUE DEFAULT KEY, end of T_WORD_ALTERNATIVE_RESULTS. types: @@ -74,33 +93,84 @@ public section. "! the first boundary, and between the last boundary and positive infinity, "! respectively. begin of T_AUDIO_METRICS_HISTOGRAM_BIN, + "! The lower boundary of the bin in the histogram. BEGIN type FLOAT, + "! The upper boundary of the bin in the histogram. END type FLOAT, + "! The number of values in the bin of the histogram. COUNT type INTEGER, end of T_AUDIO_METRICS_HISTOGRAM_BIN. types: "! Information about the speakers from speech recognition results. begin of T_SPEAKER_LABELS_RESULT, + "! The start time of a word from the transcript. The value matches the start time + "! of a word from the `timestamps` array. FROM type FLOAT, + "! The end time of a word from the transcript. The value matches the end time of a + "! word from the `timestamps` array. TO type FLOAT, + "! The numeric identifier that the service assigns to a speaker from the audio. + "! Speaker IDs begin at `0` initially but can evolve and change across interim + "! results (if supported by the method) and between interim and final results as + "! the service processes the audio. They are not guaranteed to be sequential, + "! contiguous, or ordered. SPEAKER type INTEGER, + "! A score that indicates the service's confidence in its identification of the + "! speaker in the range of 0.0 to 1.0. CONFIDENCE type FLOAT, + "! An indication of whether the service might further change word and speaker-label + "! results. A value of `true` means that the service guarantees not to send any + "! further updates for the current or any preceding results; `false` means that + "! the service might send further updates to the results. FINAL type BOOLEAN, end of T_SPEAKER_LABELS_RESULT. types: "! An alternative transcript from speech recognition results. begin of T_SPCH_RECOGNITION_ALTERNATIVE, + "! A transcription of the audio. TRANSCRIPT type STRING, + "! A score that indicates the service's confidence in the transcript in the range + "! of 0.0 to 1.0. A confidence score is returned only for the best alternative and + "! only with results marked as final. CONFIDENCE type DOUBLE, + "! Time alignments for each word from the transcript as a list of lists. Each inner + "! list consists of three elements: the word followed by its start and end time in + "! seconds, for example: `[["hello",0.0,1.2],["world",1.2,2.5]]`. Timestamps are + "! returned only for the best alternative. TIMESTAMPS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! A confidence score for each word of the transcript as a list of lists. Each + "! inner list consists of two elements: the word and its confidence score in the + "! range of 0.0 to 1.0, for example: `[["hello",0.95],["world",0.866]]`. + "! Confidence scores are returned only for the best alternative and only with + "! results marked as final. WORD_CONFIDENCE type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_SPCH_RECOGNITION_ALTERNATIVE. types: "! Detailed timing information about the service's processing of the input audio. begin of T_PROCESSED_AUDIO, + "! The seconds of audio that the service has received as of this response. The + "! value of the field is greater than the values of the `transcription` and + "! `speaker_labels` fields during speech recognition processing, since the service + "! first has to receive the audio before it can begin to process it. The final + "! value can also be greater than the value of the `transcription` and + "! `speaker_labels` fields by a fractional number of seconds. RECEIVED type FLOAT, + "! The seconds of audio that the service has passed to its speech-processing engine + "! as of this response. The value of the field is greater than the values of the + "! `transcription` and `speaker_labels` fields during speech recognition + "! processing. The `received` and `seen_by_engine` fields have identical values + "! when the service has finished processing all audio. This final value can be + "! greater than the value of the `transcription` and `speaker_labels` fields by a + "! fractional number of seconds. SEEN_BY_ENGINE type FLOAT, + "! The seconds of audio that the service has processed for speech recognition as of + "! this response. TRANSCRIPTION type FLOAT, + "! If speaker labels are requested, the seconds of audio that the service has + "! processed to determine speaker labels as of this response. This value often + "! trails the value of the `transcription` field during speech recognition + "! processing. The `transcription` and `speaker_labels` fields have identical + "! values when the service has finished processing all audio. SPEAKER_LABELS type FLOAT, end of T_PROCESSED_AUDIO. types: @@ -108,255 +178,738 @@ public section. "! of the input audio. Processing metrics are not available with the synchronous "! **Recognize audio** method. begin of T_PROCESSING_METRICS, + "! Detailed timing information about the service's processing of the input audio. PROCESSED_AUDIO type T_PROCESSED_AUDIO, + "! The amount of real time in seconds that has passed since the service received + "! the first byte of input audio. Values in this field are generally multiples of + "! the specified metrics interval, with two differences:
+ "! * Values might not reflect exact intervals (for instance, 0.25, 0.5, and so on). + "! Actual values might be 0.27, 0.52, and so on, depending on when the service + "! receives and processes audio.
+ "! * The service also returns values for transcription events if you set the + "! `interim_results` parameter to `true`. The service returns both processing + "! metrics and transcription results when such events occur. WLL_CLCK_SNC_FRST_BYT_RECEIVED type FLOAT, + "! An indication of whether the metrics apply to a periodic interval or a + "! transcription event:
+ "! * `true` means that the response was triggered by a specified processing + "! interval. The information contains processing metrics only.
+ "! * `false` means that the response was triggered by a transcription event. The + "! information contains processing metrics plus transcription results.
+ "!
+ "! Use the field to identify why the service generated the response and to filter + "! different results if necessary. PERIODIC type BOOLEAN, end of T_PROCESSING_METRICS. types: "! Detailed information about the signal characteristics of the input audio. begin of T_AUDIO_METRICS_DETAILS, + "! If `true`, indicates the end of the audio stream, meaning that transcription is + "! complete. Currently, the field is always `true`. The service returns metrics + "! just once per audio stream. The results provide aggregated audio metrics that + "! pertain to the complete audio stream. FINAL type BOOLEAN, + "! The end time in seconds of the block of audio to which the metrics apply. END_TIME type FLOAT, + "! The signal-to-noise ratio (SNR) for the audio signal. The value indicates the + "! ratio of speech to noise in the audio. A valid value lies in the range of 0 to + "! 100 decibels (dB). The service omits the field if it cannot compute the SNR for + "! the audio. SIGNAL_TO_NOISE_RATIO type FLOAT, + "! The ratio of speech to non-speech segments in the audio signal. The value lies + "! in the range of 0.0 to 1.0. SPEECH_RATIO type FLOAT, + "! The probability that the audio signal is missing the upper half of its frequency + "! content.
+ "! * A value close to 1.0 typically indicates artificially up-sampled audio, which + "! negatively impacts the accuracy of the transcription results.
+ "! * A value at or near 0.0 indicates that the audio signal is good and has a full + "! spectrum.
+ "! * A value around 0.5 means that detection of the frequency content is unreliable + "! or not available. HIGH_FREQUENCY_LOSS type FLOAT, + "! An array of `AudioMetricsHistogramBin` objects that defines a histogram of the + "! cumulative direct current (DC) component of the audio signal. DIRECT_CURRENT_OFFSET type STANDARD TABLE OF T_AUDIO_METRICS_HISTOGRAM_BIN WITH NON-UNIQUE DEFAULT KEY, + "! An array of `AudioMetricsHistogramBin` objects that defines a histogram of the + "! clipping rate for the audio segments. The clipping rate is defined as the + "! fraction of samples in the segment that reach the maximum or minimum value that + "! is offered by the audio quantization range. The service auto-detects either a + "! 16-bit Pulse-Code Modulation(PCM) audio range (-32768 to +32767) or a unit + "! range (-1.0 to +1.0). The clipping rate is between 0.0 and 1.0, with higher + "! values indicating possible degradation of speech recognition. CLIPPING_RATE type STANDARD TABLE OF T_AUDIO_METRICS_HISTOGRAM_BIN WITH NON-UNIQUE DEFAULT KEY, + "! An array of `AudioMetricsHistogramBin` objects that defines a histogram of the + "! signal level in segments of the audio that contain speech. The signal level is + "! computed as the Root-Mean-Square (RMS) value in a decibel (dB) scale normalized + "! to the range 0.0 (minimum level) to 1.0 (maximum level). SPEECH_LEVEL type STANDARD TABLE OF T_AUDIO_METRICS_HISTOGRAM_BIN WITH NON-UNIQUE DEFAULT KEY, + "! An array of `AudioMetricsHistogramBin` objects that defines a histogram of the + "! signal level in segments of the audio that do not contain speech. The signal + "! level is computed as the Root-Mean-Square (RMS) value in a decibel (dB) scale + "! normalized to the range 0.0 (minimum level) to 1.0 (maximum level). NON_SPEECH_LEVEL type STANDARD TABLE OF T_AUDIO_METRICS_HISTOGRAM_BIN WITH NON-UNIQUE DEFAULT KEY, end of T_AUDIO_METRICS_DETAILS. types: "! If audio metrics are requested, information about the signal characteristics of "! the input audio. begin of T_AUDIO_METRICS, + "! The interval in seconds (typically 0.1 seconds) at which the service calculated + "! the audio metrics. In other words, how often the service calculated the + "! metrics. A single unit in each histogram (see the `AudioMetricsHistogramBin` + "! object) is calculated based on a `sampling_interval` length of audio. SAMPLING_INTERVAL type FLOAT, + "! Detailed information about the signal characteristics of the input audio. ACCUMULATED type T_AUDIO_METRICS_DETAILS, end of T_AUDIO_METRICS. types: "! Component results for a speech recognition request. begin of T_SPEECH_RECOGNITION_RESULT, + "! An indication of whether the transcription results are final. If `true`, the + "! results for this utterance are not updated further; no additional results are + "! sent for a `result_index` once its results are indicated as final. FINAL type BOOLEAN, + "! An array of alternative transcripts. The `alternatives` array can include + "! additional requested output such as word confidence or timestamps. ALTERNATIVES type STANDARD TABLE OF T_SPCH_RECOGNITION_ALTERNATIVE WITH NON-UNIQUE DEFAULT KEY, + "! A dictionary (or associative array) whose keys are the strings specified for + "! `keywords` if both that parameter and `keywords_threshold` are specified. The + "! value for each key is an array of matches spotted in the audio for that + "! keyword. Each match is described by a `KeywordResult` object. A keyword for + "! which no matches are found is omitted from the dictionary. The dictionary is + "! omitted entirely if no matches are found for any keywords. KEYWORDS_RESULT type MAP, + "! An array of alternative hypotheses found for words of the input audio if a + "! `word_alternatives_threshold` is specified. WORD_ALTERNATIVES type STANDARD TABLE OF T_WORD_ALTERNATIVE_RESULTS WITH NON-UNIQUE DEFAULT KEY, + "! If the `split_transcript_at_phrase_end` parameter is `true`, describes the + "! reason for the split:
+ "! * `end_of_data` - The end of the input audio stream.
+ "! * `full_stop` - A full semantic stop, such as for the conclusion of a + "! grammatical sentence. The insertion of splits is influenced by the base + "! language model and biased by custom language models and grammars.
+ "! * `reset` - The amount of audio that is currently being processed exceeds the + "! two-minute maximum. The service splits the transcript to avoid excessive memory + "! use.
+ "! * `silence` - A pause or silence that is at least as long as the pause interval. + "! + END_OF_UTTERANCE type STRING, end of T_SPEECH_RECOGNITION_RESULT. types: "! The complete results for a speech recognition request. begin of T_SPEECH_RECOGNITION_RESULTS, + "! An array of `SpeechRecognitionResult` objects that can include interim and final + "! results (interim results are returned only if supported by the method). Final + "! results are guaranteed not to change; interim results might be replaced by + "! further interim results and final results. The service periodically sends + "! updates to the results list; the `result_index` is set to the lowest index in + "! the array that has changed; it is incremented for new results. RESULTS type STANDARD TABLE OF T_SPEECH_RECOGNITION_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! An index that indicates a change point in the `results` array. The service + "! increments the index only for additional results that it sends for new audio + "! for the same request. RESULT_INDEX type INTEGER, + "! An array of `SpeakerLabelsResult` objects that identifies which words were + "! spoken by which speakers in a multi-person exchange. The array is returned only + "! if the `speaker_labels` parameter is `true`. When interim results are also + "! requested for methods that support them, it is possible for a + "! `SpeechRecognitionResults` object to include only the `speaker_labels` field. SPEAKER_LABELS type STANDARD TABLE OF T_SPEAKER_LABELS_RESULT WITH NON-UNIQUE DEFAULT KEY, + "! If processing metrics are requested, information about the service's processing + "! of the input audio. Processing metrics are not available with the synchronous + "! **Recognize audio** method. PROCESSING_METRICS type T_PROCESSING_METRICS, + "! If audio metrics are requested, information about the signal characteristics of + "! the input audio. AUDIO_METRICS type T_AUDIO_METRICS, + "! An array of warning messages associated with the request:
+ "! * Warnings for invalid parameters or fields can include a descriptive message + "! and a list of invalid argument strings, for example, `"Unknown arguments:"` or + "! `"Unknown url query arguments:"` followed by a list of the form + "! `"{invalid_arg_1}, {invalid_arg_2}."`
+ "! * The following warning is returned if the request passes a custom model that is + "! based on an older version of a base model for which an updated version is + "! available: `"Using previous version of base model, because your custom model + "! has been built with it. Please note that this version will be supported only + "! for a limited time. Consider updating your custom model to the new base model. + "! If you do not do that you will be automatically switched to base model when you + "! used the non-updated custom model."`
+ "!
+ "! In both cases, the request succeeds despite the warnings. WARNINGS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_SPEECH_RECOGNITION_RESULTS. types: "! Information about a grammar from a custom language model. begin of T_GRAMMAR, + "! The name of the grammar. NAME type STRING, + "! The number of OOV words in the grammar. The value is `0` while the grammar is + "! being processed. OUT_OF_VOCABULARY_WORDS type INTEGER, + "! The status of the grammar:
+ "! * `analyzed`: The service successfully analyzed the grammar. The custom model + "! can be trained with data from the grammar.
+ "! * `being_processed`: The service is still analyzing the grammar. The service + "! cannot accept requests to add new resources or to train the custom model.
+ "! * `undetermined`: The service encountered an error while processing the grammar. + "! The `error` field describes the failure. STATUS type STRING, + "! If the status of the grammar is `undetermined`, the following message: `Analysis + "! of grammar '{grammar_name}' failed. Please try fixing the error or + "! adding the grammar again by setting the 'allow_overwrite' flag to 'true'.`. ERROR type STRING, end of T_GRAMMAR. types: "! Information about the grammars from a custom language model. begin of T_GRAMMARS, + "! An array of `Grammar` objects that provides information about the grammars for + "! the custom model. The array is empty if the custom model has no grammars. GRAMMARS type STANDARD TABLE OF T_GRAMMAR WITH NON-UNIQUE DEFAULT KEY, end of T_GRAMMARS. types: "! Information about a current asynchronous speech recognition job. begin of T_RECOGNITION_JOB, + "! The ID of the asynchronous job. ID type STRING, + "! The current status of the job:
+ "! * `waiting`: The service is preparing the job for processing. The service + "! returns this status when the job is initially created or when it is waiting for + "! capacity to process the job. The job remains in this state until the service + "! has the capacity to begin processing it.
+ "! * `processing`: The service is actively processing the job.
+ "! * `completed`: The service has finished processing the job. If the job specified + "! a callback URL and the event `recognitions.completed_with_results`, the service + "! sent the results with the callback notification. Otherwise, you must retrieve + "! the results by checking the individual job.
+ "! * `failed`: The job failed. STATUS type STRING, + "! The date and time in Coordinated Universal Time (UTC) at which the job was + "! created. The value is provided in full ISO 8601 format + "! (`YYYY-MM-DDThh:mm:ss.sTZD`). CREATED type STRING, + "! The date and time in Coordinated Universal Time (UTC) at which the job was last + "! updated by the service. The value is provided in full ISO 8601 format + "! (`YYYY-MM-DDThh:mm:ss.sTZD`). This field is returned only by the **Check jobs** + "! and **Check a job** methods. UPDATED type STRING, + "! The URL to use to request information about the job with the **Check a job** + "! method. This field is returned only by the **Create a job** method. URL type STRING, + "! The user token associated with a job that was created with a callback URL and a + "! user token. This field can be returned only by the **Check jobs** method. USER_TOKEN type STRING, + "! If the status is `completed`, the results of the recognition request as an array + "! that includes a single instance of a `SpeechRecognitionResults` object. This + "! field is returned only by the **Check a job** method. RESULTS type STANDARD TABLE OF T_SPEECH_RECOGNITION_RESULTS WITH NON-UNIQUE DEFAULT KEY, + "! An array of warning messages about invalid parameters included with the request. + "! Each warning includes a descriptive message and a list of invalid argument + "! strings, for example, `"unexpected query parameter 'user_token', query + "! parameter 'callback_url' was not specified"`. The request succeeds despite the + "! warnings. This field can be returned only by the **Create a job** method. WARNINGS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_RECOGNITION_JOB. types: "! Information about current asynchronous speech recognition jobs. begin of T_RECOGNITION_JOBS, + "! An array of `RecognitionJob` objects that provides the status for each of the + "! user's current jobs. The array is empty if the user has no current jobs. RECOGNITIONS type STANDARD TABLE OF T_RECOGNITION_JOB WITH NON-UNIQUE DEFAULT KEY, end of T_RECOGNITION_JOBS. types: "! Information about an audio resource from a custom acoustic model. begin of T_AUDIO_DETAILS, + "! The type of the audio resource:
+ "! * `audio` for an individual audio file
+ "! * `archive` for an archive (**.zip** or **.tar.gz**) file that contains audio + "! files
+ "! * `undetermined` for a resource that the service cannot validate (for example, + "! if the user mistakenly passes a file that does not contain audio, such as a + "! JPEG file). TYPE type STRING, + "! **For an audio-type resource,** the codec in which the audio is encoded. Omitted + "! ** for an archive-type resource. CODEC type STRING, + "! **For an audio-type resource,** the sampling rate of the audio in Hertz (samples + "! ** per second). Omitted for an archive-type resource. FREQUENCY type INTEGER, + "! **For an archive-type resource,** the format of the compressed archive:
+ "! *** `zip` for a **.zip** file
+ "! *** `gzip` for a **.tar.gz** file
+ "! **
+ "! **Omitted for an audio-type resource. COMPRESSION type STRING, end of T_AUDIO_DETAILS. types: "! The error response from a failed request. begin of T_ERROR_MODEL, + "! Description of the problem. ERROR type STRING, + "! HTTP response code. CODE type INTEGER, + "! Response message. CODE_DESCRIPTION type STRING, + "! Warnings associated with the error. WARNINGS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_ERROR_MODEL. types: "! Information about an audio resource from a custom acoustic model. begin of T_AUDIO_RESOURCE, + "! The total seconds of audio in the audio resource. DURATION type INTEGER, + "! **For an archive-type resource,** the user-specified name of the resource.
+ "! **
+ "! ****For an audio-type resource,** the user-specified name of the resource or the + "! ** name of the audio file that the user added for the resource. The value depends + "! ** on the method that is called. NAME type STRING, + "! An `AudioDetails` object that provides detailed information about the audio + "! resource. The object is empty until the service finishes processing the audio. DETAILS type T_AUDIO_DETAILS, + "! The status of the audio resource:
+ "! * `ok`: The service successfully analyzed the audio data. The data can be used + "! to train the custom model.
+ "! * `being_processed`: The service is still analyzing the audio data. The service + "! cannot accept requests to add new audio resources or to train the custom model + "! until its analysis is complete.
+ "! * `invalid`: The audio data is not valid for training the custom model (possibly + "! because it has the wrong format or sampling rate, or because it is corrupted). + "! For an archive file, the entire archive is invalid if any of its audio files + "! are invalid. STATUS type STRING, end of T_AUDIO_RESOURCE. types: "! Information about an audio resource from a custom acoustic model. begin of T_AUDIO_LISTING, + "! **For an audio-type resource,** the total seconds of audio in the resource. + "! ** Omitted for an archive-type resource. DURATION type INTEGER, + "! **For an audio-type resource,** the user-specified name of the resource. Omitted + "! ** for an archive-type resource. NAME type STRING, + "! **For an audio-type resource,** an `AudioDetails` object that provides detailed + "! ** information about the resource. The object is empty until the service finishes + "! ** processing the audio. Omitted for an archive-type resource. DETAILS type T_AUDIO_DETAILS, + "! **For an audio-type resource,** the status of the resource:
+ "! *** `ok`: The service successfully analyzed the audio data. The data can be used + "! ** to train the custom model.
+ "! *** `being_processed`: The service is still analyzing the audio data. The service + "! ** cannot accept requests to add new audio resources or to train the custom model + "! ** until its analysis is complete.
+ "! *** `invalid`: The audio data is not valid for training the custom model (possibly + "! ** because it has the wrong format or sampling rate, or because it is corrupted). + "! **
+ "! **
+ "! **Omitted for an archive-type resource. STATUS type STRING, + "! **For an archive-type resource,** an object of type `AudioResource` that provides + "! ** information about the resource. Omitted for an audio-type resource. CONTAINER type T_AUDIO_RESOURCE, + "! **For an archive-type resource,** an array of `AudioResource` objects that + "! ** provides information about the audio-type resources that are contained in the + "! ** resource. Omitted for an audio-type resource. AUDIO type STANDARD TABLE OF T_AUDIO_RESOURCE WITH NON-UNIQUE DEFAULT KEY, end of T_AUDIO_LISTING. types: "! An error associated with a word from a custom language model. begin of T_WORD_ERROR, + "! A key-value pair that describes an error associated with the definition of a + "! word in the words resource. The pair has the format `"element": "message"`, + "! where `element` is the aspect of the definition that caused the problem and + "! `message` describes the problem. The following example describes a problem with + "! one of the word's sounds-like definitions: `"{sounds_like_string}": + "! "Numbers are not allowed in sounds-like. You can try for example + "! '{suggested_string}'."`. ELEMENT type STRING, end of T_WORD_ERROR. types: "! Information about a word from a custom language model. begin of T_WORD, + "! A word from the custom model's words resource. The spelling of the word is used + "! to train the model. WORD type STRING, + "! An array of pronunciations for the word. The array can include the sounds-like + "! pronunciation automatically generated by the service if none is provided for + "! the word; the service adds this pronunciation when it finishes processing the + "! word. SOUNDS_LIKE type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The spelling of the word that the service uses to display the word in a + "! transcript. The field contains an empty string if no display-as value is + "! provided for the word, in which case the word is displayed as it is spelled. DISPLAY_AS type STRING, + "! A sum of the number of times the word is found across all corpora. For example, + "! if the word occurs five times in one corpus and seven times in another, its + "! count is `12`. If you add a custom word to a model before it is added by any + "! corpora, the count begins at `1`; if the word is added from a corpus first and + "! later modified, the count reflects only the number of times it is found in + "! corpora. COUNT type INTEGER, + "! An array of sources that describes how the word was added to the custom model's + "! words resource. For OOV words added from a corpus, includes the name of the + "! corpus; if the word was added by multiple corpora, the names of all corpora are + "! listed. If the word was modified or added by the user directly, the field + "! includes the string `user`. SOURCE type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! If the service discovered one or more problems that you need to correct for the + "! word's definition, an array that describes each of the errors. ERROR type STANDARD TABLE OF T_WORD_ERROR WITH NON-UNIQUE DEFAULT KEY, end of T_WORD. types: "! Information about the words from a custom language model. begin of T_WORDS, + "! An array of `Word` objects that provides information about each word in the + "! custom model's words resource. The array is empty if the custom model has no + "! words. WORDS type STANDARD TABLE OF T_WORD WITH NON-UNIQUE DEFAULT KEY, end of T_WORDS. types: "! Information about a word that is to be added to a custom language model. begin of T_CUSTOM_WORD, + "! For the **Add custom words** method, you must specify the custom word that is to + "! be added to or updated in the custom model. Do not include spaces in the word. + "! Use a `-` (dash) or `_` (underscore) to connect the tokens of compound words. + "!
+ "!
+ "! Omit this parameter for the **Add a custom word** method. WORD type STRING, + "! An array of sounds-like pronunciations for the custom word. Specify how words + "! that are difficult to pronounce, foreign words, acronyms, and so on can be + "! pronounced by users.
+ "! * For a word that is not in the service's base vocabulary, omit the parameter to + "! have the service automatically generate a sounds-like pronunciation for the + "! word.
+ "! * For a word that is in the service's base vocabulary, use the parameter to + "! specify additional pronunciations for the word. You cannot override the default + "! pronunciation of a word; pronunciations you add augment the pronunciation from + "! the base vocabulary.
+ "!
+ "! A word can have at most five sounds-like pronunciations. A pronunciation can + "! include at most 40 characters not including spaces. SOUNDS_LIKE type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An alternative spelling for the custom word when it appears in a transcript. Use + "! the parameter when you want the word to have a spelling that is different from + "! its usual representation or from its spelling in corpora training data. DISPLAY_AS type STRING, end of T_CUSTOM_WORD. types: "! Information about the audio resources from a custom acoustic model. begin of T_AUDIO_RESOURCES, + "! The total minutes of accumulated audio summed over all of the valid audio + "! resources for the custom acoustic model. You can use this value to determine + "! whether the custom model has too little or too much audio to begin training. TOTAL_MINUTES_OF_AUDIO type DOUBLE, + "! An array of `AudioResource` objects that provides information about the audio + "! resources of the custom acoustic model. The array is empty if the custom model + "! has no audio resources. AUDIO type STANDARD TABLE OF T_AUDIO_RESOURCE WITH NON-UNIQUE DEFAULT KEY, end of T_AUDIO_RESOURCES. types: "! Information about a corpus from a custom language model. begin of T_CORPUS, + "! The name of the corpus. NAME type STRING, + "! The total number of words in the corpus. The value is `0` while the corpus is + "! being processed. TOTAL_WORDS type INTEGER, + "! The number of OOV words in the corpus. The value is `0` while the corpus is + "! being processed. OUT_OF_VOCABULARY_WORDS type INTEGER, + "! The status of the corpus:
+ "! * `analyzed`: The service successfully analyzed the corpus. The custom model can + "! be trained with data from the corpus.
+ "! * `being_processed`: The service is still analyzing the corpus. The service + "! cannot accept requests to add new resources or to train the custom model.
+ "! * `undetermined`: The service encountered an error while processing the corpus. + "! The `error` field describes the failure. STATUS type STRING, + "! If the status of the corpus is `undetermined`, the following message: `Analysis + "! of corpus 'name' failed. Please try adding the corpus again by setting the + "! 'allow_overwrite' flag to 'true'`. ERROR type STRING, end of T_CORPUS. types: "! Information about the corpora from a custom language model. begin of T_CORPORA, + "! An array of `Corpus` objects that provides information about the corpora for the + "! custom model. The array is empty if the custom model has no corpora. CORPORA type STANDARD TABLE OF T_CORPUS WITH NON-UNIQUE DEFAULT KEY, end of T_CORPORA. types: "! Information about an existing custom language model. begin of T_LANGUAGE_MODEL, + "! The customization ID (GUID) of the custom language model. The **Create a custom + "! language model** method returns only this field of the object; it does not + "! return the other fields. CUSTOMIZATION_ID type STRING, + "! The date and time in Coordinated Universal Time (UTC) at which the custom + "! language model was created. The value is provided in full ISO 8601 format + "! (`YYYY-MM-DDThh:mm:ss.sTZD`). CREATED type STRING, + "! The date and time in Coordinated Universal Time (UTC) at which the custom + "! language model was last modified. The `created` and `updated` fields are equal + "! when a language model is first added but has yet to be updated. The value is + "! provided in full ISO 8601 format (YYYY-MM-DDThh:mm:ss.sTZD). UPDATED type STRING, + "! The language identifier of the custom language model (for example, `en-US`). LANGUAGE type STRING, + "! The dialect of the language for the custom language model. For non-Spanish + "! models, the field matches the language of the base model; for example, `en-US` + "! for either of the US English language models. For Spanish models, the field + "! indicates the dialect for which the model was created:
+ "! * `es-ES` for Castilian Spanish (`es-ES` models)
+ "! * `es-LA` for Latin American Spanish (`es-AR`, `es-CL`, `es-CO`, and `es-PE` + "! models)
+ "! * `es-US` for Mexican (North American) Spanish (`es-MX` models)
+ "!
+ "! Dialect values are case-insensitive. DIALECT type STRING, + "! A list of the available versions of the custom language model. Each element of + "! the array indicates a version of the base model with which the custom model can + "! be used. Multiple versions exist only if the custom model has been upgraded; + "! otherwise, only a single version is shown. VERSIONS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The GUID of the credentials for the instance of the service that owns the custom + "! language model. OWNER type STRING, + "! The name of the custom language model. NAME type STRING, + "! The description of the custom language model. DESCRIPTION type STRING, + "! The name of the language model for which the custom language model was created. BASE_MODEL_NAME type STRING, + "! The current status of the custom language model:
+ "! * `pending`: The model was created but is waiting either for valid training data + "! to be added or for the service to finish analyzing added data.
+ "! * `ready`: The model contains valid data and is ready to be trained. If the + "! model contains a mix of valid and invalid resources, you need to set the + "! `strict` parameter to `false` for the training to proceed.
+ "! * `training`: The model is currently being trained.
+ "! * `available`: The model is trained and ready to use.
+ "! * `upgrading`: The model is currently being upgraded.
+ "! * `failed`: Training of the model failed. STATUS type STRING, + "! A percentage that indicates the progress of the custom language model's current + "! training. A value of `100` means that the model is fully trained. **Note:** The + "! `progress` field does not currently reflect the progress of the training. The + "! field changes from `0` to `100` when training is complete. PROGRESS type INTEGER, + "! If an error occurred while adding a grammar file to the custom language model, a + "! message that describes an `Internal Server Error` and includes the string + "! `Cannot compile grammar`. The status of the custom model is not affected by the + "! error, but the grammar cannot be used with the model. ERROR type STRING, + "! If the request included unknown parameters, the following message: `Unexpected + "! query parameter(s) ['parameters'] detected`, where `parameters` is a list that + "! includes a quoted string for each unknown parameter. WARNINGS type STRING, end of T_LANGUAGE_MODEL. types: "! Information about existing custom language models. begin of T_LANGUAGE_MODELS, + "! An array of `LanguageModel` objects that provides information about each + "! available custom language model. The array is empty if the requesting + "! credentials own no custom language models (if no language is specified) or own + "! no custom language models for the specified language. CUSTOMIZATIONS type STANDARD TABLE OF T_LANGUAGE_MODEL WITH NON-UNIQUE DEFAULT KEY, end of T_LANGUAGE_MODELS. types: "! Information about an existing custom acoustic model. begin of T_ACOUSTIC_MODEL, + "! The customization ID (GUID) of the custom acoustic model. The **Create a custom + "! acoustic model** method returns only this field of the object; it does not + "! return the other fields. CUSTOMIZATION_ID type STRING, + "! The date and time in Coordinated Universal Time (UTC) at which the custom + "! acoustic model was created. The value is provided in full ISO 8601 format + "! (`YYYY-MM-DDThh:mm:ss.sTZD`). CREATED type STRING, + "! The date and time in Coordinated Universal Time (UTC) at which the custom + "! acoustic model was last modified. The `created` and `updated` fields are equal + "! when an acoustic model is first added but has yet to be updated. The value is + "! provided in full ISO 8601 format (YYYY-MM-DDThh:mm:ss.sTZD). UPDATED type STRING, + "! The language identifier of the custom acoustic model (for example, `en-US`). LANGUAGE type STRING, + "! A list of the available versions of the custom acoustic model. Each element of + "! the array indicates a version of the base model with which the custom model can + "! be used. Multiple versions exist only if the custom model has been upgraded; + "! otherwise, only a single version is shown. VERSIONS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The GUID of the credentials for the instance of the service that owns the custom + "! acoustic model. OWNER type STRING, + "! The name of the custom acoustic model. NAME type STRING, + "! The description of the custom acoustic model. DESCRIPTION type STRING, + "! The name of the language model for which the custom acoustic model was created. BASE_MODEL_NAME type STRING, + "! The current status of the custom acoustic model:
+ "! * `pending`: The model was created but is waiting either for valid training data + "! to be added or for the service to finish analyzing added data.
+ "! * `ready`: The model contains valid data and is ready to be trained. If the + "! model contains a mix of valid and invalid resources, you need to set the + "! `strict` parameter to `false` for the training to proceed.
+ "! * `training`: The model is currently being trained.
+ "! * `available`: The model is trained and ready to use.
+ "! * `upgrading`: The model is currently being upgraded.
+ "! * `failed`: Training of the model failed. STATUS type STRING, + "! A percentage that indicates the progress of the custom acoustic model's current + "! training. A value of `100` means that the model is fully trained. **Note:** The + "! `progress` field does not currently reflect the progress of the training. The + "! field changes from `0` to `100` when training is complete. PROGRESS type INTEGER, + "! If the request included unknown parameters, the following message: `Unexpected + "! query parameter(s) ['parameters'] detected`, where `parameters` is a list that + "! includes a quoted string for each unknown parameter. WARNINGS type STRING, end of T_ACOUSTIC_MODEL. types: "! Information about existing custom acoustic models. begin of T_ACOUSTIC_MODELS, + "! An array of `AcousticModel` objects that provides information about each + "! available custom acoustic model. The array is empty if the requesting + "! credentials own no custom acoustic models (if no language is specified) or own + "! no custom acoustic models for the specified language. CUSTOMIZATIONS type STANDARD TABLE OF T_ACOUSTIC_MODEL WITH NON-UNIQUE DEFAULT KEY, end of T_ACOUSTIC_MODELS. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT, + "! A plain text file that contains the training data for the corpus. Encode the + "! file in UTF-8 if it contains non-ASCII characters; the service assumes UTF-8 + "! encoding if it encounters non-ASCII characters.
+ "!
+ "! Make sure that you know the character encoding of the file. You must use that + "! encoding when working with the words in the custom language model. For more + "! information, see [Character + "! encoding](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-te + "! xt-corporaWords#charEncoding).
+ "!
+ "! With the `curl` command, use the `--data-binary` option to upload the file for + "! the request. CORPUS_FILE type FILE, end of T_INLINE_OBJECT. types: "! Additional service features that are supported with the model. begin of T_SUPPORTED_FEATURES, + "! Indicates whether the customization interface can be used to create a custom + "! language model based on the language model. CUSTOM_LANGUAGE_MODEL type BOOLEAN, + "! Indicates whether the `speaker_labels` parameter can be used with the language + "! model. SPEAKER_LABELS type BOOLEAN, end of T_SUPPORTED_FEATURES. types: "! Information about the new custom language model. begin of T_CREATE_LANGUAGE_MODEL, + "! A user-defined name for the new custom language model. Use a name that is unique + "! among all custom language models that you own. Use a localized name that + "! matches the language of the custom model. Use a name that describes the domain + "! of the custom model, such as `Medical custom model` or `Legal custom model`. NAME type STRING, + "! The name of the base language model that is to be customized by the new custom + "! language model. The new custom model can be used only with the base model that + "! it customizes.
+ "!
+ "! To determine whether a base model supports language model customization, use the + "! **Get a model** method and check that the attribute `custom_language_model` is + "! set to `true`. You can also refer to [Language support for + "! customization](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech- + "! to-text-customization#languageSupport). BASE_MODEL_NAME type STRING, + "! The dialect of the specified language that is to be used with the custom + "! language model. For most languages, the dialect matches the language of the + "! base model by default. For example, `en-US` is used for either of the US + "! English language models.
+ "!
+ "! For a Spanish language, the service creates a custom language model that is + "! suited for speech in one of the following dialects:
+ "! * `es-ES` for Castilian Spanish (`es-ES` models)
+ "! * `es-LA` for Latin American Spanish (`es-AR`, `es-CL`, `es-CO`, and `es-PE` + "! models)
+ "! * `es-US` for Mexican (North American) Spanish (`es-MX` models)
+ "!
+ "! The parameter is meaningful only for Spanish models, for which you can always + "! safely omit the parameter to have the service create the correct mapping.
+ "!
+ "! If you specify the `dialect` parameter for non-Spanish language models, its + "! value must match the language of the base model. If you specify the `dialect` + "! for Spanish language models, its value must match one of the defined mappings + "! as indicated (`es-ES`, `es-LA`, or `es-MX`). All dialect values are + "! case-insensitive. DIALECT type STRING, + "! A description of the new custom language model. Use a localized description that + "! matches the language of the custom model. DESCRIPTION type STRING, end of T_CREATE_LANGUAGE_MODEL. types: "! Information about an available language model. begin of T_SPEECH_MODEL, + "! The name of the model for use as an identifier in calls to the service (for + "! example, `en-US_BroadbandModel`). NAME type STRING, + "! The language identifier of the model (for example, `en-US`). LANGUAGE type STRING, + "! The sampling rate (minimum acceptable rate for audio) used by the model in + "! Hertz. RATE type INTEGER, + "! The URI for the model. URL type STRING, + "! Additional service features that are supported with the model. SUPPORTED_FEATURES type T_SUPPORTED_FEATURES, + "! A brief description of the model. DESCRIPTION type STRING, end of T_SPEECH_MODEL. types: "! Information about the available language models. begin of T_SPEECH_MODELS, + "! An array of `SpeechModel` objects that provides information about each available + "! model. MODELS type STANDARD TABLE OF T_SPEECH_MODEL WITH NON-UNIQUE DEFAULT KEY, end of T_SPEECH_MODELS. types: "! Information about the new custom acoustic model. begin of T_CREATE_ACOUSTIC_MODEL, + "! A user-defined name for the new custom acoustic model. Use a name that is unique + "! among all custom acoustic models that you own. Use a localized name that + "! matches the language of the custom model. Use a name that describes the + "! acoustic environment of the custom model, such as `Mobile custom model` or + "! `Noisy car custom model`. NAME type STRING, + "! The name of the base language model that is to be customized by the new custom + "! acoustic model. The new custom model can be used only with the base model that + "! it customizes.
+ "!
+ "! To determine whether a base model supports acoustic model customization, refer + "! to [Language support for + "! customization](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech- + "! to-text-customization#languageSupport). BASE_MODEL_NAME type STRING, + "! A description of the new custom acoustic model. Use a localized description that + "! matches the language of the custom model. DESCRIPTION type STRING, end of T_CREATE_ACOUSTIC_MODEL. types: "! Information about the words that are to be added to a custom language model. begin of T_CUSTOM_WORDS, + "! An array of `CustomWord` objects that provides information about each custom + "! word that is to be added to or updated in the custom language model. WORDS type STANDARD TABLE OF T_CUSTOM_WORD WITH NON-UNIQUE DEFAULT KEY, end of T_CUSTOM_WORDS. types: "! Information about a match for a keyword from speech recognition results. begin of T_KEYWORD_RESULT, + "! A specified keyword normalized to the spoken phrase that matched in the audio + "! input. NORMALIZED_TEXT type STRING, + "! The start time in seconds of the keyword match. START_TIME type DOUBLE, + "! The end time in seconds of the keyword match. END_TIME type DOUBLE, + "! A confidence score for the keyword match in the range of 0.0 to 1.0. CONFIDENCE type DOUBLE, end of T_KEYWORD_RESULT. types: @@ -366,7 +919,12 @@ public section. "! Information about a request to register a callback for asynchronous speech "! recognition. begin of T_REGISTER_STATUS, + "! The current status of the job:
+ "! * `created`: The service successfully white-listed the callback URL as a result + "! of the call.
+ "! * `already created`: The URL was already white-listed. STATUS type STRING, + "! The callback URL that is successfully registered. URL type STRING, end of T_REGISTER_STATUS. @@ -438,6 +996,7 @@ constants: INNER type string value 'inner', WORD_ALTERNATIVES type string value 'word_alternatives', WORDALTERNATIVES type string value 'wordAlternatives', + END_OF_UTTERANCE type string value 'end_of_utterance', NORMALIZED_TEXT type string value 'normalized_text', START_TIME type string value 'start_time', END_TIME type string value 'end_time', @@ -525,6 +1084,7 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_SPEECH_MODELS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_MODELS importing @@ -535,15 +1095,16 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get a model. "! - "! @parameter I_model_id | + "! @parameter I_MODEL_ID | "! The identifier of the model in the form of its name from the output of the **Get "! a model** method. "! @parameter E_RESPONSE | "! Service return value of type T_SPEECH_MODEL + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_MODEL importing - !I_model_id type STRING + !I_MODEL_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_SPEECH_MODEL @@ -552,28 +1113,28 @@ constants: "! Recognize audio. "! - "! @parameter I_audio | + "! @parameter I_AUDIO | "! The audio to transcribe. - "! @parameter I_Content_Type | + "! @parameter I_CONTENT_TYPE | "! The format (MIME type) of the audio. For more information about specifying an "! audio format, see **Audio formats (content types)** in the method description. - "! @parameter I_model | + "! @parameter I_MODEL | "! The identifier of the model that is to be used for the recognition request. See "! [Languages and "! models](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text "! -models#models). - "! @parameter I_language_customization_id | + "! @parameter I_LANGUAGE_CUSTOMIZATION_ID | "! The customization ID (GUID) of a custom language model that is to be used with "! the recognition request. The base model of the specified custom language model "! must match the model specified with the `model` parameter. You must make the "! request with credentials for the instance of the service that owns the custom "! model. By default, no custom language model is used. See [Custom "! models](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text - "! -input#custom-input). - "! + "! -input#custom-input).
+ "!
"! **Note:** Use this parameter instead of the deprecated `customization_id` "! parameter. - "! @parameter I_acoustic_customization_id | + "! @parameter I_ACOUSTIC_CUSTOMIZATION_ID | "! The customization ID (GUID) of a custom acoustic model that is to be used with "! the recognition request. The base model of the specified custom acoustic model "! must match the model specified with the `model` parameter. You must make the @@ -581,7 +1142,7 @@ constants: "! model. By default, no custom acoustic model is used. See [Custom "! models](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text "! -input#custom-input). - "! @parameter I_base_model_version | + "! @parameter I_BASE_MODEL_VERSION | "! The version of the specified base model that is to be used with the recognition "! request. Multiple versions of a base model can exist when a model is updated "! for internal improvements. The parameter is intended primarily for use with @@ -590,34 +1151,34 @@ constants: "! [Base model "! version](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-tex "! t-input#version). - "! @parameter I_customization_weight | + "! @parameter I_CUSTOMIZATION_WEIGHT | "! If you specify the customization ID (GUID) of a custom language model with the "! recognition request, the customization weight tells the service how much weight "! to give to words from the custom language model compared to those from the base - "! model for the current request. - "! + "! model for the current request.
+ "!
"! Specify a value between 0.0 and 1.0. Unless a different customization weight was "! specified for the custom model when it was trained, the default value is 0.3. A "! customization weight that you specify overrides a weight that was specified - "! when the custom model was trained. - "! + "! when the custom model was trained.
+ "!
"! The default value yields the best performance in general. Assign a higher value "! if your audio makes frequent use of OOV words from the custom model. Use "! caution when setting the weight: a higher value can improve the accuracy of "! phrases from the custom model's domain, but it can negatively affect - "! performance on non-domain phrases. - "! + "! performance on non-domain phrases.
+ "!
"! See [Custom "! models](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text "! -input#custom-input). - "! @parameter I_inactivity_timeout | + "! @parameter I_INACTIVITY_TIMEOUT | "! The time in seconds after which, if only silence (no speech) is detected in "! streaming audio, the connection is closed with a 400 error. The parameter is "! useful for stopping audio submission from a live microphone when a user simply "! walks away. Use `-1` for infinity. See [Inactivity "! timeout](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-tex "! t-input#timeouts-inactivity). - "! @parameter I_keywords | + "! @parameter I_KEYWORDS | "! An array of keyword strings to spot in the audio. Each keyword string can "! include one or more string tokens. Keywords are spotted only in the final "! results, not in interim hypotheses. If you specify any keywords, you must also @@ -626,7 +1187,7 @@ constants: "! [Keyword "! spotting](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-te "! xt-output#keyword_spotting). - "! @parameter I_keywords_threshold | + "! @parameter I_KEYWORDS_THRESHOLD | "! A confidence value that is the lower bound for spotting a keyword. A word is "! considered to match a keyword if its confidence is greater than or equal to the "! threshold. Specify a probability between 0.0 and 1.0. If you specify a @@ -634,13 +1195,13 @@ constants: "! keyword spotting if you omit either parameter. See [Keyword "! spotting](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-te "! xt-output#keyword_spotting). - "! @parameter I_max_alternatives | + "! @parameter I_MAX_ALTERNATIVES | "! The maximum number of alternative transcripts that the service is to return. By "! default, the service returns a single transcript. If you specify a value of "! `0`, the service uses the default value, `1`. See [Maximum "! alternatives](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-t "! o-text-output#max_alternatives). - "! @parameter I_word_alternatives_threshold | + "! @parameter I_WORD_ALTERNATIVES_THRESHOLD | "! A confidence value that is the lower bound for identifying a hypothesis as a "! possible word alternative (also known as "Confusion Networks"). An alternative "! word is considered if its confidence is greater than or equal to the threshold. @@ -648,57 +1209,58 @@ constants: "! alternative words. See [Word "! alternatives](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-t "! o-text-output#word_alternatives). - "! @parameter I_word_confidence | + "! @parameter I_WORD_CONFIDENCE | "! If `true`, the service returns a confidence measure in the range of 0.0 to 1.0 "! for each word. By default, the service returns no word confidence scores. See "! [Word "! confidence](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to- "! text-output#word_confidence). - "! @parameter I_timestamps | + "! @parameter I_TIMESTAMPS | "! If `true`, the service returns time alignment for each word. By default, no "! timestamps are returned. See [Word "! timestamps](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to- "! text-output#word_timestamps). - "! @parameter I_profanity_filter | + "! @parameter I_PROFANITY_FILTER | "! If `true`, the service filters profanity from all output except for keyword "! results by replacing inappropriate words with a series of asterisks. Set the "! parameter to `false` to return results with no censoring. Applies to US English "! transcription only. See [Profanity "! filtering](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-t "! ext-output#profanity_filter). - "! @parameter I_smart_formatting | + "! @parameter I_SMART_FORMATTING | "! If `true`, the service converts dates, times, series of digits and numbers, "! phone numbers, currency values, and internet addresses into more readable, "! conventional representations in the final transcript of a recognition request. "! For US English, the service also converts certain keyword strings to "! punctuation symbols. By default, the service performs no smart formatting. - "! - "! **Note:** Applies to US English, Japanese, and Spanish transcription only. - "! + "!
+ "!
+ "! **Note:** Applies to US English, Japanese, and Spanish transcription only.
+ "!
"! See [Smart "! formatting](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to- "! text-output#smart_formatting). - "! @parameter I_speaker_labels | + "! @parameter I_SPEAKER_LABELS | "! If `true`, the response includes labels that identify which words were spoken by "! which participants in a multi-person exchange. By default, the service returns "! no speaker labels. Setting `speaker_labels` to `true` forces the `timestamps` "! parameter to be `true`, regardless of whether you specify `false` for the - "! parameter. - "! + "! parameter.
+ "!
"! **Note:** Applies to US English, Japanese, and Spanish (both broadband and "! narrowband models) and UK English (narrowband model) transcription only. To "! determine whether a language model supports speaker labels, you can also use "! the **Get a model** method and check that the attribute `speaker_labels` is set - "! to `true`. - "! + "! to `true`.
+ "!
"! See [Speaker "! labels](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text "! -output#speaker_labels). - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! **Deprecated.** Use the `language_customization_id` parameter to specify the "! ** customization ID (GUID) of a custom language model that is to be used with the "! ** recognition request. Do not specify both parameters with a request. - "! @parameter I_grammar_name | + "! @parameter I_GRAMMAR_NAME | "! The name of a grammar that is to be used with the recognition request. If you "! specify a grammar, you must also use the `language_customization_id` parameter "! to specify the name of the custom language model for which the grammar is @@ -707,54 +1269,92 @@ constants: "! words resource. See "! [Grammars](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-t "! ext-input#grammars-input). - "! @parameter I_redaction | + "! @parameter I_REDACTION | "! If `true`, the service redacts, or masks, numeric data from final transcripts. "! The feature redacts any number that has three or more consecutive digits by "! replacing each digit with an `X` character. It is intended to redact sensitive "! numeric data, such as credit card numbers. By default, the service performs no - "! redaction. - "! + "! redaction.
+ "!
"! When you enable redaction, the service automatically enables smart formatting, "! regardless of whether you explicitly disable that feature. To ensure maximum "! security, the service also disables keyword spotting (ignores the `keywords` "! and `keywords_threshold` parameters) and returns only a single final transcript - "! (forces the `max_alternatives` parameter to be `1`). - "! - "! **Note:** Applies to US English, Japanese, and Korean transcription only. - "! + "! (forces the `max_alternatives` parameter to be `1`).
+ "!
+ "! **Note:** Applies to US English, Japanese, and Korean transcription only.
+ "!
"! See [Numeric "! redaction](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-t "! ext-output#redaction). - "! @parameter I_audio_metrics | + "! @parameter I_AUDIO_METRICS | "! If `true`, requests detailed information about the signal characteristics of the "! input audio. The service returns audio metrics with the final transcription - "! results. By default, the service returns no audio metrics. + "! results. By default, the service returns no audio metrics.
+ "!
+ "! See [Audio + "! metrics](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-tex + "! t-metrics#audio_metrics). + "! @parameter I_END_OF_PHRASE_SILENCE_TIME | + "! If `true`, specifies the duration of the pause interval at which the service + "! splits a transcript into multiple final results. If the service detects pauses + "! or extended silence before it reaches the end of the audio stream, its response + "! can include multiple final results. Silence indicates a point at which the + "! speaker pauses between spoken words or phrases.
+ "!
+ "! Specify a value for the pause interval in the range of 0.0 to 120.0.
+ "! * A value greater than 0 specifies the interval that the service is to use for + "! speech recognition.
+ "! * A value of 0 indicates that the service is to use the default interval. It is + "! equivalent to omitting the parameter.
+ "!
+ "! The default pause interval for most languages is 0.8 seconds; the default for + "! Chinese is 0.6 seconds.
+ "!
+ "! See [End of phrase silence + "! time](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-o + "! utput#silence_time). + "! @parameter I_SPLT_TRNSCRPT_AT_PHRASE_END | + "! If `true`, directs the service to split the transcript into multiple final + "! results based on semantic features of the input, for example, at the conclusion + "! of meaningful phrases such as sentences. The service bases its understanding of + "! semantic features on the base language model that you use with a request. + "! Custom language models and grammars can also influence how and where the + "! service splits a transcript. By default, the service splits transcripts based + "! solely on the pause interval.
+ "!
+ "! See [Split transcript at phrase + "! end](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-ou + "! tput#split_transcript). "! @parameter E_RESPONSE | "! Service return value of type T_SPEECH_RECOGNITION_RESULTS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods RECOGNIZE importing - !I_audio type FILE - !I_Content_Type type STRING default 'application/octet-stream' - !I_model type STRING default 'en-US_BroadbandModel' - !I_language_customization_id type STRING optional - !I_acoustic_customization_id type STRING optional - !I_base_model_version type STRING optional - !I_customization_weight type DOUBLE optional - !I_inactivity_timeout type INTEGER optional - !I_keywords type TT_STRING optional - !I_keywords_threshold type FLOAT optional - !I_max_alternatives type INTEGER optional - !I_word_alternatives_threshold type FLOAT optional - !I_word_confidence type BOOLEAN default c_boolean_false - !I_timestamps type BOOLEAN default c_boolean_false - !I_profanity_filter type BOOLEAN default c_boolean_true - !I_smart_formatting type BOOLEAN default c_boolean_false - !I_speaker_labels type BOOLEAN default c_boolean_false - !I_customization_id type STRING optional - !I_grammar_name type STRING optional - !I_redaction type BOOLEAN default c_boolean_false - !I_audio_metrics type BOOLEAN default c_boolean_false + !I_AUDIO type FILE + !I_CONTENT_TYPE type STRING default 'application/octet-stream' + !I_MODEL type STRING default 'en-US_BroadbandModel' + !I_LANGUAGE_CUSTOMIZATION_ID type STRING optional + !I_ACOUSTIC_CUSTOMIZATION_ID type STRING optional + !I_BASE_MODEL_VERSION type STRING optional + !I_CUSTOMIZATION_WEIGHT type DOUBLE optional + !I_INACTIVITY_TIMEOUT type INTEGER optional + !I_KEYWORDS type TT_STRING optional + !I_KEYWORDS_THRESHOLD type FLOAT optional + !I_MAX_ALTERNATIVES type INTEGER optional + !I_WORD_ALTERNATIVES_THRESHOLD type FLOAT optional + !I_WORD_CONFIDENCE type BOOLEAN default c_boolean_false + !I_TIMESTAMPS type BOOLEAN default c_boolean_false + !I_PROFANITY_FILTER type BOOLEAN default c_boolean_true + !I_SMART_FORMATTING type BOOLEAN default c_boolean_false + !I_SPEAKER_LABELS type BOOLEAN default c_boolean_false + !I_CUSTOMIZATION_ID type STRING optional + !I_GRAMMAR_NAME type STRING optional + !I_REDACTION type BOOLEAN default c_boolean_false + !I_AUDIO_METRICS type BOOLEAN default c_boolean_false + !I_END_OF_PHRASE_SILENCE_TIME type DOUBLE optional + !I_SPLT_TRNSCRPT_AT_PHRASE_END type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_SPEECH_RECOGNITION_RESULTS @@ -763,13 +1363,13 @@ constants: "! Register a callback. "! - "! @parameter I_callback_url | + "! @parameter I_CALLBACK_URL | "! An HTTP or HTTPS URL to which callback notifications are to be sent. To be "! white-listed, the URL must successfully echo the challenge string during URL "! verification. During verification, the client can also check the signature that "! the service sends in the `X-Callback-Signature` header to verify the origin of "! the request. - "! @parameter I_user_secret | + "! @parameter I_USER_SECRET | "! A user-specified string that the service uses to generate the HMAC-SHA1 "! signature that it sends via the `X-Callback-Signature` header. The service "! includes the header during URL verification and with every notification sent to @@ -777,11 +1377,12 @@ constants: "! notification. If you omit the parameter, the service does not send the header. "! @parameter E_RESPONSE | "! Service return value of type T_REGISTER_STATUS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods REGISTER_CALLBACK importing - !I_callback_url type STRING - !I_user_secret type STRING optional + !I_CALLBACK_URL type STRING + !I_USER_SECRET type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_REGISTER_STATUS @@ -789,76 +1390,77 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Unregister a callback. "! - "! @parameter I_callback_url | + "! @parameter I_CALLBACK_URL | "! The callback URL that is to be unregistered. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UNREGISTER_CALLBACK importing - !I_callback_url type STRING + !I_CALLBACK_URL type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "! Create a job. "! - "! @parameter I_audio | + "! @parameter I_AUDIO | "! The audio to transcribe. - "! @parameter I_Content_Type | + "! @parameter I_CONTENT_TYPE | "! The format (MIME type) of the audio. For more information about specifying an "! audio format, see **Audio formats (content types)** in the method description. - "! @parameter I_model | + "! @parameter I_MODEL | "! The identifier of the model that is to be used for the recognition request. See "! [Languages and "! models](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text "! -models#models). - "! @parameter I_callback_url | + "! @parameter I_CALLBACK_URL | "! A URL to which callback notifications are to be sent. The URL must already be "! successfully white-listed by using the **Register a callback** method. You can "! include the same callback URL with any number of job creation requests. Omit - "! the parameter to poll the service for job completion and results. - "! + "! the parameter to poll the service for job completion and results.
+ "!
"! Use the `user_token` parameter to specify a unique user-specified string with "! each job to differentiate the callback notifications for the jobs. - "! @parameter I_events | + "! @parameter I_EVENTS | "! If the job includes a callback URL, a comma-separated list of notification - "! events to which to subscribe. Valid events are + "! events to which to subscribe. Valid events are
"! * `recognitions.started` generates a callback notification when the service - "! begins to process the job. + "! begins to process the job.
"! * `recognitions.completed` generates a callback notification when the job is "! complete. You must use the **Check a job** method to retrieve the results - "! before they time out or are deleted. + "! before they time out or are deleted.
"! * `recognitions.completed_with_results` generates a callback notification when - "! the job is complete. The notification includes the results of the request. + "! the job is complete. The notification includes the results of the request.
"! * `recognitions.failed` generates a callback notification if the service - "! experiences an error while processing the job. - "! + "! experiences an error while processing the job.
+ "!
"! The `recognitions.completed` and `recognitions.completed_with_results` events - "! are incompatible. You can specify only of the two events. - "! + "! are incompatible. You can specify only of the two events.
+ "!
"! If the job includes a callback URL, omit the parameter to subscribe to the "! default events: `recognitions.started`, `recognitions.completed`, and "! `recognitions.failed`. If the job does not include a callback URL, omit the "! parameter. - "! @parameter I_user_token | + "! @parameter I_USER_TOKEN | "! If the job includes a callback URL, a user-specified string that the service is "! to include with each callback notification for the job; the token allows the "! user to maintain an internal mapping between jobs and notification events. If "! the job does not include a callback URL, omit the parameter. - "! @parameter I_results_ttl | + "! @parameter I_RESULTS_TTL | "! The number of minutes for which the results are to be available after the job "! has finished. If not delivered via a callback, the results must be retrieved "! within this time. Omit the parameter to use a time to live of one week. The "! parameter is valid with or without a callback URL. - "! @parameter I_language_customization_id | + "! @parameter I_LANGUAGE_CUSTOMIZATION_ID | "! The customization ID (GUID) of a custom language model that is to be used with "! the recognition request. The base model of the specified custom language model "! must match the model specified with the `model` parameter. You must make the "! request with credentials for the instance of the service that owns the custom "! model. By default, no custom language model is used. See [Custom "! models](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text - "! -input#custom-input). - "! + "! -input#custom-input).
+ "!
"! **Note:** Use this parameter instead of the deprecated `customization_id` "! parameter. - "! @parameter I_acoustic_customization_id | + "! @parameter I_ACOUSTIC_CUSTOMIZATION_ID | "! The customization ID (GUID) of a custom acoustic model that is to be used with "! the recognition request. The base model of the specified custom acoustic model "! must match the model specified with the `model` parameter. You must make the @@ -866,7 +1468,7 @@ constants: "! model. By default, no custom acoustic model is used. See [Custom "! models](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text "! -input#custom-input). - "! @parameter I_base_model_version | + "! @parameter I_BASE_MODEL_VERSION | "! The version of the specified base model that is to be used with the recognition "! request. Multiple versions of a base model can exist when a model is updated "! for internal improvements. The parameter is intended primarily for use with @@ -875,34 +1477,34 @@ constants: "! [Base model "! version](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-tex "! t-input#version). - "! @parameter I_customization_weight | + "! @parameter I_CUSTOMIZATION_WEIGHT | "! If you specify the customization ID (GUID) of a custom language model with the "! recognition request, the customization weight tells the service how much weight "! to give to words from the custom language model compared to those from the base - "! model for the current request. - "! + "! model for the current request.
+ "!
"! Specify a value between 0.0 and 1.0. Unless a different customization weight was "! specified for the custom model when it was trained, the default value is 0.3. A "! customization weight that you specify overrides a weight that was specified - "! when the custom model was trained. - "! + "! when the custom model was trained.
+ "!
"! The default value yields the best performance in general. Assign a higher value "! if your audio makes frequent use of OOV words from the custom model. Use "! caution when setting the weight: a higher value can improve the accuracy of "! phrases from the custom model's domain, but it can negatively affect - "! performance on non-domain phrases. - "! + "! performance on non-domain phrases.
+ "!
"! See [Custom "! models](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text "! -input#custom-input). - "! @parameter I_inactivity_timeout | + "! @parameter I_INACTIVITY_TIMEOUT | "! The time in seconds after which, if only silence (no speech) is detected in "! streaming audio, the connection is closed with a 400 error. The parameter is "! useful for stopping audio submission from a live microphone when a user simply "! walks away. Use `-1` for infinity. See [Inactivity "! timeout](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-tex "! t-input#timeouts-inactivity). - "! @parameter I_keywords | + "! @parameter I_KEYWORDS | "! An array of keyword strings to spot in the audio. Each keyword string can "! include one or more string tokens. Keywords are spotted only in the final "! results, not in interim hypotheses. If you specify any keywords, you must also @@ -911,7 +1513,7 @@ constants: "! [Keyword "! spotting](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-te "! xt-output#keyword_spotting). - "! @parameter I_keywords_threshold | + "! @parameter I_KEYWORDS_THRESHOLD | "! A confidence value that is the lower bound for spotting a keyword. A word is "! considered to match a keyword if its confidence is greater than or equal to the "! threshold. Specify a probability between 0.0 and 1.0. If you specify a @@ -919,13 +1521,13 @@ constants: "! keyword spotting if you omit either parameter. See [Keyword "! spotting](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-te "! xt-output#keyword_spotting). - "! @parameter I_max_alternatives | + "! @parameter I_MAX_ALTERNATIVES | "! The maximum number of alternative transcripts that the service is to return. By "! default, the service returns a single transcript. If you specify a value of "! `0`, the service uses the default value, `1`. See [Maximum "! alternatives](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-t "! o-text-output#max_alternatives). - "! @parameter I_word_alternatives_threshold | + "! @parameter I_WORD_ALTERNATIVES_THRESHOLD | "! A confidence value that is the lower bound for identifying a hypothesis as a "! possible word alternative (also known as "Confusion Networks"). An alternative "! word is considered if its confidence is greater than or equal to the threshold. @@ -933,57 +1535,58 @@ constants: "! alternative words. See [Word "! alternatives](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-t "! o-text-output#word_alternatives). - "! @parameter I_word_confidence | + "! @parameter I_WORD_CONFIDENCE | "! If `true`, the service returns a confidence measure in the range of 0.0 to 1.0 "! for each word. By default, the service returns no word confidence scores. See "! [Word "! confidence](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to- "! text-output#word_confidence). - "! @parameter I_timestamps | + "! @parameter I_TIMESTAMPS | "! If `true`, the service returns time alignment for each word. By default, no "! timestamps are returned. See [Word "! timestamps](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to- "! text-output#word_timestamps). - "! @parameter I_profanity_filter | + "! @parameter I_PROFANITY_FILTER | "! If `true`, the service filters profanity from all output except for keyword "! results by replacing inappropriate words with a series of asterisks. Set the "! parameter to `false` to return results with no censoring. Applies to US English "! transcription only. See [Profanity "! filtering](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-t "! ext-output#profanity_filter). - "! @parameter I_smart_formatting | + "! @parameter I_SMART_FORMATTING | "! If `true`, the service converts dates, times, series of digits and numbers, "! phone numbers, currency values, and internet addresses into more readable, "! conventional representations in the final transcript of a recognition request. "! For US English, the service also converts certain keyword strings to "! punctuation symbols. By default, the service performs no smart formatting. - "! - "! **Note:** Applies to US English, Japanese, and Spanish transcription only. - "! + "!
+ "!
+ "! **Note:** Applies to US English, Japanese, and Spanish transcription only.
+ "!
"! See [Smart "! formatting](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to- "! text-output#smart_formatting). - "! @parameter I_speaker_labels | + "! @parameter I_SPEAKER_LABELS | "! If `true`, the response includes labels that identify which words were spoken by "! which participants in a multi-person exchange. By default, the service returns "! no speaker labels. Setting `speaker_labels` to `true` forces the `timestamps` "! parameter to be `true`, regardless of whether you specify `false` for the - "! parameter. - "! + "! parameter.
+ "!
"! **Note:** Applies to US English, Japanese, and Spanish (both broadband and "! narrowband models) and UK English (narrowband model) transcription only. To "! determine whether a language model supports speaker labels, you can also use "! the **Get a model** method and check that the attribute `speaker_labels` is set - "! to `true`. - "! + "! to `true`.
+ "!
"! See [Speaker "! labels](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text "! -output#speaker_labels). - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! **Deprecated.** Use the `language_customization_id` parameter to specify the "! ** customization ID (GUID) of a custom language model that is to be used with the "! ** recognition request. Do not specify both parameters with a request. - "! @parameter I_grammar_name | + "! @parameter I_GRAMMAR_NAME | "! The name of a grammar that is to be used with the recognition request. If you "! specify a grammar, you must also use the `language_customization_id` parameter "! to specify the name of the custom language model for which the grammar is @@ -992,78 +1595,124 @@ constants: "! words resource. See "! [Grammars](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-t "! ext-input#grammars-input). - "! @parameter I_redaction | + "! @parameter I_REDACTION | "! If `true`, the service redacts, or masks, numeric data from final transcripts. "! The feature redacts any number that has three or more consecutive digits by "! replacing each digit with an `X` character. It is intended to redact sensitive "! numeric data, such as credit card numbers. By default, the service performs no - "! redaction. - "! + "! redaction.
+ "!
"! When you enable redaction, the service automatically enables smart formatting, "! regardless of whether you explicitly disable that feature. To ensure maximum "! security, the service also disables keyword spotting (ignores the `keywords` "! and `keywords_threshold` parameters) and returns only a single final transcript - "! (forces the `max_alternatives` parameter to be `1`). - "! - "! **Note:** Applies to US English, Japanese, and Korean transcription only. - "! + "! (forces the `max_alternatives` parameter to be `1`).
+ "!
+ "! **Note:** Applies to US English, Japanese, and Korean transcription only.
+ "!
"! See [Numeric "! redaction](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-t "! ext-output#redaction). - "! @parameter I_processing_metrics | + "! @parameter I_PROCESSING_METRICS | "! If `true`, requests processing metrics about the service's transcription of the "! input audio. The service returns processing metrics at the interval specified "! by the `processing_metrics_interval` parameter. It also returns processing "! metrics for transcription events, for example, for final and interim results. - "! By default, the service returns no processing metrics. - "! @parameter I_processing_metrics_interval | + "! By default, the service returns no processing metrics.
+ "!
+ "! See [Processing + "! metrics](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-tex + "! t-metrics#processing_metrics). + "! @parameter I_PROCESSING_METRICS_INTERVAL | "! Specifies the interval in real wall-clock seconds at which the service is to "! return processing metrics. The parameter is ignored unless the - "! `processing_metrics` parameter is set to `true`. - "! + "! `processing_metrics` parameter is set to `true`.
+ "!
"! The parameter accepts a minimum value of 0.1 seconds. The level of precision is - "! not restricted, so you can specify values such as 0.25 and 0.125. - "! + "! not restricted, so you can specify values such as 0.25 and 0.125.
+ "!
"! The service does not impose a maximum value. If you want to receive processing "! metrics only for transcription events instead of at periodic intervals, set the "! value to a large number. If the value is larger than the duration of the audio, - "! the service returns processing metrics only for transcription events. - "! @parameter I_audio_metrics | + "! the service returns processing metrics only for transcription events.
+ "!
+ "! See [Processing + "! metrics](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-tex + "! t-metrics#processing_metrics). + "! @parameter I_AUDIO_METRICS | "! If `true`, requests detailed information about the signal characteristics of the "! input audio. The service returns audio metrics with the final transcription - "! results. By default, the service returns no audio metrics. + "! results. By default, the service returns no audio metrics.
+ "!
+ "! See [Audio + "! metrics](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-tex + "! t-metrics#audio_metrics). + "! @parameter I_END_OF_PHRASE_SILENCE_TIME | + "! If `true`, specifies the duration of the pause interval at which the service + "! splits a transcript into multiple final results. If the service detects pauses + "! or extended silence before it reaches the end of the audio stream, its response + "! can include multiple final results. Silence indicates a point at which the + "! speaker pauses between spoken words or phrases.
+ "!
+ "! Specify a value for the pause interval in the range of 0.0 to 120.0.
+ "! * A value greater than 0 specifies the interval that the service is to use for + "! speech recognition.
+ "! * A value of 0 indicates that the service is to use the default interval. It is + "! equivalent to omitting the parameter.
+ "!
+ "! The default pause interval for most languages is 0.8 seconds; the default for + "! Chinese is 0.6 seconds.
+ "!
+ "! See [End of phrase silence + "! time](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-o + "! utput#silence_time). + "! @parameter I_SPLT_TRNSCRPT_AT_PHRASE_END | + "! If `true`, directs the service to split the transcript into multiple final + "! results based on semantic features of the input, for example, at the conclusion + "! of meaningful phrases such as sentences. The service bases its understanding of + "! semantic features on the base language model that you use with a request. + "! Custom language models and grammars can also influence how and where the + "! service splits a transcript. By default, the service splits transcripts based + "! solely on the pause interval.
+ "!
+ "! See [Split transcript at phrase + "! end](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text-ou + "! tput#split_transcript). "! @parameter E_RESPONSE | "! Service return value of type T_RECOGNITION_JOB + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_JOB importing - !I_audio type FILE - !I_Content_Type type STRING default 'application/octet-stream' - !I_model type STRING default 'en-US_BroadbandModel' - !I_callback_url type STRING optional - !I_events type STRING optional - !I_user_token type STRING optional - !I_results_ttl type INTEGER optional - !I_language_customization_id type STRING optional - !I_acoustic_customization_id type STRING optional - !I_base_model_version type STRING optional - !I_customization_weight type DOUBLE optional - !I_inactivity_timeout type INTEGER optional - !I_keywords type TT_STRING optional - !I_keywords_threshold type FLOAT optional - !I_max_alternatives type INTEGER optional - !I_word_alternatives_threshold type FLOAT optional - !I_word_confidence type BOOLEAN default c_boolean_false - !I_timestamps type BOOLEAN default c_boolean_false - !I_profanity_filter type BOOLEAN default c_boolean_true - !I_smart_formatting type BOOLEAN default c_boolean_false - !I_speaker_labels type BOOLEAN default c_boolean_false - !I_customization_id type STRING optional - !I_grammar_name type STRING optional - !I_redaction type BOOLEAN default c_boolean_false - !I_processing_metrics type BOOLEAN default c_boolean_false - !I_processing_metrics_interval type FLOAT optional - !I_audio_metrics type BOOLEAN default c_boolean_false + !I_AUDIO type FILE + !I_CONTENT_TYPE type STRING default 'application/octet-stream' + !I_MODEL type STRING default 'en-US_BroadbandModel' + !I_CALLBACK_URL type STRING optional + !I_EVENTS type STRING optional + !I_USER_TOKEN type STRING optional + !I_RESULTS_TTL type INTEGER optional + !I_LANGUAGE_CUSTOMIZATION_ID type STRING optional + !I_ACOUSTIC_CUSTOMIZATION_ID type STRING optional + !I_BASE_MODEL_VERSION type STRING optional + !I_CUSTOMIZATION_WEIGHT type DOUBLE optional + !I_INACTIVITY_TIMEOUT type INTEGER optional + !I_KEYWORDS type TT_STRING optional + !I_KEYWORDS_THRESHOLD type FLOAT optional + !I_MAX_ALTERNATIVES type INTEGER optional + !I_WORD_ALTERNATIVES_THRESHOLD type FLOAT optional + !I_WORD_CONFIDENCE type BOOLEAN default c_boolean_false + !I_TIMESTAMPS type BOOLEAN default c_boolean_false + !I_PROFANITY_FILTER type BOOLEAN default c_boolean_true + !I_SMART_FORMATTING type BOOLEAN default c_boolean_false + !I_SPEAKER_LABELS type BOOLEAN default c_boolean_false + !I_CUSTOMIZATION_ID type STRING optional + !I_GRAMMAR_NAME type STRING optional + !I_REDACTION type BOOLEAN default c_boolean_false + !I_PROCESSING_METRICS type BOOLEAN default c_boolean_false + !I_PROCESSING_METRICS_INTERVAL type FLOAT optional + !I_AUDIO_METRICS type BOOLEAN default c_boolean_false + !I_END_OF_PHRASE_SILENCE_TIME type DOUBLE optional + !I_SPLT_TRNSCRPT_AT_PHRASE_END type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' exporting !E_RESPONSE type T_RECOGNITION_JOB @@ -1073,6 +1722,7 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_RECOGNITION_JOBS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CHECK_JOBS importing @@ -1083,16 +1733,17 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Check a job. "! - "! @parameter I_id | + "! @parameter I_ID | "! The identifier of the asynchronous job that is to be used for the request. You "! must make the request with credentials for the instance of the service that "! owns the job. "! @parameter E_RESPONSE | "! Service return value of type T_RECOGNITION_JOB + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CHECK_JOB importing - !I_id type STRING + !I_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_RECOGNITION_JOB @@ -1100,28 +1751,30 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a job. "! - "! @parameter I_id | + "! @parameter I_ID | "! The identifier of the asynchronous job that is to be used for the request. You "! must make the request with credentials for the instance of the service that "! owns the job. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_JOB importing - !I_id type STRING + !I_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "! Create a custom language model. "! - "! @parameter I_create_language_model | + "! @parameter I_CREATE_LANGUAGE_MODEL | "! A `CreateLanguageModel` object that provides basic information about the new "! custom language model. "! @parameter E_RESPONSE | "! Service return value of type T_LANGUAGE_MODEL + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_LANGUAGE_MODEL importing - !I_create_language_model type T_CREATE_LANGUAGE_MODEL + !I_CREATE_LANGUAGE_MODEL type T_CREATE_LANGUAGE_MODEL !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1130,17 +1783,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! List custom language models. "! - "! @parameter I_language | + "! @parameter I_LANGUAGE | "! The identifier of the language for which custom language or custom acoustic "! models are to be returned (for example, `en-US`). Omit the parameter to see all "! custom language or custom acoustic models that are owned by the requesting "! credentials. "! @parameter E_RESPONSE | "! Service return value of type T_LANGUAGE_MODELS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_LANGUAGE_MODELS importing - !I_language type STRING optional + !I_LANGUAGE type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_LANGUAGE_MODELS @@ -1148,16 +1802,17 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get a custom language model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. "! @parameter E_RESPONSE | "! Service return value of type T_LANGUAGE_MODEL + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_LANGUAGE_MODEL importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_LANGUAGE_MODEL @@ -1165,55 +1820,57 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a custom language model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_LANGUAGE_MODEL importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Train a custom language model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_word_type_to_add | + "! @parameter I_WORD_TYPE_TO_ADD | "! The type of words from the custom language model's words resource on which to - "! train the model: + "! train the model:
"! * `all` (the default) trains the model on all new words, regardless of whether "! they were extracted from corpora or grammars or were added or modified by the - "! user. + "! user.
"! * `user` trains the model only on new words that were added or modified by the "! user directly. The model is not trained on new words extracted from corpora or "! grammars. - "! @parameter I_customization_weight | + "! @parameter I_CUSTOMIZATION_WEIGHT | "! Specifies a customization weight for the custom language model. The "! customization weight tells the service how much weight to give to words from "! the custom language model compared to those from the base model for speech - "! recognition. Specify a value between 0.0 and 1.0; the default is 0.3. - "! + "! recognition. Specify a value between 0.0 and 1.0; the default is 0.3.
+ "!
"! The default value yields the best performance in general. Assign a higher value "! if your audio makes frequent use of OOV words from the custom model. Use "! caution when setting the weight: a higher value can improve the accuracy of "! phrases from the custom model's domain, but it can negatively affect - "! performance on non-domain phrases. - "! + "! performance on non-domain phrases.
+ "!
"! The value that you assign is used for all recognition requests that use the "! model. You can override it for any recognition request by specifying a "! customization weight for that request. "! @parameter E_RESPONSE | "! Service return value of type T_TRAINING_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods TRAIN_LANGUAGE_MODEL importing - !I_customization_id type STRING - !I_word_type_to_add type STRING default 'all' - !I_customization_weight type DOUBLE optional + !I_CUSTOMIZATION_ID type STRING + !I_WORD_TYPE_TO_ADD type STRING default 'all' + !I_CUSTOMIZATION_WEIGHT type DOUBLE optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TRAINING_RESPONSE @@ -1221,43 +1878,46 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Reset a custom language model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods RESET_LANGUAGE_MODEL importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Upgrade a custom language model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPGRADE_LANGUAGE_MODEL importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List corpora. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. "! @parameter E_RESPONSE | "! Service return value of type T_CORPORA + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_CORPORA importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_CORPORA @@ -1265,71 +1925,73 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Add a corpus. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_corpus_name | + "! @parameter I_CORPUS_NAME | "! The name of the new corpus for the custom language model. Use a localized name "! that matches the language of the custom model and reflects the contents of the - "! corpus. - "! * Include a maximum of 128 characters in the name. + "! corpus.
+ "! * Include a maximum of 128 characters in the name.
"! * Do not use characters that need to be URL-encoded. For example, do not use "! spaces, slashes, backslashes, colons, ampersands, double quotes, plus signs, "! equals signs, questions marks, and so on in the name. (The service does not "! prevent the use of these characters. But because they must be URL-encoded - "! wherever used, their use is strongly discouraged.) + "! wherever used, their use is strongly discouraged.)
"! * Do not use the name of an existing corpus or grammar that is already defined - "! for the custom model. + "! for the custom model.
"! * Do not use the name `user`, which is reserved by the service to denote custom - "! words that are added or modified by the user. + "! words that are added or modified by the user.
"! * Do not use the name `base_lm` or `default_lm`. Both names are reserved for "! future use by the service. - "! @parameter I_corpus_file | + "! @parameter I_CORPUS_FILE | "! A plain text file that contains the training data for the corpus. Encode the "! file in UTF-8 if it contains non-ASCII characters; the service assumes UTF-8 - "! encoding if it encounters non-ASCII characters. - "! + "! encoding if it encounters non-ASCII characters.
+ "!
"! Make sure that you know the character encoding of the file. You must use that "! encoding when working with the words in the custom language model. For more "! information, see [Character "! encoding](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-te - "! xt-corporaWords#charEncoding). - "! + "! xt-corporaWords#charEncoding).
+ "!
"! With the `curl` command, use the `--data-binary` option to upload the file for "! the request. - "! @parameter I_allow_overwrite | + "! @parameter I_ALLOW_OVERWRITE | "! If `true`, the specified corpus overwrites an existing corpus with the same "! name. If `false`, the request fails if a corpus with the same name already "! exists. The parameter has no effect if a corpus with the same name does not "! already exist. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ADD_CORPUS importing - !I_customization_id type STRING - !I_corpus_name type STRING - !I_corpus_file type FILE - !I_allow_overwrite type BOOLEAN default c_boolean_false - !I_corpus_file_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL + !I_CUSTOMIZATION_ID type STRING + !I_CORPUS_NAME type STRING + !I_CORPUS_FILE type FILE + !I_ALLOW_OVERWRITE type BOOLEAN default c_boolean_false + !I_CORPUS_FILE_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Get a corpus. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_corpus_name | + "! @parameter I_CORPUS_NAME | "! The name of the corpus for the custom language model. "! @parameter E_RESPONSE | "! Service return value of type T_CORPUS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_CORPUS importing - !I_customization_id type STRING - !I_corpus_name type STRING + !I_CUSTOMIZATION_ID type STRING + !I_CORPUS_NAME type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_CORPUS @@ -1337,35 +1999,37 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a corpus. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_corpus_name | + "! @parameter I_CORPUS_NAME | "! The name of the corpus for the custom language model. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_CORPUS importing - !I_customization_id type STRING - !I_corpus_name type STRING + !I_CUSTOMIZATION_ID type STRING + !I_CORPUS_NAME type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List custom words. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_word_type | - "! The type of words to be listed from the custom language model's words resource: - "! * `all` (the default) shows all words. + "! @parameter I_WORD_TYPE | + "! The type of words to be listed from the custom language model's words + "! resource:
+ "! * `all` (the default) shows all words.
"! * `user` shows only custom words that were added or modified by the user - "! directly. - "! * `corpora` shows only OOV that were extracted from corpora. + "! directly.
+ "! * `corpora` shows only OOV that were extracted from corpora.
"! * `grammars` shows only OOV words that are recognized by grammars. - "! @parameter I_sort | + "! @parameter I_SORT | "! Indicates the order in which the words are to be listed, `alphabetical` or by "! `count`. You can prepend an optional `+` or `-` to an argument to indicate "! whether the results are to be sorted in ascending or descending order. By @@ -1376,12 +2040,13 @@ constants: "! `%2B`. "! @parameter E_RESPONSE | "! Service return value of type T_WORDS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_WORDS importing - !I_customization_id type STRING - !I_word_type type STRING default 'all' - !I_sort type STRING default 'alphabetical' + !I_CUSTOMIZATION_ID type STRING + !I_WORD_TYPE type STRING default 'all' + !I_SORT type STRING default 'alphabetical' !I_accept type string default 'application/json' exporting !E_RESPONSE type T_WORDS @@ -1389,56 +2054,58 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Add custom words. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_custom_words | + "! @parameter I_CUSTOM_WORDS | "! A `CustomWords` object that provides information about one or more custom words "! that are to be added to or updated in the custom language model. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ADD_WORDS importing - !I_customization_id type STRING - !I_custom_words type T_CUSTOM_WORDS + !I_CUSTOMIZATION_ID type STRING + !I_CUSTOM_WORDS type T_CUSTOM_WORDS !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Add a custom word. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_word_name | + "! @parameter I_WORD_NAME | "! The custom word that is to be added to or updated in the custom language model. "! Do not include spaces in the word. Use a `-` (dash) or `_` (underscore) to "! connect the tokens of compound words. URL-encode the word if it includes "! non-ASCII characters. For more information, see [Character "! encoding](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-te "! xt-corporaWords#charEncoding). - "! @parameter I_custom_word | + "! @parameter I_CUSTOM_WORD | "! A `CustomWord` object that provides information about the specified custom word. "! Specify an empty object to add a word with no sounds-like or display-as "! information. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ADD_WORD importing - !I_customization_id type STRING - !I_word_name type STRING - !I_custom_word type T_CUSTOM_WORD + !I_CUSTOMIZATION_ID type STRING + !I_WORD_NAME type STRING + !I_CUSTOM_WORD type T_CUSTOM_WORD !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Get a custom word. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_word_name | + "! @parameter I_WORD_NAME | "! The custom word that is to be read from the custom language model. URL-encode "! the word if it includes non-ASCII characters. For more information, see "! [Character @@ -1446,11 +2113,12 @@ constants: "! xt-corporaWords#charEncoding). "! @parameter E_RESPONSE | "! Service return value of type T_WORD + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_WORD importing - !I_customization_id type STRING - !I_word_name type STRING + !I_CUSTOMIZATION_ID type STRING + !I_WORD_NAME type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_WORD @@ -1458,37 +2126,39 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a custom word. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_word_name | + "! @parameter I_WORD_NAME | "! The custom word that is to be deleted from the custom language model. URL-encode "! the word if it includes non-ASCII characters. For more information, see "! [Character "! encoding](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-te "! xt-corporaWords#charEncoding). + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_WORD importing - !I_customization_id type STRING - !I_word_name type STRING + !I_CUSTOMIZATION_ID type STRING + !I_WORD_NAME type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List grammars. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. "! @parameter E_RESPONSE | "! Service return value of type T_GRAMMARS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_GRAMMARS importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_GRAMMARS @@ -1496,72 +2166,74 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Add a grammar. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_grammar_name | + "! @parameter I_GRAMMAR_NAME | "! The name of the new grammar for the custom language model. Use a localized name "! that matches the language of the custom model and reflects the contents of the - "! grammar. - "! * Include a maximum of 128 characters in the name. + "! grammar.
+ "! * Include a maximum of 128 characters in the name.
"! * Do not use characters that need to be URL-encoded. For example, do not use "! spaces, slashes, backslashes, colons, ampersands, double quotes, plus signs, "! equals signs, questions marks, and so on in the name. (The service does not "! prevent the use of these characters. But because they must be URL-encoded - "! wherever used, their use is strongly discouraged.) + "! wherever used, their use is strongly discouraged.)
"! * Do not use the name of an existing grammar or corpus that is already defined - "! for the custom model. + "! for the custom model.
"! * Do not use the name `user`, which is reserved by the service to denote custom - "! words that are added or modified by the user. + "! words that are added or modified by the user.
"! * Do not use the name `base_lm` or `default_lm`. Both names are reserved for "! future use by the service. - "! @parameter I_grammar_file | + "! @parameter I_GRAMMAR_FILE | "! A plain text file that contains the grammar in the format specified by the "! `Content-Type` header. Encode the file in UTF-8 (ASCII is a subset of UTF-8). "! Using any other encoding can lead to issues when compiling the grammar or to "! unexpected results in decoding. The service ignores an encoding that is - "! specified in the header of the grammar. - "! + "! specified in the header of the grammar.
+ "!
"! With the `curl` command, use the `--data-binary` option to upload the file for "! the request. - "! @parameter I_Content_Type | - "! The format (MIME type) of the grammar file: + "! @parameter I_CONTENT_TYPE | + "! The format (MIME type) of the grammar file:
"! * `application/srgs` for Augmented Backus-Naur Form (ABNF), which uses a - "! plain-text representation that is similar to traditional BNF grammars. + "! plain-text representation that is similar to traditional BNF grammars.
"! * `application/srgs+xml` for XML Form, which uses XML elements to represent the "! grammar. - "! @parameter I_allow_overwrite | + "! @parameter I_ALLOW_OVERWRITE | "! If `true`, the specified grammar overwrites an existing grammar with the same "! name. If `false`, the request fails if a grammar with the same name already "! exists. The parameter has no effect if a grammar with the same name does not "! already exist. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ADD_GRAMMAR importing - !I_customization_id type STRING - !I_grammar_name type STRING - !I_grammar_file type STRING - !I_Content_Type type STRING default 'application/srgs' - !I_allow_overwrite type BOOLEAN default c_boolean_false + !I_CUSTOMIZATION_ID type STRING + !I_GRAMMAR_NAME type STRING + !I_GRAMMAR_FILE type STRING + !I_CONTENT_TYPE type STRING default 'application/srgs' + !I_ALLOW_OVERWRITE type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Get a grammar. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_grammar_name | + "! @parameter I_GRAMMAR_NAME | "! The name of the grammar for the custom language model. "! @parameter E_RESPONSE | "! Service return value of type T_GRAMMAR + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_GRAMMAR importing - !I_customization_id type STRING - !I_grammar_name type STRING + !I_CUSTOMIZATION_ID type STRING + !I_GRAMMAR_NAME type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_GRAMMAR @@ -1569,32 +2241,34 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a grammar. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom language model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_grammar_name | + "! @parameter I_GRAMMAR_NAME | "! The name of the grammar for the custom language model. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_GRAMMAR importing - !I_customization_id type STRING - !I_grammar_name type STRING + !I_CUSTOMIZATION_ID type STRING + !I_GRAMMAR_NAME type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Create a custom acoustic model. "! - "! @parameter I_create_acoustic_model | + "! @parameter I_CREATE_ACOUSTIC_MODEL | "! A `CreateAcousticModel` object that provides basic information about the new "! custom acoustic model. "! @parameter E_RESPONSE | "! Service return value of type T_ACOUSTIC_MODEL + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_ACOUSTIC_MODEL importing - !I_create_acoustic_model type T_CREATE_ACOUSTIC_MODEL + !I_CREATE_ACOUSTIC_MODEL type T_CREATE_ACOUSTIC_MODEL !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -1603,17 +2277,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! List custom acoustic models. "! - "! @parameter I_language | + "! @parameter I_LANGUAGE | "! The identifier of the language for which custom language or custom acoustic "! models are to be returned (for example, `en-US`). Omit the parameter to see all "! custom language or custom acoustic models that are owned by the requesting "! credentials. "! @parameter E_RESPONSE | "! Service return value of type T_ACOUSTIC_MODELS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_ACOUSTIC_MODELS importing - !I_language type STRING optional + !I_LANGUAGE type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_ACOUSTIC_MODELS @@ -1621,16 +2296,17 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get a custom acoustic model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom acoustic model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. "! @parameter E_RESPONSE | "! Service return value of type T_ACOUSTIC_MODEL + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_ACOUSTIC_MODEL importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_ACOUSTIC_MODEL @@ -1638,24 +2314,25 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a custom acoustic model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom acoustic model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_ACOUSTIC_MODEL importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Train a custom acoustic model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom acoustic model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_custom_language_model_id | + "! @parameter I_CUSTOM_LANGUAGE_MODEL_ID | "! The customization ID (GUID) of a custom language model that is to be used during "! training of the custom acoustic model. Specify a custom language model that has "! been trained with verbatim transcriptions of the audio resources or that @@ -1665,11 +2342,12 @@ constants: "! own both custom models. "! @parameter E_RESPONSE | "! Service return value of type T_TRAINING_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods TRAIN_ACOUSTIC_MODEL importing - !I_customization_id type STRING - !I_custom_language_model_id type STRING optional + !I_CUSTOMIZATION_ID type STRING + !I_CUSTOM_LANGUAGE_MODEL_ID type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TRAINING_RESPONSE @@ -1677,29 +2355,30 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Reset a custom acoustic model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom acoustic model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods RESET_ACOUSTIC_MODEL importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Upgrade a custom acoustic model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom acoustic model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_custom_language_model_id | + "! @parameter I_CUSTOM_LANGUAGE_MODEL_ID | "! If the custom acoustic model was trained with a custom language model, the "! customization ID (GUID) of that custom language model. The custom language "! model must be upgraded before the custom acoustic model can be upgraded. The "! credentials specified with the request must own both custom models. - "! @parameter I_force | + "! @parameter I_FORCE | "! If `true`, forces the upgrade of a custom acoustic model for which no input data "! has been modified since it was last trained. Use this parameter only to force "! the upgrade of a custom acoustic model that is trained with a custom language @@ -1707,28 +2386,30 @@ constants: "! data modified since last training`. See [Upgrading a custom acoustic "! model](https://cloud.ibm.com/docs/services/speech-to-text?topic=speech-to-text- "! customUpgrade#upgradeAcoustic). + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPGRADE_ACOUSTIC_MODEL importing - !I_customization_id type STRING - !I_custom_language_model_id type STRING optional - !I_force type BOOLEAN default c_boolean_false + !I_CUSTOMIZATION_ID type STRING + !I_CUSTOM_LANGUAGE_MODEL_ID type STRING optional + !I_FORCE type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List audio resources. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom acoustic model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. "! @parameter E_RESPONSE | "! Service return value of type T_AUDIO_RESOURCES + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_AUDIO importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_AUDIO_RESOURCES @@ -1736,84 +2417,86 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Add an audio resource. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom acoustic model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_audio_name | + "! @parameter I_AUDIO_NAME | "! The name of the new audio resource for the custom acoustic model. Use a "! localized name that matches the language of the custom model and reflects the - "! contents of the resource. - "! * Include a maximum of 128 characters in the name. + "! contents of the resource.
+ "! * Include a maximum of 128 characters in the name.
"! * Do not use characters that need to be URL-encoded. For example, do not use "! spaces, slashes, backslashes, colons, ampersands, double quotes, plus signs, "! equals signs, questions marks, and so on in the name. (The service does not "! prevent the use of these characters. But because they must be URL-encoded - "! wherever used, their use is strongly discouraged.) + "! wherever used, their use is strongly discouraged.)
"! * Do not use the name of an audio resource that has already been added to the "! custom model. - "! @parameter I_audio_resource | + "! @parameter I_AUDIO_RESOURCE | "! The audio resource that is to be added to the custom acoustic model, an - "! individual audio file or an archive file. - "! + "! individual audio file or an archive file.
+ "!
"! With the `curl` command, use the `--data-binary` option to upload the file for "! the request. - "! @parameter I_Content_Type | + "! @parameter I_CONTENT_TYPE | "! For an audio-type resource, the format (MIME type) of the audio. For more "! information, see **Content types for audio-type resources** in the method - "! description. - "! + "! description.
+ "!
"! For an archive-type resource, the media type of the archive file. For more "! information, see **Content types for archive-type resources** in the method "! description. - "! @parameter I_Contained_Content_Type | + "! @parameter I_CONTAINED_CONTENT_TYPE | "! **For an archive-type resource,** specify the format of the audio files that are "! ** contained in the archive file if they are of type `audio/alaw`, `audio/basic`, "! ** `audio/l16`, or `audio/mulaw`. Include the `rate`, `channels`, and `endianness` "! ** parameters where necessary. In this case, all audio files that are contained in - "! ** the archive file must be of the indicated type. - "! ** + "! ** the archive file must be of the indicated type.
+ "! **
"! **For all other audio formats, you can omit the header. In this case, the audio "! ** files can be of multiple types as long as they are not of the types listed in - "! ** the previous paragraph. - "! ** + "! ** the previous paragraph.
+ "! **
"! **The parameter accepts all of the audio formats that are supported for use with "! ** speech recognition. For more information, see **Content types for audio-type - "! ** resources** in the method description. - "! ** + "! ** resources** in the method description.
+ "! **
"! ****For an audio-type resource,** omit the header. - "! @parameter I_allow_overwrite | + "! @parameter I_ALLOW_OVERWRITE | "! If `true`, the specified audio resource overwrites an existing audio resource "! with the same name. If `false`, the request fails if an audio resource with the "! same name already exists. The parameter has no effect if an audio resource with "! the same name does not already exist. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ADD_AUDIO importing - !I_customization_id type STRING - !I_audio_name type STRING - !I_audio_resource type FILE - !I_Content_Type type STRING default 'application/zip' - !I_Contained_Content_Type type STRING optional - !I_allow_overwrite type BOOLEAN default c_boolean_false + !I_CUSTOMIZATION_ID type STRING + !I_AUDIO_NAME type STRING + !I_AUDIO_RESOURCE type FILE + !I_CONTENT_TYPE type STRING default 'application/zip' + !I_CONTAINED_CONTENT_TYPE type STRING optional + !I_ALLOW_OVERWRITE type BOOLEAN default c_boolean_false !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Get an audio resource. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom acoustic model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_audio_name | + "! @parameter I_AUDIO_NAME | "! The name of the audio resource for the custom acoustic model. "! @parameter E_RESPONSE | "! Service return value of type T_AUDIO_LISTING + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_AUDIO importing - !I_customization_id type STRING - !I_audio_name type STRING + !I_CUSTOMIZATION_ID type STRING + !I_AUDIO_NAME type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_AUDIO_LISTING @@ -1821,29 +2504,31 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete an audio resource. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom acoustic model that is to be used for "! the request. You must make the request with credentials for the instance of the "! service that owns the custom model. - "! @parameter I_audio_name | + "! @parameter I_AUDIO_NAME | "! The name of the audio resource for the custom acoustic model. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_AUDIO importing - !I_customization_id type STRING - !I_audio_name type STRING + !I_CUSTOMIZATION_ID type STRING + !I_AUDIO_NAME type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Delete labeled data. "! - "! @parameter I_customer_id | + "! @parameter I_CUSTOMER_ID | "! The customer ID for which all data is to be deleted. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_USER_DATA importing - !I_customer_id type STRING + !I_CUSTOMER_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . @@ -1883,7 +2568,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -1924,7 +2609,7 @@ endmethod. * +--------------------------------------------------------------------------------------
method get_sdk_version_date. - e_sdk_version_date = '20191002122849'. + e_sdk_version_date = '20200210092825'. endmethod. @@ -1979,7 +2664,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->GET_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_model_id TYPE STRING +* | [--->] I_MODEL_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_SPEECH_MODEL * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1994,7 +2679,7 @@ method GET_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/models/{model_id}'. - replace all occurrences of `{model_id}` in ls_request_prop-url-path with i_model_id ignoring case. + replace all occurrences of `{model_id}` in ls_request_prop-url-path with i_MODEL_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -2028,27 +2713,29 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->RECOGNIZE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_audio TYPE FILE -* | [--->] I_Content_Type TYPE STRING (default ='application/octet-stream') -* | [--->] I_model TYPE STRING (default ='en-US_BroadbandModel') -* | [--->] I_language_customization_id TYPE STRING(optional) -* | [--->] I_acoustic_customization_id TYPE STRING(optional) -* | [--->] I_base_model_version TYPE STRING(optional) -* | [--->] I_customization_weight TYPE DOUBLE(optional) -* | [--->] I_inactivity_timeout TYPE INTEGER(optional) -* | [--->] I_keywords TYPE TT_STRING(optional) -* | [--->] I_keywords_threshold TYPE FLOAT(optional) -* | [--->] I_max_alternatives TYPE INTEGER(optional) -* | [--->] I_word_alternatives_threshold TYPE FLOAT(optional) -* | [--->] I_word_confidence TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_timestamps TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_profanity_filter TYPE BOOLEAN (default =c_boolean_true) -* | [--->] I_smart_formatting TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_speaker_labels TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_customization_id TYPE STRING(optional) -* | [--->] I_grammar_name TYPE STRING(optional) -* | [--->] I_redaction TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_audio_metrics TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_AUDIO TYPE FILE +* | [--->] I_CONTENT_TYPE TYPE STRING (default ='application/octet-stream') +* | [--->] I_MODEL TYPE STRING (default ='en-US_BroadbandModel') +* | [--->] I_LANGUAGE_CUSTOMIZATION_ID TYPE STRING(optional) +* | [--->] I_ACOUSTIC_CUSTOMIZATION_ID TYPE STRING(optional) +* | [--->] I_BASE_MODEL_VERSION TYPE STRING(optional) +* | [--->] I_CUSTOMIZATION_WEIGHT TYPE DOUBLE(optional) +* | [--->] I_INACTIVITY_TIMEOUT TYPE INTEGER(optional) +* | [--->] I_KEYWORDS TYPE TT_STRING(optional) +* | [--->] I_KEYWORDS_THRESHOLD TYPE FLOAT(optional) +* | [--->] I_MAX_ALTERNATIVES TYPE INTEGER(optional) +* | [--->] I_WORD_ALTERNATIVES_THRESHOLD TYPE FLOAT(optional) +* | [--->] I_WORD_CONFIDENCE TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_TIMESTAMPS TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_PROFANITY_FILTER TYPE BOOLEAN (default =c_boolean_true) +* | [--->] I_SMART_FORMATTING TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_SPEAKER_LABELS TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_CUSTOMIZATION_ID TYPE STRING(optional) +* | [--->] I_GRAMMAR_NAME TYPE STRING(optional) +* | [--->] I_REDACTION TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_AUDIO_METRICS TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_END_OF_PHRASE_SILENCE_TIME TYPE DOUBLE(optional) +* | [--->] I_SPLT_TRNSCRPT_AT_PHRASE_END TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_SPEECH_RECOGNITION_RESULTS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2074,8 +2761,8 @@ method RECOGNIZE. data: lv_queryparam type string. - if i_model is supplied. - lv_queryparam = escape( val = i_model format = cl_abap_format=>e_uri_full ). + if i_MODEL is supplied. + lv_queryparam = escape( val = i_MODEL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `model` @@ -2084,8 +2771,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_language_customization_id is supplied. - lv_queryparam = escape( val = i_language_customization_id format = cl_abap_format=>e_uri_full ). + if i_LANGUAGE_CUSTOMIZATION_ID is supplied. + lv_queryparam = escape( val = i_LANGUAGE_CUSTOMIZATION_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `language_customization_id` @@ -2094,8 +2781,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_acoustic_customization_id is supplied. - lv_queryparam = escape( val = i_acoustic_customization_id format = cl_abap_format=>e_uri_full ). + if i_ACOUSTIC_CUSTOMIZATION_ID is supplied. + lv_queryparam = escape( val = i_ACOUSTIC_CUSTOMIZATION_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `acoustic_customization_id` @@ -2104,8 +2791,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_base_model_version is supplied. - lv_queryparam = escape( val = i_base_model_version format = cl_abap_format=>e_uri_full ). + if i_BASE_MODEL_VERSION is supplied. + lv_queryparam = escape( val = i_BASE_MODEL_VERSION format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `base_model_version` @@ -2114,8 +2801,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_customization_weight is supplied. - lv_queryparam = i_customization_weight. + if i_CUSTOMIZATION_WEIGHT is supplied. + lv_queryparam = i_CUSTOMIZATION_WEIGHT. add_query_parameter( exporting i_parameter = `customization_weight` @@ -2124,8 +2811,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_inactivity_timeout is supplied. - lv_queryparam = i_inactivity_timeout. + if i_INACTIVITY_TIMEOUT is supplied. + lv_queryparam = i_INACTIVITY_TIMEOUT. add_query_parameter( exporting i_parameter = `inactivity_timeout` @@ -2134,12 +2821,12 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_keywords is supplied. + if i_KEYWORDS is supplied. data: - lv_item_keywords type STRING. + lv_item_KEYWORDS type STRING. clear: lv_queryparam, lv_sep. - loop at i_keywords into lv_item_keywords. - lv_queryparam = lv_queryparam && lv_sep && lv_item_keywords. + loop at i_KEYWORDS into lv_item_KEYWORDS. + lv_queryparam = lv_queryparam && lv_sep && lv_item_KEYWORDS. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -2151,8 +2838,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_keywords_threshold is supplied. - lv_queryparam = i_keywords_threshold. + if i_KEYWORDS_THRESHOLD is supplied. + lv_queryparam = i_KEYWORDS_THRESHOLD. add_query_parameter( exporting i_parameter = `keywords_threshold` @@ -2161,8 +2848,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_max_alternatives is supplied. - lv_queryparam = i_max_alternatives. + if i_MAX_ALTERNATIVES is supplied. + lv_queryparam = i_MAX_ALTERNATIVES. add_query_parameter( exporting i_parameter = `max_alternatives` @@ -2171,8 +2858,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_word_alternatives_threshold is supplied. - lv_queryparam = i_word_alternatives_threshold. + if i_WORD_ALTERNATIVES_THRESHOLD is supplied. + lv_queryparam = i_WORD_ALTERNATIVES_THRESHOLD. add_query_parameter( exporting i_parameter = `word_alternatives_threshold` @@ -2181,8 +2868,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_word_confidence is supplied. - lv_queryparam = i_word_confidence. + if i_WORD_CONFIDENCE is supplied. + lv_queryparam = i_WORD_CONFIDENCE. add_query_parameter( exporting i_parameter = `word_confidence` @@ -2192,8 +2879,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_timestamps is supplied. - lv_queryparam = i_timestamps. + if i_TIMESTAMPS is supplied. + lv_queryparam = i_TIMESTAMPS. add_query_parameter( exporting i_parameter = `timestamps` @@ -2203,8 +2890,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_profanity_filter is supplied. - lv_queryparam = i_profanity_filter. + if i_PROFANITY_FILTER is supplied. + lv_queryparam = i_PROFANITY_FILTER. add_query_parameter( exporting i_parameter = `profanity_filter` @@ -2214,8 +2901,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_smart_formatting is supplied. - lv_queryparam = i_smart_formatting. + if i_SMART_FORMATTING is supplied. + lv_queryparam = i_SMART_FORMATTING. add_query_parameter( exporting i_parameter = `smart_formatting` @@ -2225,8 +2912,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_speaker_labels is supplied. - lv_queryparam = i_speaker_labels. + if i_SPEAKER_LABELS is supplied. + lv_queryparam = i_SPEAKER_LABELS. add_query_parameter( exporting i_parameter = `speaker_labels` @@ -2236,8 +2923,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_customization_id is supplied. - lv_queryparam = escape( val = i_customization_id format = cl_abap_format=>e_uri_full ). + if i_CUSTOMIZATION_ID is supplied. + lv_queryparam = escape( val = i_CUSTOMIZATION_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `customization_id` @@ -2246,8 +2933,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_grammar_name is supplied. - lv_queryparam = escape( val = i_grammar_name format = cl_abap_format=>e_uri_full ). + if i_GRAMMAR_NAME is supplied. + lv_queryparam = escape( val = i_GRAMMAR_NAME format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `grammar_name` @@ -2256,8 +2943,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_redaction is supplied. - lv_queryparam = i_redaction. + if i_REDACTION is supplied. + lv_queryparam = i_REDACTION. add_query_parameter( exporting i_parameter = `redaction` @@ -2267,8 +2954,8 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_audio_metrics is supplied. - lv_queryparam = i_audio_metrics. + if i_AUDIO_METRICS is supplied. + lv_queryparam = i_AUDIO_METRICS. add_query_parameter( exporting i_parameter = `audio_metrics` @@ -2278,18 +2965,39 @@ method RECOGNIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_END_OF_PHRASE_SILENCE_TIME is supplied. + lv_queryparam = i_END_OF_PHRASE_SILENCE_TIME. + add_query_parameter( + exporting + i_parameter = `end_of_phrase_silence_time` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + + if i_SPLT_TRNSCRPT_AT_PHRASE_END is supplied. + lv_queryparam = i_SPLT_TRNSCRPT_AT_PHRASE_END. + add_query_parameter( + exporting + i_parameter = `split_transcript_at_phrase_end` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + " process header parameters data: lv_headerparam type string ##NEEDED. - if i_Content_Type is supplied. - ls_request_prop-header_content_type = I_Content_Type. + if i_CONTENT_TYPE is supplied. + ls_request_prop-header_content_type = I_CONTENT_TYPE. endif. " process body parameters - ls_request_prop-body_bin = i_audio. + ls_request_prop-body_bin = i_AUDIO. " execute HTTP POST request lo_response = HTTP_POST( i_request_prop = ls_request_prop ). @@ -2310,8 +3018,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->REGISTER_CALLBACK * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_callback_url TYPE STRING -* | [--->] I_user_secret TYPE STRING(optional) +* | [--->] I_CALLBACK_URL TYPE STRING +* | [--->] I_USER_SECRET TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_REGISTER_STATUS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2337,7 +3045,7 @@ method REGISTER_CALLBACK. data: lv_queryparam type string. - lv_queryparam = escape( val = i_callback_url format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_CALLBACK_URL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `callback_url` @@ -2345,8 +3053,8 @@ method REGISTER_CALLBACK. changing c_url = ls_request_prop-url ) ##NO_TEXT. - if i_user_secret is supplied. - lv_queryparam = escape( val = i_user_secret format = cl_abap_format=>e_uri_full ). + if i_USER_SECRET is supplied. + lv_queryparam = escape( val = i_USER_SECRET format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `user_secret` @@ -2378,7 +3086,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->UNREGISTER_CALLBACK * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_callback_url TYPE STRING +* | [--->] I_CALLBACK_URL TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method UNREGISTER_CALLBACK. @@ -2401,7 +3109,7 @@ method UNREGISTER_CALLBACK. data: lv_queryparam type string. - lv_queryparam = escape( val = i_callback_url format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_CALLBACK_URL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `callback_url` @@ -2424,33 +3132,35 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->CREATE_JOB * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_audio TYPE FILE -* | [--->] I_Content_Type TYPE STRING (default ='application/octet-stream') -* | [--->] I_model TYPE STRING (default ='en-US_BroadbandModel') -* | [--->] I_callback_url TYPE STRING(optional) -* | [--->] I_events TYPE STRING(optional) -* | [--->] I_user_token TYPE STRING(optional) -* | [--->] I_results_ttl TYPE INTEGER(optional) -* | [--->] I_language_customization_id TYPE STRING(optional) -* | [--->] I_acoustic_customization_id TYPE STRING(optional) -* | [--->] I_base_model_version TYPE STRING(optional) -* | [--->] I_customization_weight TYPE DOUBLE(optional) -* | [--->] I_inactivity_timeout TYPE INTEGER(optional) -* | [--->] I_keywords TYPE TT_STRING(optional) -* | [--->] I_keywords_threshold TYPE FLOAT(optional) -* | [--->] I_max_alternatives TYPE INTEGER(optional) -* | [--->] I_word_alternatives_threshold TYPE FLOAT(optional) -* | [--->] I_word_confidence TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_timestamps TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_profanity_filter TYPE BOOLEAN (default =c_boolean_true) -* | [--->] I_smart_formatting TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_speaker_labels TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_customization_id TYPE STRING(optional) -* | [--->] I_grammar_name TYPE STRING(optional) -* | [--->] I_redaction TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_processing_metrics TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_processing_metrics_interval TYPE FLOAT(optional) -* | [--->] I_audio_metrics TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_AUDIO TYPE FILE +* | [--->] I_CONTENT_TYPE TYPE STRING (default ='application/octet-stream') +* | [--->] I_MODEL TYPE STRING (default ='en-US_BroadbandModel') +* | [--->] I_CALLBACK_URL TYPE STRING(optional) +* | [--->] I_EVENTS TYPE STRING(optional) +* | [--->] I_USER_TOKEN TYPE STRING(optional) +* | [--->] I_RESULTS_TTL TYPE INTEGER(optional) +* | [--->] I_LANGUAGE_CUSTOMIZATION_ID TYPE STRING(optional) +* | [--->] I_ACOUSTIC_CUSTOMIZATION_ID TYPE STRING(optional) +* | [--->] I_BASE_MODEL_VERSION TYPE STRING(optional) +* | [--->] I_CUSTOMIZATION_WEIGHT TYPE DOUBLE(optional) +* | [--->] I_INACTIVITY_TIMEOUT TYPE INTEGER(optional) +* | [--->] I_KEYWORDS TYPE TT_STRING(optional) +* | [--->] I_KEYWORDS_THRESHOLD TYPE FLOAT(optional) +* | [--->] I_MAX_ALTERNATIVES TYPE INTEGER(optional) +* | [--->] I_WORD_ALTERNATIVES_THRESHOLD TYPE FLOAT(optional) +* | [--->] I_WORD_CONFIDENCE TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_TIMESTAMPS TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_PROFANITY_FILTER TYPE BOOLEAN (default =c_boolean_true) +* | [--->] I_SMART_FORMATTING TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_SPEAKER_LABELS TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_CUSTOMIZATION_ID TYPE STRING(optional) +* | [--->] I_GRAMMAR_NAME TYPE STRING(optional) +* | [--->] I_REDACTION TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_PROCESSING_METRICS TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_PROCESSING_METRICS_INTERVAL TYPE FLOAT(optional) +* | [--->] I_AUDIO_METRICS TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_END_OF_PHRASE_SILENCE_TIME TYPE DOUBLE(optional) +* | [--->] I_SPLT_TRNSCRPT_AT_PHRASE_END TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_RECOGNITION_JOB * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2476,8 +3186,8 @@ method CREATE_JOB. data: lv_queryparam type string. - if i_model is supplied. - lv_queryparam = escape( val = i_model format = cl_abap_format=>e_uri_full ). + if i_MODEL is supplied. + lv_queryparam = escape( val = i_MODEL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `model` @@ -2486,8 +3196,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_callback_url is supplied. - lv_queryparam = escape( val = i_callback_url format = cl_abap_format=>e_uri_full ). + if i_CALLBACK_URL is supplied. + lv_queryparam = escape( val = i_CALLBACK_URL format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `callback_url` @@ -2496,8 +3206,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_events is supplied. - lv_queryparam = escape( val = i_events format = cl_abap_format=>e_uri_full ). + if i_EVENTS is supplied. + lv_queryparam = escape( val = i_EVENTS format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `events` @@ -2506,8 +3216,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_user_token is supplied. - lv_queryparam = escape( val = i_user_token format = cl_abap_format=>e_uri_full ). + if i_USER_TOKEN is supplied. + lv_queryparam = escape( val = i_USER_TOKEN format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `user_token` @@ -2516,8 +3226,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_results_ttl is supplied. - lv_queryparam = i_results_ttl. + if i_RESULTS_TTL is supplied. + lv_queryparam = i_RESULTS_TTL. add_query_parameter( exporting i_parameter = `results_ttl` @@ -2526,8 +3236,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_language_customization_id is supplied. - lv_queryparam = escape( val = i_language_customization_id format = cl_abap_format=>e_uri_full ). + if i_LANGUAGE_CUSTOMIZATION_ID is supplied. + lv_queryparam = escape( val = i_LANGUAGE_CUSTOMIZATION_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `language_customization_id` @@ -2536,8 +3246,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_acoustic_customization_id is supplied. - lv_queryparam = escape( val = i_acoustic_customization_id format = cl_abap_format=>e_uri_full ). + if i_ACOUSTIC_CUSTOMIZATION_ID is supplied. + lv_queryparam = escape( val = i_ACOUSTIC_CUSTOMIZATION_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `acoustic_customization_id` @@ -2546,8 +3256,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_base_model_version is supplied. - lv_queryparam = escape( val = i_base_model_version format = cl_abap_format=>e_uri_full ). + if i_BASE_MODEL_VERSION is supplied. + lv_queryparam = escape( val = i_BASE_MODEL_VERSION format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `base_model_version` @@ -2556,8 +3266,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_customization_weight is supplied. - lv_queryparam = i_customization_weight. + if i_CUSTOMIZATION_WEIGHT is supplied. + lv_queryparam = i_CUSTOMIZATION_WEIGHT. add_query_parameter( exporting i_parameter = `customization_weight` @@ -2566,8 +3276,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_inactivity_timeout is supplied. - lv_queryparam = i_inactivity_timeout. + if i_INACTIVITY_TIMEOUT is supplied. + lv_queryparam = i_INACTIVITY_TIMEOUT. add_query_parameter( exporting i_parameter = `inactivity_timeout` @@ -2576,12 +3286,12 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_keywords is supplied. + if i_KEYWORDS is supplied. data: - lv_item_keywords type STRING. + lv_item_KEYWORDS type STRING. clear: lv_queryparam, lv_sep. - loop at i_keywords into lv_item_keywords. - lv_queryparam = lv_queryparam && lv_sep && lv_item_keywords. + loop at i_KEYWORDS into lv_item_KEYWORDS. + lv_queryparam = lv_queryparam && lv_sep && lv_item_KEYWORDS. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -2593,8 +3303,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_keywords_threshold is supplied. - lv_queryparam = i_keywords_threshold. + if i_KEYWORDS_THRESHOLD is supplied. + lv_queryparam = i_KEYWORDS_THRESHOLD. add_query_parameter( exporting i_parameter = `keywords_threshold` @@ -2603,8 +3313,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_max_alternatives is supplied. - lv_queryparam = i_max_alternatives. + if i_MAX_ALTERNATIVES is supplied. + lv_queryparam = i_MAX_ALTERNATIVES. add_query_parameter( exporting i_parameter = `max_alternatives` @@ -2613,8 +3323,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_word_alternatives_threshold is supplied. - lv_queryparam = i_word_alternatives_threshold. + if i_WORD_ALTERNATIVES_THRESHOLD is supplied. + lv_queryparam = i_WORD_ALTERNATIVES_THRESHOLD. add_query_parameter( exporting i_parameter = `word_alternatives_threshold` @@ -2623,8 +3333,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_word_confidence is supplied. - lv_queryparam = i_word_confidence. + if i_WORD_CONFIDENCE is supplied. + lv_queryparam = i_WORD_CONFIDENCE. add_query_parameter( exporting i_parameter = `word_confidence` @@ -2634,8 +3344,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_timestamps is supplied. - lv_queryparam = i_timestamps. + if i_TIMESTAMPS is supplied. + lv_queryparam = i_TIMESTAMPS. add_query_parameter( exporting i_parameter = `timestamps` @@ -2645,8 +3355,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_profanity_filter is supplied. - lv_queryparam = i_profanity_filter. + if i_PROFANITY_FILTER is supplied. + lv_queryparam = i_PROFANITY_FILTER. add_query_parameter( exporting i_parameter = `profanity_filter` @@ -2656,8 +3366,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_smart_formatting is supplied. - lv_queryparam = i_smart_formatting. + if i_SMART_FORMATTING is supplied. + lv_queryparam = i_SMART_FORMATTING. add_query_parameter( exporting i_parameter = `smart_formatting` @@ -2667,8 +3377,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_speaker_labels is supplied. - lv_queryparam = i_speaker_labels. + if i_SPEAKER_LABELS is supplied. + lv_queryparam = i_SPEAKER_LABELS. add_query_parameter( exporting i_parameter = `speaker_labels` @@ -2678,8 +3388,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_customization_id is supplied. - lv_queryparam = escape( val = i_customization_id format = cl_abap_format=>e_uri_full ). + if i_CUSTOMIZATION_ID is supplied. + lv_queryparam = escape( val = i_CUSTOMIZATION_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `customization_id` @@ -2688,8 +3398,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_grammar_name is supplied. - lv_queryparam = escape( val = i_grammar_name format = cl_abap_format=>e_uri_full ). + if i_GRAMMAR_NAME is supplied. + lv_queryparam = escape( val = i_GRAMMAR_NAME format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `grammar_name` @@ -2698,8 +3408,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_redaction is supplied. - lv_queryparam = i_redaction. + if i_REDACTION is supplied. + lv_queryparam = i_REDACTION. add_query_parameter( exporting i_parameter = `redaction` @@ -2709,8 +3419,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_processing_metrics is supplied. - lv_queryparam = i_processing_metrics. + if i_PROCESSING_METRICS is supplied. + lv_queryparam = i_PROCESSING_METRICS. add_query_parameter( exporting i_parameter = `processing_metrics` @@ -2720,8 +3430,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_processing_metrics_interval is supplied. - lv_queryparam = i_processing_metrics_interval. + if i_PROCESSING_METRICS_INTERVAL is supplied. + lv_queryparam = i_PROCESSING_METRICS_INTERVAL. add_query_parameter( exporting i_parameter = `processing_metrics_interval` @@ -2730,8 +3440,8 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_audio_metrics is supplied. - lv_queryparam = i_audio_metrics. + if i_AUDIO_METRICS is supplied. + lv_queryparam = i_AUDIO_METRICS. add_query_parameter( exporting i_parameter = `audio_metrics` @@ -2741,18 +3451,39 @@ method CREATE_JOB. c_url = ls_request_prop-url ) ##NO_TEXT. endif. + if i_END_OF_PHRASE_SILENCE_TIME is supplied. + lv_queryparam = i_END_OF_PHRASE_SILENCE_TIME. + add_query_parameter( + exporting + i_parameter = `end_of_phrase_silence_time` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + + if i_SPLT_TRNSCRPT_AT_PHRASE_END is supplied. + lv_queryparam = i_SPLT_TRNSCRPT_AT_PHRASE_END. + add_query_parameter( + exporting + i_parameter = `split_transcript_at_phrase_end` + i_value = lv_queryparam + i_is_boolean = c_boolean_true + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + " process header parameters data: lv_headerparam type string ##NEEDED. - if i_Content_Type is supplied. - ls_request_prop-header_content_type = I_Content_Type. + if i_CONTENT_TYPE is supplied. + ls_request_prop-header_content_type = I_CONTENT_TYPE. endif. " process body parameters - ls_request_prop-body_bin = i_audio. + ls_request_prop-body_bin = i_AUDIO. " execute HTTP POST request lo_response = HTTP_POST( i_request_prop = ls_request_prop ). @@ -2818,7 +3549,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->CHECK_JOB * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_id TYPE STRING +* | [--->] I_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_RECOGNITION_JOB * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -2833,7 +3564,7 @@ method CHECK_JOB. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/recognitions/{id}'. - replace all occurrences of `{id}` in ls_request_prop-url-path with i_id ignoring case. + replace all occurrences of `{id}` in ls_request_prop-url-path with i_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -2866,7 +3597,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->DELETE_JOB * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_id TYPE STRING +* | [--->] I_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_JOB. @@ -2879,7 +3610,7 @@ method DELETE_JOB. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/recognitions/{id}'. - replace all occurrences of `{id}` in ls_request_prop-url-path with i_id ignoring case. + replace all occurrences of `{id}` in ls_request_prop-url-path with i_ID ignoring case. " standard headers set_default_query_parameters( @@ -2904,7 +3635,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->CREATE_LANGUAGE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_create_language_model TYPE T_CREATE_LANGUAGE_MODEL +* | [--->] I_CREATE_LANGUAGE_MODEL TYPE T_CREATE_LANGUAGE_MODEL * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_LANGUAGE_MODEL @@ -2941,20 +3672,20 @@ method CREATE_LANGUAGE_MODEL. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_create_language_model ). + lv_datatype = get_datatype( i_CREATE_LANGUAGE_MODEL ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_create_language_model i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_CREATE_LANGUAGE_MODEL i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'create_language_model' i_value = i_create_language_model ). + lv_bodyparam = abap_to_json( i_name = 'create_language_model' i_value = i_CREATE_LANGUAGE_MODEL ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_create_language_model to . + assign i_CREATE_LANGUAGE_MODEL to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -2988,7 +3719,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->LIST_LANGUAGE_MODELS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_language TYPE STRING(optional) +* | [--->] I_LANGUAGE TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_LANGUAGE_MODELS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3014,8 +3745,8 @@ method LIST_LANGUAGE_MODELS. data: lv_queryparam type string. - if i_language is supplied. - lv_queryparam = escape( val = i_language format = cl_abap_format=>e_uri_full ). + if i_LANGUAGE is supplied. + lv_queryparam = escape( val = i_LANGUAGE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `language` @@ -3047,7 +3778,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->GET_LANGUAGE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_LANGUAGE_MODEL * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3062,7 +3793,7 @@ method GET_LANGUAGE_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3095,7 +3826,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->DELETE_LANGUAGE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -3109,7 +3840,7 @@ method DELETE_LANGUAGE_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3134,9 +3865,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->TRAIN_LANGUAGE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_word_type_to_add TYPE STRING (default ='all') -* | [--->] I_customization_weight TYPE DOUBLE(optional) +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_WORD_TYPE_TO_ADD TYPE STRING (default ='all') +* | [--->] I_CUSTOMIZATION_WEIGHT TYPE DOUBLE(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRAINING_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3151,7 +3882,7 @@ method TRAIN_LANGUAGE_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/train'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3163,8 +3894,8 @@ method TRAIN_LANGUAGE_MODEL. data: lv_queryparam type string. - if i_word_type_to_add is supplied. - lv_queryparam = escape( val = i_word_type_to_add format = cl_abap_format=>e_uri_full ). + if i_WORD_TYPE_TO_ADD is supplied. + lv_queryparam = escape( val = i_WORD_TYPE_TO_ADD format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `word_type_to_add` @@ -3173,8 +3904,8 @@ method TRAIN_LANGUAGE_MODEL. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_customization_weight is supplied. - lv_queryparam = i_customization_weight. + if i_CUSTOMIZATION_WEIGHT is supplied. + lv_queryparam = i_CUSTOMIZATION_WEIGHT. add_query_parameter( exporting i_parameter = `customization_weight` @@ -3206,7 +3937,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->RESET_LANGUAGE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -3220,7 +3951,7 @@ method RESET_LANGUAGE_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/reset'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3245,7 +3976,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->UPGRADE_LANGUAGE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -3259,7 +3990,7 @@ method UPGRADE_LANGUAGE_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/upgrade_model'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3285,7 +4016,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->LIST_CORPORA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CORPORA * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3300,7 +4031,7 @@ method LIST_CORPORA. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/corpora'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3333,11 +4064,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->ADD_CORPUS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_corpus_name TYPE STRING -* | [--->] I_corpus_file TYPE FILE -* | [--->] I_allow_overwrite TYPE BOOLEAN (default =c_boolean_false) -* | [--->] I_corpus_file_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_CORPUS_NAME TYPE STRING +* | [--->] I_CORPUS_FILE TYPE FILE +* | [--->] I_ALLOW_OVERWRITE TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_CORPUS_FILE_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3352,8 +4083,8 @@ method ADD_CORPUS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/corpora/{corpus_name}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{corpus_name}` in ls_request_prop-url-path with i_corpus_name ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{corpus_name}` in ls_request_prop-url-path with i_CORPUS_NAME ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3366,8 +4097,8 @@ method ADD_CORPUS. data: lv_queryparam type string. - if i_allow_overwrite is supplied. - lv_queryparam = i_allow_overwrite. + if i_ALLOW_OVERWRITE is supplied. + lv_queryparam = i_ALLOW_OVERWRITE. add_query_parameter( exporting i_parameter = `allow_overwrite` @@ -3393,14 +4124,14 @@ method ADD_CORPUS. - if not i_corpus_file is initial. - lv_extension = get_file_extension( I_corpus_file_CT ). + if not i_CORPUS_FILE is initial. + lv_extension = get_file_extension( I_CORPUS_FILE_CT ). lv_value = `form-data; name="corpus_file"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. - ls_form_part-content_type = I_corpus_file_CT. + ls_form_part-content_type = I_CORPUS_FILE_CT. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_corpus_file. + ls_form_part-xdata = i_CORPUS_FILE. append ls_form_part to lt_form_part. endif. @@ -3417,8 +4148,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->GET_CORPUS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_corpus_name TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_CORPUS_NAME TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CORPUS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3433,8 +4164,8 @@ method GET_CORPUS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/corpora/{corpus_name}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{corpus_name}` in ls_request_prop-url-path with i_corpus_name ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{corpus_name}` in ls_request_prop-url-path with i_CORPUS_NAME ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3467,8 +4198,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->DELETE_CORPUS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_corpus_name TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_CORPUS_NAME TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -3482,8 +4213,8 @@ method DELETE_CORPUS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/corpora/{corpus_name}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{corpus_name}` in ls_request_prop-url-path with i_corpus_name ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{corpus_name}` in ls_request_prop-url-path with i_CORPUS_NAME ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3509,9 +4240,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->LIST_WORDS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_word_type TYPE STRING (default ='all') -* | [--->] I_sort TYPE STRING (default ='alphabetical') +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_WORD_TYPE TYPE STRING (default ='all') +* | [--->] I_SORT TYPE STRING (default ='alphabetical') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_WORDS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3526,7 +4257,7 @@ method LIST_WORDS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/words'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3538,8 +4269,8 @@ method LIST_WORDS. data: lv_queryparam type string. - if i_word_type is supplied. - lv_queryparam = escape( val = i_word_type format = cl_abap_format=>e_uri_full ). + if i_WORD_TYPE is supplied. + lv_queryparam = escape( val = i_WORD_TYPE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `word_type` @@ -3548,8 +4279,8 @@ method LIST_WORDS. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_sort is supplied. - lv_queryparam = escape( val = i_sort format = cl_abap_format=>e_uri_full ). + if i_SORT is supplied. + lv_queryparam = escape( val = i_SORT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `sort` @@ -3581,8 +4312,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->ADD_WORDS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_custom_words TYPE T_CUSTOM_WORDS +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_CUSTOM_WORDS TYPE T_CUSTOM_WORDS * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3597,7 +4328,7 @@ method ADD_WORDS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/words'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3619,20 +4350,20 @@ method ADD_WORDS. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_custom_words ). + lv_datatype = get_datatype( i_CUSTOM_WORDS ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_custom_words i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_CUSTOM_WORDS i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'custom_words' i_value = i_custom_words ). + lv_bodyparam = abap_to_json( i_name = 'custom_words' i_value = i_CUSTOM_WORDS ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_custom_words to . + assign i_CUSTOM_WORDS to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3658,9 +4389,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->ADD_WORD * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_word_name TYPE STRING -* | [--->] I_custom_word TYPE T_CUSTOM_WORD +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_WORD_NAME TYPE STRING +* | [--->] I_CUSTOM_WORD TYPE T_CUSTOM_WORD * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3675,8 +4406,8 @@ method ADD_WORD. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/words/{word_name}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{word_name}` in ls_request_prop-url-path with i_word_name ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{word_name}` in ls_request_prop-url-path with i_WORD_NAME ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -3698,20 +4429,20 @@ method ADD_WORD. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_custom_word ). + lv_datatype = get_datatype( i_CUSTOM_WORD ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_custom_word i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_CUSTOM_WORD i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'custom_word' i_value = i_custom_word ). + lv_bodyparam = abap_to_json( i_name = 'custom_word' i_value = i_CUSTOM_WORD ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_custom_word to . + assign i_CUSTOM_WORD to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3737,8 +4468,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->GET_WORD * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_word_name TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_WORD_NAME TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_WORD * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3753,8 +4484,8 @@ method GET_WORD. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/words/{word_name}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{word_name}` in ls_request_prop-url-path with i_word_name ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{word_name}` in ls_request_prop-url-path with i_WORD_NAME ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3787,8 +4518,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->DELETE_WORD * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_word_name TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_WORD_NAME TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -3802,8 +4533,8 @@ method DELETE_WORD. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/words/{word_name}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{word_name}` in ls_request_prop-url-path with i_word_name ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{word_name}` in ls_request_prop-url-path with i_WORD_NAME ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3829,7 +4560,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->LIST_GRAMMARS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_GRAMMARS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3844,7 +4575,7 @@ method LIST_GRAMMARS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/grammars'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3877,11 +4608,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->ADD_GRAMMAR * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_grammar_name TYPE STRING -* | [--->] I_grammar_file TYPE STRING -* | [--->] I_Content_Type TYPE STRING (default ='application/srgs') -* | [--->] I_allow_overwrite TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_GRAMMAR_NAME TYPE STRING +* | [--->] I_GRAMMAR_FILE TYPE STRING +* | [--->] I_CONTENT_TYPE TYPE STRING (default ='application/srgs') +* | [--->] I_ALLOW_OVERWRITE TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -3895,8 +4626,8 @@ method ADD_GRAMMAR. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/grammars/{grammar_name}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{grammar_name}` in ls_request_prop-url-path with i_grammar_name ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{grammar_name}` in ls_request_prop-url-path with i_GRAMMAR_NAME ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -3908,8 +4639,8 @@ method ADD_GRAMMAR. data: lv_queryparam type string. - if i_allow_overwrite is supplied. - lv_queryparam = i_allow_overwrite. + if i_ALLOW_OVERWRITE is supplied. + lv_queryparam = i_ALLOW_OVERWRITE. add_query_parameter( exporting i_parameter = `allow_overwrite` @@ -3923,7 +4654,7 @@ method ADD_GRAMMAR. data: lv_headerparam type string ##NEEDED. - ls_request_prop-header_content_type = I_Content_Type. + ls_request_prop-header_content_type = I_CONTENT_TYPE. @@ -3935,20 +4666,20 @@ method ADD_GRAMMAR. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_grammar_file ). + lv_datatype = get_datatype( i_GRAMMAR_FILE ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_grammar_file i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_GRAMMAR_FILE i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'grammar_file' i_value = i_grammar_file ). + lv_bodyparam = abap_to_json( i_name = 'grammar_file' i_value = i_GRAMMAR_FILE ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_grammar_file to . + assign i_GRAMMAR_FILE to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -3974,8 +4705,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->GET_GRAMMAR * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_grammar_name TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_GRAMMAR_NAME TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_GRAMMAR * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -3990,8 +4721,8 @@ method GET_GRAMMAR. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/grammars/{grammar_name}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{grammar_name}` in ls_request_prop-url-path with i_grammar_name ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{grammar_name}` in ls_request_prop-url-path with i_GRAMMAR_NAME ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4024,8 +4755,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->DELETE_GRAMMAR * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_grammar_name TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_GRAMMAR_NAME TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -4039,8 +4770,8 @@ method DELETE_GRAMMAR. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/grammars/{grammar_name}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{grammar_name}` in ls_request_prop-url-path with i_grammar_name ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{grammar_name}` in ls_request_prop-url-path with i_GRAMMAR_NAME ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4066,7 +4797,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->CREATE_ACOUSTIC_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_create_acoustic_model TYPE T_CREATE_ACOUSTIC_MODEL +* | [--->] I_CREATE_ACOUSTIC_MODEL TYPE T_CREATE_ACOUSTIC_MODEL * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ACOUSTIC_MODEL @@ -4103,20 +4834,20 @@ method CREATE_ACOUSTIC_MODEL. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_create_acoustic_model ). + lv_datatype = get_datatype( i_CREATE_ACOUSTIC_MODEL ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_create_acoustic_model i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_CREATE_ACOUSTIC_MODEL i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'create_acoustic_model' i_value = i_create_acoustic_model ). + lv_bodyparam = abap_to_json( i_name = 'create_acoustic_model' i_value = i_CREATE_ACOUSTIC_MODEL ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_create_acoustic_model to . + assign i_CREATE_ACOUSTIC_MODEL to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -4150,7 +4881,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->LIST_ACOUSTIC_MODELS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_language TYPE STRING(optional) +* | [--->] I_LANGUAGE TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ACOUSTIC_MODELS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4176,8 +4907,8 @@ method LIST_ACOUSTIC_MODELS. data: lv_queryparam type string. - if i_language is supplied. - lv_queryparam = escape( val = i_language format = cl_abap_format=>e_uri_full ). + if i_LANGUAGE is supplied. + lv_queryparam = escape( val = i_LANGUAGE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `language` @@ -4209,7 +4940,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->GET_ACOUSTIC_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ACOUSTIC_MODEL * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4224,7 +4955,7 @@ method GET_ACOUSTIC_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/acoustic_customizations/{customization_id}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4257,7 +4988,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->DELETE_ACOUSTIC_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -4271,7 +5002,7 @@ method DELETE_ACOUSTIC_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/acoustic_customizations/{customization_id}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4296,8 +5027,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->TRAIN_ACOUSTIC_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_custom_language_model_id TYPE STRING(optional) +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_CUSTOM_LANGUAGE_MODEL_ID TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRAINING_RESPONSE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4312,7 +5043,7 @@ method TRAIN_ACOUSTIC_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/acoustic_customizations/{customization_id}/train'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4324,8 +5055,8 @@ method TRAIN_ACOUSTIC_MODEL. data: lv_queryparam type string. - if i_custom_language_model_id is supplied. - lv_queryparam = escape( val = i_custom_language_model_id format = cl_abap_format=>e_uri_full ). + if i_CUSTOM_LANGUAGE_MODEL_ID is supplied. + lv_queryparam = escape( val = i_CUSTOM_LANGUAGE_MODEL_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `custom_language_model_id` @@ -4357,7 +5088,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->RESET_ACOUSTIC_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -4371,7 +5102,7 @@ method RESET_ACOUSTIC_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/acoustic_customizations/{customization_id}/reset'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4396,9 +5127,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->UPGRADE_ACOUSTIC_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_custom_language_model_id TYPE STRING(optional) -* | [--->] I_force TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_CUSTOM_LANGUAGE_MODEL_ID TYPE STRING(optional) +* | [--->] I_FORCE TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -4412,7 +5143,7 @@ method UPGRADE_ACOUSTIC_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/acoustic_customizations/{customization_id}/upgrade_model'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4424,8 +5155,8 @@ method UPGRADE_ACOUSTIC_MODEL. data: lv_queryparam type string. - if i_custom_language_model_id is supplied. - lv_queryparam = escape( val = i_custom_language_model_id format = cl_abap_format=>e_uri_full ). + if i_CUSTOM_LANGUAGE_MODEL_ID is supplied. + lv_queryparam = escape( val = i_CUSTOM_LANGUAGE_MODEL_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `custom_language_model_id` @@ -4434,8 +5165,8 @@ method UPGRADE_ACOUSTIC_MODEL. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_force is supplied. - lv_queryparam = i_force. + if i_FORCE is supplied. + lv_queryparam = i_FORCE. add_query_parameter( exporting i_parameter = `force` @@ -4461,7 +5192,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->LIST_AUDIO * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_AUDIO_RESOURCES * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4476,7 +5207,7 @@ method LIST_AUDIO. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/acoustic_customizations/{customization_id}/audio'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4509,12 +5240,12 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->ADD_AUDIO * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_audio_name TYPE STRING -* | [--->] I_audio_resource TYPE FILE -* | [--->] I_Content_Type TYPE STRING (default ='application/zip') -* | [--->] I_Contained_Content_Type TYPE STRING(optional) -* | [--->] I_allow_overwrite TYPE BOOLEAN (default =c_boolean_false) +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_AUDIO_NAME TYPE STRING +* | [--->] I_AUDIO_RESOURCE TYPE FILE +* | [--->] I_CONTENT_TYPE TYPE STRING (default ='application/zip') +* | [--->] I_CONTAINED_CONTENT_TYPE TYPE STRING(optional) +* | [--->] I_ALLOW_OVERWRITE TYPE BOOLEAN (default =c_boolean_false) * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -4528,8 +5259,8 @@ method ADD_AUDIO. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/acoustic_customizations/{customization_id}/audio/{audio_name}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{audio_name}` in ls_request_prop-url-path with i_audio_name ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{audio_name}` in ls_request_prop-url-path with i_AUDIO_NAME ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4541,8 +5272,8 @@ method ADD_AUDIO. data: lv_queryparam type string. - if i_allow_overwrite is supplied. - lv_queryparam = i_allow_overwrite. + if i_ALLOW_OVERWRITE is supplied. + lv_queryparam = i_ALLOW_OVERWRITE. add_query_parameter( exporting i_parameter = `allow_overwrite` @@ -4556,12 +5287,12 @@ method ADD_AUDIO. data: lv_headerparam type string ##NEEDED. - if i_Content_Type is supplied. - ls_request_prop-header_content_type = I_Content_Type. + if i_CONTENT_TYPE is supplied. + ls_request_prop-header_content_type = I_CONTENT_TYPE. endif. - if i_Contained_Content_Type is supplied. - lv_headerparam = I_Contained_Content_Type. + if i_CONTAINED_CONTENT_TYPE is supplied. + lv_headerparam = I_CONTAINED_CONTENT_TYPE. add_header_parameter( exporting i_parameter = 'Contained-Content-Type' @@ -4573,7 +5304,7 @@ method ADD_AUDIO. " process body parameters - ls_request_prop-body_bin = i_audio_resource. + ls_request_prop-body_bin = i_AUDIO_RESOURCE. " execute HTTP POST request lo_response = HTTP_POST( i_request_prop = ls_request_prop ). @@ -4585,8 +5316,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->GET_AUDIO * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_audio_name TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_AUDIO_NAME TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_AUDIO_LISTING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -4601,8 +5332,8 @@ method GET_AUDIO. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/acoustic_customizations/{customization_id}/audio/{audio_name}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{audio_name}` in ls_request_prop-url-path with i_audio_name ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{audio_name}` in ls_request_prop-url-path with i_AUDIO_NAME ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4635,8 +5366,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->DELETE_AUDIO * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_audio_name TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_AUDIO_NAME TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -4650,8 +5381,8 @@ method DELETE_AUDIO. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/acoustic_customizations/{customization_id}/audio/{audio_name}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{audio_name}` in ls_request_prop-url-path with i_audio_name ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{audio_name}` in ls_request_prop-url-path with i_AUDIO_NAME ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -4677,7 +5408,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_SPEECH_TO_TEXT_V1->DELETE_USER_DATA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customer_id TYPE STRING +* | [--->] I_CUSTOMER_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_USER_DATA. @@ -4700,7 +5431,7 @@ method DELETE_USER_DATA. data: lv_queryparam type string. - lv_queryparam = escape( val = i_customer_id format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_CUSTOMER_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `customer_id` diff --git a/src/zcl_ibmc_text_to_speech_v1.clas.abap b/src/zcl_ibmc_text_to_speech_v1.clas.abap index fa133da..480a6b3 100644 --- a/src/zcl_ibmc_text_to_speech_v1.clas.abap +++ b/src/zcl_ibmc_text_to_speech_v1.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,14 +16,14 @@ "! speech-synthesis capabilities to synthesize text into natural-sounding speech "! in a variety of languages, dialects, and voices. The service supports at least "! one male or female voice, sometimes both, for each language. The audio is -"! streamed back to the client with minimal delay. -"! +"! streamed back to the client with minimal delay.
+"!
"! For speech synthesis, the service supports a synchronous HTTP Representational "! State Transfer (REST) interface. It also supports a WebSocket interface that "! provides both plain text and SSML input, including the SSML <mark> "! element and word timings. SSML is an XML-based markup language that provides -"! text annotation for speech-synthesis applications. -"! +"! text annotation for speech-synthesis applications.
+"!
"! The service also offers a customization interface. You can use the interface to "! define sounds-like or phonetic translations for words. A sounds-like "! translation consists of one or more words that, when combined, sound like the @@ -40,74 +40,145 @@ public section. types: "! Information about a word for the custom voice model. begin of T_WORD, + "! The word for the custom voice model. WORD type STRING, + "! The phonetic or sounds-like translation for the word. A phonetic translation is + "! based on the SSML format for representing the phonetic string of a word either + "! as an IPA or IBM SPR translation. A sounds-like translation consists of one or + "! more words that, when combined, sound like the word. TRANSLATION type STRING, + "! **Japanese only.** The part of speech for the word. The service uses the value to + "! ** produce the correct intonation for the word. You can create only a single + "! ** entry, with or without a single part of speech, for any word; you cannot create + "! ** multiple entries with different parts of speech for the same word. For more + "! ** information, see [Working with Japanese + "! ** entries](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speec + "! **h-rules#jaNotes). PART_OF_SPEECH type STRING, end of T_WORD. types: "! Information about an existing custom voice model. begin of T_VOICE_MODEL, + "! The customization ID (GUID) of the custom voice model. The **Create a custom + "! model** method returns only this field. It does not not return the other fields + "! of this object. CUSTOMIZATION_ID type STRING, + "! The name of the custom voice model. NAME type STRING, + "! The language identifier of the custom voice model (for example, `en-US`). LANGUAGE type STRING, + "! The GUID of the credentials for the instance of the service that owns the custom + "! voice model. OWNER type STRING, + "! The date and time in Coordinated Universal Time (UTC) at which the custom voice + "! model was created. The value is provided in full ISO 8601 format + "! (`YYYY-MM-DDThh:mm:ss.sTZD`). CREATED type STRING, + "! The date and time in Coordinated Universal Time (UTC) at which the custom voice + "! model was last modified. The `created` and `updated` fields are equal when a + "! voice model is first added but has yet to be updated. The value is provided in + "! full ISO 8601 format (`YYYY-MM-DDThh:mm:ss.sTZD`). LAST_MODIFIED type STRING, + "! The description of the custom voice model. DESCRIPTION type STRING, + "! An array of `Word` objects that lists the words and their translations from the + "! custom voice model. The words are listed in alphabetical order, with uppercase + "! letters listed before lowercase letters. The array is empty if the custom model + "! contains no words. This field is returned only by the **Get a voice** method + "! and only when you specify the customization ID of a custom voice model. WORDS type STANDARD TABLE OF T_WORD WITH NON-UNIQUE DEFAULT KEY, end of T_VOICE_MODEL. types: "! Additional service features that are supported with the voice. begin of T_SUPPORTED_FEATURES, + "! If `true`, the voice can be customized; if `false`, the voice cannot be + "! customized. (Same as `customizable`.). CUSTOM_PRONUNCIATION type BOOLEAN, + "! If `true`, the voice can be transformed by using the SSML + "! <voice-transformation> element; if `false`, the voice cannot be + "! transformed. VOICE_TRANSFORMATION type BOOLEAN, end of T_SUPPORTED_FEATURES. types: "! Information about an available voice model. begin of T_VOICE, + "! The URI of the voice. URL type STRING, + "! The gender of the voice: `male` or `female`. GENDER type STRING, + "! The name of the voice. Use this as the voice identifier in all requests. NAME type STRING, + "! The language and region of the voice (for example, `en-US`). LANGUAGE type STRING, + "! A textual description of the voice. DESCRIPTION type STRING, + "! If `true`, the voice can be customized; if `false`, the voice cannot be + "! customized. (Same as `custom_pronunciation`; maintained for backward + "! compatibility.). CUSTOMIZABLE type BOOLEAN, + "! Additional service features that are supported with the voice. SUPPORTED_FEATURES type T_SUPPORTED_FEATURES, + "! Returns information about a specified custom voice model. This field is returned + "! only by the **Get a voice** method and only when you specify the customization + "! ID of a custom voice model. CUSTOMIZATION type T_VOICE_MODEL, end of T_VOICE. types: "! Information about the new custom voice model. begin of T_CREATE_VOICE_MODEL, + "! The name of the new custom voice model. NAME type STRING, + "! The language of the new custom voice model. Omit the parameter to use the the + "! default language, `en-US`. LANGUAGE type STRING, + "! A description of the new custom voice model. Specifying a description is + "! recommended. DESCRIPTION type STRING, end of T_CREATE_VOICE_MODEL. types: "! The error response from a failed request. begin of T_ERROR_MODEL, + "! Description of the problem. ERROR type STRING, + "! HTTP response code. CODE type INTEGER, + "! Response message. CODE_DESCRIPTION type STRING, end of T_ERROR_MODEL. types: "! For the **Add custom words** method, one or more words that are to be added or "! updated for the custom voice model and the translation for each specified word. - "! - "! + "!
+ "!
"! For the **List custom words** method, the words and their translations from the "! custom voice model. begin of T_WORDS, + "! The **Add custom words** method accepts an array of `Word` objects. Each object + "! provides a word that is to be added or updated for the custom voice model and + "! the word's translation.
+ "!
+ "! The **List custom words** method returns an array of `Word` objects. Each object + "! shows a word and its translation from the custom voice model. The words are + "! listed in alphabetical order, with uppercase letters listed before lowercase + "! letters. The array is empty if the custom model contains no words. WORDS type STANDARD TABLE OF T_WORD WITH NON-UNIQUE DEFAULT KEY, end of T_WORDS. types: "! Information about the updated custom voice model. begin of T_UPDATE_VOICE_MODEL, + "! A new name for the custom voice model. NAME type STRING, + "! A new description for the custom voice model. DESCRIPTION type STRING, + "! An array of `Word` objects that provides the words and their translations that + "! are to be added or updated for the custom voice model. Pass an empty array to + "! make no additions or updates. WORDS type STANDARD TABLE OF T_WORD WITH NON-UNIQUE DEFAULT KEY, end of T_UPDATE_VOICE_MODEL. types: "! Information about all available voice models. begin of T_VOICES, + "! A list of available voices. VOICES type STANDARD TABLE OF T_VOICE WITH NON-UNIQUE DEFAULT KEY, end of T_VOICES. types: @@ -116,6 +187,10 @@ public section. types: "! Information about existing custom voice models. begin of T_VOICE_MODELS, + "! An array of `VoiceModel` objects that provides information about each available + "! custom voice model. The array is empty if the requesting credentials own no + "! custom voice models (if no language is specified) or own no custom voice models + "! for the specified language. CUSTOMIZATIONS type STANDARD TABLE OF T_VOICE_MODEL WITH NON-UNIQUE DEFAULT KEY, end of T_VOICE_MODELS. types: @@ -123,17 +198,32 @@ public section. "! an XML-based markup language that provides text annotation for speech-synthesis "! applications. Pass a maximum of 5 KB of input text. begin of T_TEXT, + "! The text to synthesize. TEXT type STRING, end of T_TEXT. types: "! The pronunciation of the specified text. begin of T_PRONUNCIATION, + "! The pronunciation of the specified text in the requested voice and format. If a + "! custom voice model is specified, the pronunciation also reflects that custom + "! voice. PRONUNCIATION type STRING, end of T_PRONUNCIATION. types: "! Information about the translation for the specified text. begin of T_TRANSLATION, + "! The phonetic or sounds-like translation for the word. A phonetic translation is + "! based on the SSML format for representing the phonetic string of a word either + "! as an IPA translation or as an IBM SPR translation. A sounds-like is one or + "! more words that, when combined, sound like the word. TRANSLATION type STRING, + "! **Japanese only.** The part of speech for the word. The service uses the value to + "! ** produce the correct intonation for the word. You can create only a single + "! ** entry, with or without a single part of speech, for any word; you cannot create + "! ** multiple entries with different parts of speech for the same word. For more + "! ** information, see [Working with Japanese + "! ** entries](https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speec + "! **h-rules#jaNotes). PART_OF_SPEECH type STRING, end of T_TRANSLATION. @@ -197,6 +287,7 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_VOICES + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_VOICES importing @@ -207,20 +298,21 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get a voice. "! - "! @parameter I_voice | + "! @parameter I_VOICE | "! The voice for which information is to be returned. - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of a custom voice model for which information is to "! be returned. You must make the request with credentials for the instance of the "! service that owns the custom model. Omit the parameter to see information about "! the specified voice with no customization. "! @parameter E_RESPONSE | "! Service return value of type T_VOICE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_VOICE importing - !I_voice type STRING - !I_customization_id type STRING optional + !I_VOICE type STRING + !I_CUSTOMIZATION_ID type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_VOICE @@ -229,16 +321,16 @@ constants: "! Synthesize audio. "! - "! @parameter I_text | - "! - "! @parameter I_Accept | + "! @parameter I_TEXT | + "! No documentation available. + "! @parameter I_ACCEPT | "! The requested format (MIME type) of the audio. You can use the `Accept` header "! or the `accept` parameter to specify the audio format. For more information "! about specifying an audio format, see **Audio formats (accept types)** in the "! method description. - "! @parameter I_voice | + "! @parameter I_VOICE | "! The voice to use for synthesis. - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of a custom voice model to use for the synthesis. If "! a custom voice model is specified, it is guaranteed to work only if it matches "! the language of the indicated voice. You must make the request with credentials @@ -246,13 +338,14 @@ constants: "! to use the specified voice with no customization. "! @parameter E_RESPONSE | "! Service return value of type FILE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods SYNTHESIZE importing - !I_text type T_TEXT - !I_Accept type STRING default 'audio/ogg;codecs=opus' - !I_voice type STRING default 'en-US_MichaelVoice' - !I_customization_id type STRING optional + !I_TEXT type T_TEXT + !I_ACCEPT type STRING default 'audio/ogg;codecs=opus' + !I_VOICE type STRING default 'en-US_MichaelVoice' + !I_CUSTOMIZATION_ID type STRING optional !I_contenttype type string default 'application/json' exporting !E_RESPONSE type FILE @@ -261,16 +354,16 @@ constants: "! Get pronunciation. "! - "! @parameter I_text | + "! @parameter I_TEXT | "! The word for which the pronunciation is requested. - "! @parameter I_voice | + "! @parameter I_VOICE | "! A voice that specifies the language in which the pronunciation is to be "! returned. All voices for the same language (for example, `en-US`) return the "! same translation. - "! @parameter I_format | + "! @parameter I_FORMAT | "! The phoneme format in which to return the pronunciation. Omit the parameter to "! obtain the pronunciation in the default format. - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of a custom voice model for which the pronunciation "! is to be returned. The language of a specified custom model must match the "! language of the specified voice. If the word is not defined in the specified @@ -280,13 +373,14 @@ constants: "! translation for the specified voice with no customization. "! @parameter E_RESPONSE | "! Service return value of type T_PRONUNCIATION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_PRONUNCIATION importing - !I_text type STRING - !I_voice type STRING default 'en-US_MichaelVoice' - !I_format type STRING default 'ipa' - !I_customization_id type STRING optional + !I_TEXT type STRING + !I_VOICE type STRING default 'en-US_MichaelVoice' + !I_FORMAT type STRING default 'ipa' + !I_CUSTOMIZATION_ID type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_PRONUNCIATION @@ -295,15 +389,16 @@ constants: "! Create a custom model. "! - "! @parameter I_create_voice_model | + "! @parameter I_CREATE_VOICE_MODEL | "! A `CreateVoiceModel` object that contains information about the new custom voice "! model. "! @parameter E_RESPONSE | "! Service return value of type T_VOICE_MODEL + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_VOICE_MODEL importing - !I_create_voice_model type T_CREATE_VOICE_MODEL + !I_CREATE_VOICE_MODEL type T_CREATE_VOICE_MODEL !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -312,16 +407,17 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! List custom models. "! - "! @parameter I_language | + "! @parameter I_LANGUAGE | "! The language for which custom voice models that are owned by the requesting "! credentials are to be returned. Omit the parameter to see all custom voice "! models that are owned by the requester. "! @parameter E_RESPONSE | "! Service return value of type T_VOICE_MODELS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_VOICE_MODELS importing - !I_language type STRING optional + !I_LANGUAGE type STRING optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_VOICE_MODELS @@ -329,32 +425,34 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update a custom model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom voice model. You must make the request "! with credentials for the instance of the service that owns the custom model. - "! @parameter I_update_voice_model | + "! @parameter I_UPDATE_VOICE_MODEL | "! An `UpdateVoiceModel` object that contains information that is to be updated for "! the custom voice model. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_VOICE_MODEL importing - !I_customization_id type STRING - !I_update_voice_model type T_UPDATE_VOICE_MODEL + !I_CUSTOMIZATION_ID type STRING + !I_UPDATE_VOICE_MODEL type T_UPDATE_VOICE_MODEL !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Get a custom model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom voice model. You must make the request "! with credentials for the instance of the service that owns the custom model. "! @parameter E_RESPONSE | "! Service return value of type T_VOICE_MODEL + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_VOICE_MODEL importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_VOICE_MODEL @@ -362,43 +460,46 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a custom model. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom voice model. You must make the request "! with credentials for the instance of the service that owns the custom model. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_VOICE_MODEL importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "! Add custom words. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom voice model. You must make the request "! with credentials for the instance of the service that owns the custom model. - "! @parameter I_custom_words | - "! + "! @parameter I_CUSTOM_WORDS | + "! No documentation available. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ADD_WORDS importing - !I_customization_id type STRING - !I_custom_words type T_WORDS + !I_CUSTOMIZATION_ID type STRING + !I_CUSTOM_WORDS type T_WORDS !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! List custom words. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom voice model. You must make the request "! with credentials for the instance of the service that owns the custom model. "! @parameter E_RESPONSE | "! Service return value of type T_WORDS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_WORDS importing - !I_customization_id type STRING + !I_CUSTOMIZATION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_WORDS @@ -406,36 +507,38 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Add a custom word. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom voice model. You must make the request "! with credentials for the instance of the service that owns the custom model. - "! @parameter I_word | + "! @parameter I_WORD | "! The word that is to be added or updated for the custom voice model. - "! @parameter I_translation | + "! @parameter I_TRANSLATION | "! The translation for the word that is to be added or updated. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ADD_WORD importing - !I_customization_id type STRING - !I_word type STRING - !I_translation type T_TRANSLATION + !I_CUSTOMIZATION_ID type STRING + !I_WORD type STRING + !I_TRANSLATION type T_TRANSLATION !I_contenttype type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Get a custom word. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom voice model. You must make the request "! with credentials for the instance of the service that owns the custom model. - "! @parameter I_word | + "! @parameter I_WORD | "! The word that is to be queried from the custom voice model. "! @parameter E_RESPONSE | "! Service return value of type T_TRANSLATION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_WORD importing - !I_customization_id type STRING - !I_word type STRING + !I_CUSTOMIZATION_ID type STRING + !I_WORD type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TRANSLATION @@ -443,27 +546,29 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a custom word. "! - "! @parameter I_customization_id | + "! @parameter I_CUSTOMIZATION_ID | "! The customization ID (GUID) of the custom voice model. You must make the request "! with credentials for the instance of the service that owns the custom model. - "! @parameter I_word | + "! @parameter I_WORD | "! The word that is to be deleted from the custom voice model. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_WORD importing - !I_customization_id type STRING - !I_word type STRING + !I_CUSTOMIZATION_ID type STRING + !I_WORD type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . "! Delete labeled data. "! - "! @parameter I_customer_id | + "! @parameter I_CUSTOMER_ID | "! The customer ID for which all data is to be deleted. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_USER_DATA importing - !I_customer_id type STRING + !I_CUSTOMER_ID type STRING raising ZCX_IBMC_SERVICE_EXCEPTION . @@ -503,7 +608,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -544,7 +649,7 @@ endmethod. * +--------------------------------------------------------------------------------------
method get_sdk_version_date. - e_sdk_version_date = '20191002122851'. + e_sdk_version_date = '20200210092827'. endmethod. @@ -599,8 +704,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->GET_VOICE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_voice TYPE STRING -* | [--->] I_customization_id TYPE STRING(optional) +* | [--->] I_VOICE TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_VOICE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -615,7 +720,7 @@ method GET_VOICE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/voices/{voice}'. - replace all occurrences of `{voice}` in ls_request_prop-url-path with i_voice ignoring case. + replace all occurrences of `{voice}` in ls_request_prop-url-path with i_VOICE ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -627,8 +732,8 @@ method GET_VOICE. data: lv_queryparam type string. - if i_customization_id is supplied. - lv_queryparam = escape( val = i_customization_id format = cl_abap_format=>e_uri_full ). + if i_CUSTOMIZATION_ID is supplied. + lv_queryparam = escape( val = i_CUSTOMIZATION_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `customization_id` @@ -661,10 +766,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->SYNTHESIZE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_text TYPE T_TEXT -* | [--->] I_Accept TYPE STRING (default ='audio/ogg;codecs=opus') -* | [--->] I_voice TYPE STRING (default ='en-US_MichaelVoice') -* | [--->] I_customization_id TYPE STRING(optional) +* | [--->] I_TEXT TYPE T_TEXT +* | [--->] I_ACCEPT TYPE STRING (default ='audio/ogg;codecs=opus') +* | [--->] I_VOICE TYPE STRING (default ='en-US_MichaelVoice') +* | [--->] I_CUSTOMIZATION_ID TYPE STRING(optional) * | [--->] I_contenttype TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE FILE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -690,8 +795,8 @@ method SYNTHESIZE. data: lv_queryparam type string. - if i_voice is supplied. - lv_queryparam = escape( val = i_voice format = cl_abap_format=>e_uri_full ). + if i_VOICE is supplied. + lv_queryparam = escape( val = i_VOICE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `voice` @@ -700,8 +805,8 @@ method SYNTHESIZE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_customization_id is supplied. - lv_queryparam = escape( val = i_customization_id format = cl_abap_format=>e_uri_full ). + if i_CUSTOMIZATION_ID is supplied. + lv_queryparam = escape( val = i_CUSTOMIZATION_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `customization_id` @@ -714,8 +819,8 @@ method SYNTHESIZE. data: lv_headerparam type string ##NEEDED. - if i_Accept is supplied. - lv_headerparam = I_Accept. + if i_ACCEPT is supplied. + lv_headerparam = I_ACCEPT. add_header_parameter( exporting i_parameter = 'Accept' @@ -734,20 +839,20 @@ method SYNTHESIZE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_text ). + lv_datatype = get_datatype( i_TEXT ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_text i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_TEXT i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'text' i_value = i_text ). + lv_bodyparam = abap_to_json( i_name = 'text' i_value = i_TEXT ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_text to . + assign i_TEXT to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -776,10 +881,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->GET_PRONUNCIATION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_text TYPE STRING -* | [--->] I_voice TYPE STRING (default ='en-US_MichaelVoice') -* | [--->] I_format TYPE STRING (default ='ipa') -* | [--->] I_customization_id TYPE STRING(optional) +* | [--->] I_TEXT TYPE STRING +* | [--->] I_VOICE TYPE STRING (default ='en-US_MichaelVoice') +* | [--->] I_FORMAT TYPE STRING (default ='ipa') +* | [--->] I_CUSTOMIZATION_ID TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_PRONUNCIATION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -805,7 +910,7 @@ method GET_PRONUNCIATION. data: lv_queryparam type string. - lv_queryparam = escape( val = i_text format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_TEXT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `text` @@ -813,8 +918,8 @@ method GET_PRONUNCIATION. changing c_url = ls_request_prop-url ) ##NO_TEXT. - if i_voice is supplied. - lv_queryparam = escape( val = i_voice format = cl_abap_format=>e_uri_full ). + if i_VOICE is supplied. + lv_queryparam = escape( val = i_VOICE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `voice` @@ -823,8 +928,8 @@ method GET_PRONUNCIATION. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_format is supplied. - lv_queryparam = escape( val = i_format format = cl_abap_format=>e_uri_full ). + if i_FORMAT is supplied. + lv_queryparam = escape( val = i_FORMAT format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `format` @@ -833,8 +938,8 @@ method GET_PRONUNCIATION. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_customization_id is supplied. - lv_queryparam = escape( val = i_customization_id format = cl_abap_format=>e_uri_full ). + if i_CUSTOMIZATION_ID is supplied. + lv_queryparam = escape( val = i_CUSTOMIZATION_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `customization_id` @@ -867,7 +972,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->CREATE_VOICE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_create_voice_model TYPE T_CREATE_VOICE_MODEL +* | [--->] I_CREATE_VOICE_MODEL TYPE T_CREATE_VOICE_MODEL * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_VOICE_MODEL @@ -904,20 +1009,20 @@ method CREATE_VOICE_MODEL. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_create_voice_model ). + lv_datatype = get_datatype( i_CREATE_VOICE_MODEL ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_create_voice_model i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_CREATE_VOICE_MODEL i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'create_voice_model' i_value = i_create_voice_model ). + lv_bodyparam = abap_to_json( i_name = 'create_voice_model' i_value = i_CREATE_VOICE_MODEL ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_create_voice_model to . + assign i_CREATE_VOICE_MODEL to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -951,7 +1056,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->LIST_VOICE_MODELS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_language TYPE STRING(optional) +* | [--->] I_LANGUAGE TYPE STRING(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_VOICE_MODELS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -977,8 +1082,8 @@ method LIST_VOICE_MODELS. data: lv_queryparam type string. - if i_language is supplied. - lv_queryparam = escape( val = i_language format = cl_abap_format=>e_uri_full ). + if i_LANGUAGE is supplied. + lv_queryparam = escape( val = i_LANGUAGE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `language` @@ -1010,8 +1115,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->UPDATE_VOICE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_update_voice_model TYPE T_UPDATE_VOICE_MODEL +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_UPDATE_VOICE_MODEL TYPE T_UPDATE_VOICE_MODEL * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1026,7 +1131,7 @@ method UPDATE_VOICE_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -1048,20 +1153,20 @@ method UPDATE_VOICE_MODEL. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_update_voice_model ). + lv_datatype = get_datatype( i_UPDATE_VOICE_MODEL ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_update_voice_model i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_UPDATE_VOICE_MODEL i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'update_voice_model' i_value = i_update_voice_model ). + lv_bodyparam = abap_to_json( i_name = 'update_voice_model' i_value = i_UPDATE_VOICE_MODEL ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_update_voice_model to . + assign i_UPDATE_VOICE_MODEL to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -1087,7 +1192,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->GET_VOICE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_VOICE_MODEL * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1102,7 +1207,7 @@ method GET_VOICE_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1135,7 +1240,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->DELETE_VOICE_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_VOICE_MODEL. @@ -1148,7 +1253,7 @@ method DELETE_VOICE_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers set_default_query_parameters( @@ -1173,8 +1278,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->ADD_WORDS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_custom_words TYPE T_WORDS +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_CUSTOM_WORDS TYPE T_WORDS * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1189,7 +1294,7 @@ method ADD_WORDS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/words'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -1211,20 +1316,20 @@ method ADD_WORDS. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_custom_words ). + lv_datatype = get_datatype( i_CUSTOM_WORDS ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_custom_words i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_CUSTOM_WORDS i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'custom_words' i_value = i_custom_words ). + lv_bodyparam = abap_to_json( i_name = 'custom_words' i_value = i_CUSTOM_WORDS ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_custom_words to . + assign i_CUSTOM_WORDS to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -1250,7 +1355,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->LIST_WORDS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_WORDS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1265,7 +1370,7 @@ method LIST_WORDS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/words'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1298,9 +1403,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->ADD_WORD * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_word TYPE STRING -* | [--->] I_translation TYPE T_TRANSLATION +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_WORD TYPE STRING +* | [--->] I_TRANSLATION TYPE T_TRANSLATION * | [--->] I_contenttype TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -1314,8 +1419,8 @@ method ADD_WORD. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/words/{word}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{word}` in ls_request_prop-url-path with i_word ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{word}` in ls_request_prop-url-path with i_WORD ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -1336,20 +1441,20 @@ method ADD_WORD. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_translation ). + lv_datatype = get_datatype( i_TRANSLATION ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_translation i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_TRANSLATION i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'translation' i_value = i_translation ). + lv_bodyparam = abap_to_json( i_name = 'translation' i_value = i_TRANSLATION ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_translation to . + assign i_TRANSLATION to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -1375,8 +1480,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->GET_WORD * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_word TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_WORD TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRANSLATION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1391,8 +1496,8 @@ method GET_WORD. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/words/{word}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{word}` in ls_request_prop-url-path with i_word ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{word}` in ls_request_prop-url-path with i_WORD ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1425,8 +1530,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->DELETE_WORD * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customization_id TYPE STRING -* | [--->] I_word TYPE STRING +* | [--->] I_CUSTOMIZATION_ID TYPE STRING +* | [--->] I_WORD TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_WORD. @@ -1439,8 +1544,8 @@ method DELETE_WORD. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v1/customizations/{customization_id}/words/{word}'. - replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_customization_id ignoring case. - replace all occurrences of `{word}` in ls_request_prop-url-path with i_word ignoring case. + replace all occurrences of `{customization_id}` in ls_request_prop-url-path with i_CUSTOMIZATION_ID ignoring case. + replace all occurrences of `{word}` in ls_request_prop-url-path with i_WORD ignoring case. " standard headers set_default_query_parameters( @@ -1465,7 +1570,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TEXT_TO_SPEECH_V1->DELETE_USER_DATA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customer_id TYPE STRING +* | [--->] I_CUSTOMER_ID TYPE STRING * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- method DELETE_USER_DATA. @@ -1488,7 +1593,7 @@ method DELETE_USER_DATA. data: lv_queryparam type string. - lv_queryparam = escape( val = i_customer_id format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_CUSTOMER_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `customer_id` diff --git a/src/zcl_ibmc_tone_analyzer_v3.clas.abap b/src/zcl_ibmc_tone_analyzer_v3.clas.abap index bf6f2eb..3f92578 100644 --- a/src/zcl_ibmc_tone_analyzer_v3.clas.abap +++ b/src/zcl_ibmc_tone_analyzer_v3.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,8 +18,8 @@ "! how your written communications are perceived and then to improve the tone of "! your communications. Businesses can use the service to learn the tone of their "! customers' communications and to respond to each customer appropriately, or to -"! understand and improve their customer conversations. -"! +"! understand and improve their customer conversations.
+"!
"! **Note:** Request logging is disabled for the Tone Analyzer service. Regardless "! of whether you set the `X-Watson-Learning-Opt-Out` request header, the service "! does not log or retain data from requests and responses.
@@ -32,83 +32,174 @@ public section. types: "! The score for a tone from the input content. begin of T_TONE_SCORE, + "! The score for the tone.
+ "! * **`2017-09-21`:** The score that is returned lies in the range of 0.5 to 1. A + "! score greater than 0.75 indicates a high likelihood that the tone is perceived + "! in the content.
+ "! * **`2016-05-19`:** The score that is returned lies in the range of 0 to 1. A + "! score less than 0.5 indicates that the tone is unlikely to be perceived in the + "! content; a score greater than 0.75 indicates a high likelihood that the tone is + "! perceived. SCORE type DOUBLE, + "! The unique, non-localized identifier of the tone.
+ "! * **`2017-09-21`:** The service can return results for the following tone IDs: + "! `anger`, `fear`, `joy`, and `sadness` (emotional tones); `analytical`, + "! `confident`, and `tentative` (language tones). The service returns results only + "! for tones whose scores meet a minimum threshold of 0.5.
+ "! * **`2016-05-19`:** The service can return results for the following tone IDs of + "! the different categories: for the `emotion` category: `anger`, `disgust`, + "! `fear`, `joy`, and `sadness`; for the `language` category: `analytical`, + "! `confident`, and `tentative`; for the `social` category: `openness_big5`, + "! `conscientiousness_big5`, `extraversion_big5`, `agreeableness_big5`, and + "! `emotional_range_big5`. The service returns scores for all tones of a category, + "! regardless of their values. TONE_ID type STRING, + "! The user-visible, localized name of the tone. TONE_NAME type STRING, end of T_TONE_SCORE. types: "! The category for a tone from the input content. begin of T_TONE_CATEGORY, + "! An array of `ToneScore` objects that provides the results for the tones of the + "! category. TONES type STANDARD TABLE OF T_TONE_SCORE WITH NON-UNIQUE DEFAULT KEY, + "! The unique, non-localized identifier of the category for the results. The + "! service can return results for the following category IDs: `emotion_tone`, + "! `language_tone`, and `social_tone`. CATEGORY_ID type STRING, + "! The user-visible, localized name of the category. CATEGORY_NAME type STRING, end of T_TONE_CATEGORY. types: "! Input for the general-purpose endpoint. begin of T_TONE_INPUT, + "! The input content that the service is to analyze. TEXT type STRING, end of T_TONE_INPUT. types: "! The score for an utterance from the input content. begin of T_TONE_CHAT_SCORE, + "! The score for the tone in the range of 0.5 to 1. A score greater than 0.75 + "! indicates a high likelihood that the tone is perceived in the utterance. SCORE type DOUBLE, + "! The unique, non-localized identifier of the tone for the results. The service + "! returns results only for tones whose scores meet a minimum threshold of 0.5. TONE_ID type STRING, + "! The user-visible, localized name of the tone. TONE_NAME type STRING, end of T_TONE_CHAT_SCORE. types: "! An utterance for the input of the general-purpose endpoint. begin of T_UTTERANCE, + "! An utterance contributed by a user in the conversation that is to be analyzed. + "! The utterance can contain multiple sentences. TEXT type STRING, + "! A string that identifies the user who contributed the utterance specified by the + "! `text` parameter. USER type STRING, end of T_UTTERANCE. types: "! Input for the customer-engagement endpoint. begin of T_TONE_CHAT_INPUT, + "! An array of `Utterance` objects that provides the input content that the service + "! is to analyze. UTTERANCES type STANDARD TABLE OF T_UTTERANCE WITH NON-UNIQUE DEFAULT KEY, end of T_TONE_CHAT_INPUT. types: "! The results of the analysis for the individual sentences of the input content. begin of T_SENTENCE_ANALYSIS, + "! The unique identifier of a sentence of the input content. The first sentence has + "! ID 0, and the ID of each subsequent sentence is incremented by one. SENTENCE_ID type INTEGER, + "! The text of the input sentence. TEXT type STRING, + "! **`2017-09-21`:** An array of `ToneScore` objects that provides the results of the + "! ** analysis for each qualifying tone of the sentence. The array includes results + "! ** for any tone whose score is at least 0.5. The array is empty if no tone has a + "! ** score that meets this threshold. **`2016-05-19`:** Not returned. TONES type STANDARD TABLE OF T_TONE_SCORE WITH NON-UNIQUE DEFAULT KEY, + "! **`2017-09-21`:** Not returned. **`2016-05-19`:** An array of `ToneCategory` + "! ** objects that provides the results of the tone analysis for the sentence. The + "! ** service returns results only for the tones specified with the `tones` parameter + "! ** of the request. TONE_CATEGORIES type STANDARD TABLE OF T_TONE_CATEGORY WITH NON-UNIQUE DEFAULT KEY, + "! **`2017-09-21`:** Not returned. **`2016-05-19`:** The offset of the first + "! ** character of the sentence in the overall input content. INPUT_FROM type INTEGER, + "! **`2017-09-21`:** Not returned. **`2016-05-19`:** The offset of the last character + "! ** of the sentence in the overall input content. INPUT_TO type INTEGER, end of T_SENTENCE_ANALYSIS. types: "! The results of the analysis for an utterance of the input content. begin of T_UTTERANCE_ANALYSIS, + "! The unique identifier of the utterance. The first utterance has ID 0, and the ID + "! of each subsequent utterance is incremented by one. UTTERANCE_ID type INTEGER, + "! The text of the utterance. UTTERANCE_TEXT type STRING, + "! An array of `ToneChatScore` objects that provides results for the most prevalent + "! tones of the utterance. The array includes results for any tone whose score is + "! at least 0.5. The array is empty if no tone has a score that meets this + "! threshold. TONES type STANDARD TABLE OF T_TONE_CHAT_SCORE WITH NON-UNIQUE DEFAULT KEY, + "! **`2017-09-21`:** An error message if the utterance contains more than 500 + "! ** characters. The service does not analyze the utterance. **`2016-05-19`:** Not + "! ** returned. ERROR type STRING, end of T_UTTERANCE_ANALYSIS. types: "! The results of the analysis for the utterances of the input content. begin of T_UTTERANCE_ANALYSES, + "! An array of `UtteranceAnalysis` objects that provides the results for each + "! utterance of the input. UTTERANCES_TONE type STANDARD TABLE OF T_UTTERANCE_ANALYSIS WITH NON-UNIQUE DEFAULT KEY, + "! **`2017-09-21`:** A warning message if the content contains more than 50 + "! ** utterances. The service analyzes only the first 50 utterances. + "! ** **`2016-05-19`:** Not returned. WARNING type STRING, end of T_UTTERANCE_ANALYSES. types: "! The error response from a failed request. begin of T_ERROR_MODEL, + "! The HTTP status code. CODE type INTEGER, + "! A service-specific error code. SUB_CODE type STRING, + "! A description of the error. ERROR type STRING, + "! A URL to documentation explaining the cause and possibly solutions for the + "! error. HELP type STRING, end of T_ERROR_MODEL. types: "! The results of the analysis for the full input content. begin of T_DOCUMENT_ANALYSIS, + "! **`2017-09-21`:** An array of `ToneScore` objects that provides the results of the + "! ** analysis for each qualifying tone of the document. The array includes results + "! ** for any tone whose score is at least 0.5. The array is empty if no tone has a + "! ** score that meets this threshold. **`2016-05-19`:** Not returned. TONES type STANDARD TABLE OF T_TONE_SCORE WITH NON-UNIQUE DEFAULT KEY, + "! **`2017-09-21`:** Not returned. **`2016-05-19`:** An array of `ToneCategory` + "! ** objects that provides the results of the tone analysis for the full document of + "! ** the input content. The service returns results only for the tones specified + "! ** with the `tones` parameter of the request. TONE_CATEGORIES type STANDARD TABLE OF T_TONE_CATEGORY WITH NON-UNIQUE DEFAULT KEY, + "! **`2017-09-21`:** A warning message if the overall content exceeds 128 KB or + "! ** contains more than 1000 sentences. The service analyzes only the first 1000 + "! ** sentences for document-level analysis and the first 100 sentences for + "! ** sentence-level analysis. **`2016-05-19`:** Not returned. WARNING type STRING, end of T_DOCUMENT_ANALYSIS. types: "! The tone analysis results for the input from the general-purpose endpoint. begin of T_TONE_ANALYSIS, + "! The results of the analysis for the full input content. DOCUMENT_TONE type T_DOCUMENT_ANALYSIS, + "! An array of `SentenceAnalysis` objects that provides the results of the analysis + "! for the individual sentences of the input content. The service returns results + "! only for the first 100 sentences of the input. The field is omitted if the + "! `sentences` parameter of the request is set to `false`. SENTENCES_TONE type STANDARD TABLE OF T_SENTENCE_ANALYSIS WITH NON-UNIQUE DEFAULT KEY, end of T_TONE_ANALYSIS. @@ -170,49 +261,50 @@ constants: "! Analyze general tone. "! - "! @parameter I_tone_input | + "! @parameter I_TONE_INPUT | "! JSON, plain text, or HTML input that contains the content to be analyzed. For "! JSON input, provide an object of type `ToneInput`. - "! @parameter I_Content_Type | + "! @parameter I_CONTENT_TYPE | "! The type of the input. A character encoding can be specified by including a "! `charset` parameter. For example, 'text/plain;charset=utf-8'. - "! @parameter I_sentences | + "! @parameter I_SENTENCES | "! Indicates whether the service is to return an analysis of each individual "! sentence in addition to its analysis of the full document. If `true` (the "! default), the service returns results for each sentence. - "! @parameter I_tones | + "! @parameter I_TONES | "! **`2017-09-21`:** Deprecated. The service continues to accept the parameter for - "! ** backward-compatibility, but the parameter no longer affects the response. - "! ** + "! ** backward-compatibility, but the parameter no longer affects the response.
+ "! **
"! ****`2016-05-19`:** A comma-separated list of tones for which the service is to "! ** return its analysis of the input; the indicated tones apply both to the full "! ** document and to individual sentences of the document. You can specify one or "! ** more of the valid values. Omit the parameter to request results for all three "! ** tones. - "! @parameter I_Content_Language | + "! @parameter I_CONTENT_LANGUAGE | "! The language of the input text for the request: English or French. Regional "! variants are treated as their parent language; for example, `en-US` is "! interpreted as `en`. The input content must match the specified language. Do "! not submit content that contains both languages. You can use different - "! languages for **Content-Language** and **Accept-Language**. - "! * **`2017-09-21`:** Accepts `en` or `fr`. + "! languages for **Content-Language** and **Accept-Language**.
+ "! * **`2017-09-21`:** Accepts `en` or `fr`.
"! * **`2016-05-19`:** Accepts only `en`. - "! @parameter I_Accept_Language | + "! @parameter I_ACCEPT_LANGUAGE | "! The desired language of the response. For two-character arguments, regional "! variants are treated as their parent language; for example, `en-US` is "! interpreted as `en`. You can use different languages for **Content-Language** "! and **Accept-Language**. "! @parameter E_RESPONSE | "! Service return value of type T_TONE_ANALYSIS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods TONE importing - !I_tone_input type T_TONE_INPUT - !I_Content_Type type STRING default 'application/json' - !I_sentences type BOOLEAN default c_boolean_true - !I_tones type TT_STRING optional - !I_Content_Language type STRING default 'en' - !I_Accept_Language type STRING default 'en' + !I_TONE_INPUT type T_TONE_INPUT + !I_CONTENT_TYPE type STRING default 'application/json' + !I_SENTENCES type BOOLEAN default c_boolean_true + !I_TONES type TT_STRING optional + !I_CONTENT_LANGUAGE type STRING default 'en' + !I_ACCEPT_LANGUAGE type STRING default 'en' !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TONE_ANALYSIS @@ -220,29 +312,30 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Analyze customer-engagement tone. "! - "! @parameter I_utterances | + "! @parameter I_UTTERANCES | "! An object that contains the content to be analyzed. - "! @parameter I_Content_Language | + "! @parameter I_CONTENT_LANGUAGE | "! The language of the input text for the request: English or French. Regional "! variants are treated as their parent language; for example, `en-US` is "! interpreted as `en`. The input content must match the specified language. Do "! not submit content that contains both languages. You can use different - "! languages for **Content-Language** and **Accept-Language**. - "! * **`2017-09-21`:** Accepts `en` or `fr`. + "! languages for **Content-Language** and **Accept-Language**.
+ "! * **`2017-09-21`:** Accepts `en` or `fr`.
"! * **`2016-05-19`:** Accepts only `en`. - "! @parameter I_Accept_Language | + "! @parameter I_ACCEPT_LANGUAGE | "! The desired language of the response. For two-character arguments, regional "! variants are treated as their parent language; for example, `en-US` is "! interpreted as `en`. You can use different languages for **Content-Language** "! and **Accept-Language**. "! @parameter E_RESPONSE | "! Service return value of type T_UTTERANCE_ANALYSES + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods TONE_CHAT importing - !I_utterances type T_TONE_CHAT_INPUT - !I_Content_Language type STRING default 'en' - !I_Accept_Language type STRING default 'en' + !I_UTTERANCES type T_TONE_CHAT_INPUT + !I_CONTENT_LANGUAGE type STRING default 'en' + !I_ACCEPT_LANGUAGE type STRING default 'en' !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -286,7 +379,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -322,7 +415,7 @@ endmethod. * +--------------------------------------------------------------------------------------
method get_sdk_version_date. - e_sdk_version_date = '20191002122853'. + e_sdk_version_date = '20200210092828'. endmethod. @@ -331,12 +424,12 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TONE_ANALYZER_V3->TONE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_tone_input TYPE T_TONE_INPUT -* | [--->] I_Content_Type TYPE STRING (default ='application/json') -* | [--->] I_sentences TYPE BOOLEAN (default =c_boolean_true) -* | [--->] I_tones TYPE TT_STRING(optional) -* | [--->] I_Content_Language TYPE STRING (default ='en') -* | [--->] I_Accept_Language TYPE STRING (default ='en') +* | [--->] I_TONE_INPUT TYPE T_TONE_INPUT +* | [--->] I_CONTENT_TYPE TYPE STRING (default ='application/json') +* | [--->] I_SENTENCES TYPE BOOLEAN (default =c_boolean_true) +* | [--->] I_TONES TYPE TT_STRING(optional) +* | [--->] I_CONTENT_LANGUAGE TYPE STRING (default ='en') +* | [--->] I_ACCEPT_LANGUAGE TYPE STRING (default ='en') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TONE_ANALYSIS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -362,8 +455,8 @@ method TONE. data: lv_queryparam type string. - if i_sentences is supplied. - lv_queryparam = i_sentences. + if i_SENTENCES is supplied. + lv_queryparam = i_SENTENCES. add_query_parameter( exporting i_parameter = `sentences` @@ -373,12 +466,12 @@ method TONE. c_url = ls_request_prop-url ) ##NO_TEXT. endif. - if i_tones is supplied. + if i_TONES is supplied. data: - lv_item_tones type STRING. + lv_item_TONES type STRING. clear: lv_queryparam, lv_sep. - loop at i_tones into lv_item_tones. - lv_queryparam = lv_queryparam && lv_sep && lv_item_tones. + loop at i_TONES into lv_item_TONES. + lv_queryparam = lv_queryparam && lv_sep && lv_item_TONES. lv_sep = ','. endloop. lv_queryparam = escape( val = lv_queryparam format = cl_abap_format=>e_uri_full ). @@ -394,12 +487,12 @@ method TONE. data: lv_headerparam type string ##NEEDED. - if i_Content_Type is supplied. - ls_request_prop-header_content_type = I_Content_Type. + if i_CONTENT_TYPE is supplied. + ls_request_prop-header_content_type = I_CONTENT_TYPE. endif. - if i_Content_Language is supplied. - lv_headerparam = I_Content_Language. + if i_CONTENT_LANGUAGE is supplied. + lv_headerparam = I_CONTENT_LANGUAGE. add_header_parameter( exporting i_parameter = 'Content-Language' @@ -408,8 +501,8 @@ method TONE. c_headers = ls_request_prop-headers ) ##NO_TEXT. endif. - if i_Accept_Language is supplied. - lv_headerparam = I_Accept_Language. + if i_ACCEPT_LANGUAGE is supplied. + lv_headerparam = I_ACCEPT_LANGUAGE. add_header_parameter( exporting i_parameter = 'Accept-Language' @@ -428,20 +521,20 @@ method TONE. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_tone_input ). + lv_datatype = get_datatype( i_TONE_INPUT ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_tone_input i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_TONE_INPUT i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'tone_input' i_value = i_tone_input ). + lv_bodyparam = abap_to_json( i_name = 'tone_input' i_value = i_TONE_INPUT ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_tone_input to . + assign i_TONE_INPUT to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -475,9 +568,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_TONE_ANALYZER_V3->TONE_CHAT * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_utterances TYPE T_TONE_CHAT_INPUT -* | [--->] I_Content_Language TYPE STRING (default ='en') -* | [--->] I_Accept_Language TYPE STRING (default ='en') +* | [--->] I_UTTERANCES TYPE T_TONE_CHAT_INPUT +* | [--->] I_CONTENT_LANGUAGE TYPE STRING (default ='en') +* | [--->] I_ACCEPT_LANGUAGE TYPE STRING (default ='en') * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_UTTERANCE_ANALYSES @@ -507,8 +600,8 @@ method TONE_CHAT. data: lv_headerparam type string ##NEEDED. - if i_Content_Language is supplied. - lv_headerparam = I_Content_Language. + if i_CONTENT_LANGUAGE is supplied. + lv_headerparam = I_CONTENT_LANGUAGE. add_header_parameter( exporting i_parameter = 'Content-Language' @@ -517,8 +610,8 @@ method TONE_CHAT. c_headers = ls_request_prop-headers ) ##NO_TEXT. endif. - if i_Accept_Language is supplied. - lv_headerparam = I_Accept_Language. + if i_ACCEPT_LANGUAGE is supplied. + lv_headerparam = I_ACCEPT_LANGUAGE. add_header_parameter( exporting i_parameter = 'Accept-Language' @@ -537,20 +630,20 @@ method TONE_CHAT. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_utterances ). + lv_datatype = get_datatype( i_UTTERANCES ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_utterances i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_UTTERANCES i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'utterances' i_value = i_utterances ). + lv_bodyparam = abap_to_json( i_name = 'utterances' i_value = i_UTTERANCES ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_utterances to . + assign i_UTTERANCES to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. diff --git a/src/zcl_ibmc_util.clas.abap b/src/zcl_ibmc_util.clas.abap index f083043..6f492b2 100644 --- a/src/zcl_ibmc_util.clas.abap +++ b/src/zcl_ibmc_util.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019,2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,27 +18,86 @@ class ZCL_IBMC_UTIL definition public section. + + "! Converts an internal table to JSON string in table schema format. + "! E.g.: '{"fields": ["PET", "NUMBER"], "values": [["Cat",5],["Rabbit",2]]}' + "! + "! @parameter I_ITAB | Internal table to be converted. + "! @parameter I_DICTIONARY | Dictionary to be used for mapping ABAP identifiers to JSON keys. + "! @parameter I_LOWER_CASE | If set to C_BOOLEAN_TRUE all keys in JSON string will be lower case. + "! @parameter I_EXCLUDE_FIELDS | Internal table of table fields in I_ITAB that should not occur in result. + "! @parameter E_JSON | JSON string. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + class-methods ITAB_TO_TABLESCHEMA + importing + !I_ITAB type ANY TABLE + !I_DICTIONARY type ANY optional + !I_LOWER_CASE type ZCL_IBMC_SERVICE=>BOOLEAN default ZCL_IBMC_SERVICE=>C_BOOLEAN_FALSE + !IT_EXCLUDED_FIELDS type ZCL_IBMC_SERVICE=>TT_STRING optional + returning + value(E_JSON) type STRING . + "! Converts a JSON string in table schema format to an internal table. + "! E.g.: '{"tableschema_key": {"fields": ["PET", "NUMBER"], "values": [["Cat",5],["Rabbit",2]]}}' + "! + "! @parameter I_JSON | JSON string. + "! @parameter I_TABLESCHEMA_KEY | Key in JSON string that holds the table schema. + "! @parameter E_ITAB | Internal table containing converted data. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + class-methods TABLESCHEMA_TO_ITAB + importing + !I_JSON type STRING + !I_TABLESCHEMA_KEY type STRING optional + exporting + !E_ITAB type ANY TABLE . + "! Converts a timestamp in UTC to a timestamp in local time. + "! + "! @parameter IV_TIMESTAMP | Timestamp (UTC). + "! @parameter EV_LOCAL | Timestamp (local time). + "! class-methods CONVERT_TIMESTAMP_TO_LOCAL importing !IV_TIMESTAMP type TIMESTAMP returning value(EV_LOCAL) type STRING . + "! Determine MIME type from a file name, e.g. 'docu.txt' -> 'text_/plain'. + "! + "! @parameter I_FILENAME | Filename with extension. + "! @parameter E_MIMETYPE | MIME type. + "! class-methods GET_MIMETYPE_FROM_EXTENSION importing !I_FILENAME type STRING returning value(E_MIMETYPE) type STRING . + "! Converts a timestamp in UTC to a timestamp in another timezone. + "! + "! @parameter I_TIMESTAMP | Timestamp (UTC). + "! @parameter I_TIMEZONE | Time zone + "! @parameter E_TIMESTAMP | Timestamp in give time zone. + "! class-methods UTC_TO_TIMEZONE importing !I_TIMESTAMP type TIMESTAMP !I_TIMEZONE type ZIF_IBMC_SERVICE_ARCH=>TY_TIMEZONE optional returning value(E_TIMESTAMP) type TIMESTAMP . + "! Converts datetime format to a timestamp, i.e. yyyy-mm-ddThh:mm:ssZ -> YYYYMMDDHHMMSS + "! + "! @parameter I_DATETIME | Input in datetime format. + "! @parameter E_TIMESTAMP | Timestamp. + "! class-methods CONVERT_DATETIME_TO_TIMESTAMP importing !I_DATETIME type ZCL_IBMC_SERVICE=>DATETIME returning value(E_TIMESTAMP) type TIMESTAMP . + "! Converts a timestamp to datetime format, i.e. YYYYMMDDHHMMSS -> yyyy-mm-ddThh:mm:ssZ + "! + "! @parameter I_TIMESTAMP | Timestamp. + "! @parameter E_DATATIMEP | Datetime format. + "! class-methods CONVERT_TIMESTAMP_TO_DATETIME importing !I_TIMESTAMP type TIMESTAMP @@ -114,8 +173,6 @@ CLASS ZCL_IBMC_UTIL IMPLEMENTATION. lv_datc(10) type c, lv_timc(8) type c. - - " split timestamp to date and time according to time zone lv_timezone = zcl_ibmc_service_arch=>get_timezone( ). convert time stamp iv_timestamp time zone lv_timezone @@ -153,14 +210,332 @@ CLASS ZCL_IBMC_UTIL IMPLEMENTATION. when others. e_mimetype = `application/` && l_extension ##NO_TEXT. endcase. -* select single type -* into e_mimetype -* from sdokfext -* where extension = l_extension. -* -* if sy-subrc <> 0. -* e_mimetype = `application/` && l_extension. -* endif. + endmethod. + + + method itab_to_tableschema. + " Converts an internal table to a JSON object string with keys "fields" and "values". + " Example: I_ITAB = | PET | NUMBER | + " ------------------- + " | Cat | 5 | + " | Rabbit | 2 | + " --> E_JSON = '{"fields": ["PET", "NUMBER"], "values": [["Cat",5],["Rabbit",2]]}' + " Field names are mapped according to I_DICTIONARY. + " Example: BEGIN OF i_dictionary, + " PET type string value 'MyPet', + " END OF i_dictionary. + " --> E_JSON = '{"fields": ["MyPet", "NUMBER"], "values": [["Cat",5],["Rabbit",2]]}' + " Field names are translated to lower case, if I_LOWER_CASE = zcl_ibmc_service=>c_boolean_true. + " Field types must be elementary or table of elementary. + " Field names in table IT_EXCLUDED_FIELDS are skipped and will not appear in the JSON string. + + data: + lt_comp type cl_abap_structdescr=>component_table, + ls_comp like line of lt_comp, + lo_datadescr type ref to cl_abap_datadescr, + lo_tabledesc type ref to cl_abap_tabledescr, + lo_struct type ref to cl_abap_structdescr, + lv_fieldname type string, + lv_sep1(1) type c, + lv_sep2(1) type c, + lv_sep3(1) type c. + + field-symbols: + type any, + type any, + type any table, + type string. + + " the following data type are character-like, thus the according values must be quoted + data(lc_character_types) = + cl_abap_datadescr=>typekind_char && + cl_abap_datadescr=>typekind_clike && + cl_abap_datadescr=>typekind_csequence && + cl_abap_datadescr=>typekind_string && + cl_abap_datadescr=>typekind_date && + cl_abap_datadescr=>typekind_time && + cl_abap_datadescr=>typekind_num. + + " get internal table fields + lo_tabledesc ?= cl_abap_tabledescr=>describe_by_data( i_itab ). + lo_struct ?= lo_tabledesc->get_table_line_type( ). + lt_comp = lo_struct->get_components( ). + + " append field names to JSON string + e_json = `{"fields": [` ##NO_TEXT. + clear lv_sep1. + loop at lt_comp into ls_comp. + read table it_excluded_fields with key table_line = ls_comp-name transporting no fields. + if sy-subrc = 0. continue. endif. + lv_fieldname = ls_comp-name. + if i_dictionary is supplied. + assign component ls_comp-name of structure i_dictionary to . + if sy-subrc = 0. + lv_fieldname = . + endif. + endif. + if i_lower_case eq zcl_ibmc_service=>c_boolean_true. + translate lv_fieldname to lower case. + endif. + e_json = e_json && lv_sep1 && `"` && lv_fieldname && `"`. + lv_sep1 = `,`. + endloop. + + " append values to JSON string + e_json = e_json && `], "values": [` ##NO_TEXT. + + clear lv_sep1. + loop at i_itab assigning . " loop on itab records + clear lv_sep2. + e_json = e_json && lv_sep1 && `[`. + loop at lt_comp into ls_comp. " loop on record fields + read table it_excluded_fields with key table_line = ls_comp-name transporting no fields. + if sy-subrc = 0. continue. endif. + + if ls_comp-type->type_kind eq cl_abap_datadescr=>typekind_table. + + " field type is subtable, get line type + assign component ls_comp-name of structure to . + lo_tabledesc ?= cl_abap_tabledescr=>describe_by_data( ). + lo_datadescr = lo_tabledesc->get_table_line_type( ). + + " add field values of subtable to JSON string + clear lv_sep3. + e_json = e_json && lv_sep2 && `[`. + loop at assigning . + if lo_datadescr->type_kind ca lc_character_types. + e_json = e_json && lv_sep3 && `"` && && `"`. + else. + e_json = e_json && lv_sep3 && . + endif. + lv_sep3 = `,`. + endloop. + e_json = e_json && `]`. + + else. + + " field type is elementary, add field value to JSON string + assign component ls_comp-name of structure to . + if ls_comp-type->type_kind ca lc_character_types. + e_json = e_json && lv_sep2 && `"` && && `"`. + else. + e_json = e_json && lv_sep2 && . + endif. + + endif. + + lv_sep2 = `,`. + endloop. + + e_json = e_json && `]`. + lv_sep1 = `,`. + endloop. + + e_json = e_json && `]}` ##NO_TEXT. + + endmethod. + + + method tableschema_to_itab. + + data: + lt_comp type cl_abap_structdescr=>component_table, + ls_comp like line of lt_comp, + lv_field type string, + lt_field type standard table of string, + lv_fieldname type string, + lv_tabix type i, + lv_tableschema_key type string, + lo_structdescr type ref to cl_abap_structdescr, + lo_datadescr type ref to cl_abap_datadescr, + lo_tabledescr type ref to cl_abap_tabledescr, + lr_values type ref to data, + lr_comp type ref to data, + lr_data type ref to data, + lv_json type string. + + field-symbols: + type ref to data, + type any table, + type any, + type any, + type any table, + type any, + type any, + type ref to data, + type any table, + type any table, + type any, + type any table, + type any table. + + " dynamically create data structure: + " begin of , + " tableschema_key type ref to data, + " end of . + if i_tableschema_key is initial. + lv_json = `{ "tableschema_key": ` && i_json && ` }` ##NO_TEXT. + lv_tableschema_key = `tableschema_key` ##NO_TEXT. + else. + lv_json = i_json. + lv_tableschema_key = i_tableschema_key. + endif. + ls_comp-name = lv_tableschema_key. + ls_comp-type ?= cl_abap_datadescr=>describe_by_data( lr_data ). + append ls_comp to lt_comp. + lo_structdescr = cl_abap_structdescr=>create( lt_comp ). + create data lr_data type handle lo_structdescr. + assign lr_data->* to . + + " parse JSON + try. + zcl_ibmc_service=>parse_json( + exporting + i_json = lv_json + "i_dictionary = c_abapname_dictionary + changing + c_abap = ). + catch zcx_ibmc_service_exception. + return. + endtry. + assign component lv_tableschema_key of structure to . + assign ->* to . + + + + unassign . + assign component 'VALUES' of structure to . + + " I_JSON does not have table schema on highest level, check if any subkey has + " check all components + lo_structdescr ?= cl_abap_structdescr=>describe_by_data( ). + clear lt_comp[]. + lt_comp = lo_structdescr->get_components( ). + + loop at lt_comp into ls_comp. + assign component ls_comp-name of structure to . + lo_datadescr ?= cl_abap_datadescr=>describe_by_data_ref( ). + if lo_datadescr->type_kind eq cl_abap_datadescr=>typekind_table. + assign ->* to . + loop at assigning ##GEN_OK. + exit. + endloop. + endif. + assign ->* to . + assign component 'VALUES' of structure to . + if sy-subrc = 0. + assign to . + exit. + endif. + + endloop. + + + if not is assigned. + return. + endif. + + assign ->* to . + assign component 'FIELDS' of structure to . + if sy-subrc = 0. + assign ->* to . + loop at assigning ##GEN_OK. + assign ->* to . + append to lt_field. + endloop. + else. + data(lv_count) = lines( ). + data(lv_index) = 0. + while lv_index < lv_count. + lv_fieldname = `FIELD` && lv_index. + lv_index = lv_index + 1. + append lv_fieldname to lt_field. + endwhile. + endif. + + + " get data fields; read first values for reference + if lines( ) < 1. return. endif. + loop at into lr_data. + assign lr_data->* to . + exit. + endloop. + + clear lt_comp[]. + loop at into lr_values. + + " field name + lv_tabix = lv_tabix + 1. + read table lt_field index lv_tabix into lv_field. + if sy-subrc <> 0. + lv_field = `C` && lv_tabix. + endif. + ls_comp-name = lv_field. + + " read data type + assign lr_values->* to . + lo_datadescr ?= cl_abap_datadescr=>describe_by_data( ). + + if lo_datadescr->type_kind = cl_abap_structdescr=>typekind_table. + + " data type is internal table (of references) + " -> create new internal table layout w/o references + lo_tabledescr ?= cl_abap_tabledescr=>describe_by_data( ). + lo_datadescr = lo_tabledescr->get_table_line_type( ). + if lo_datadescr->type_kind = cl_abap_datadescr=>typekind_dref. + assign to . + loop at into lr_comp. exit. endloop. " read first table record + lo_datadescr ?= cl_abap_datadescr=>describe_by_data_ref( lr_comp ). + endif. + ls_comp-type = cl_abap_tabledescr=>create( p_line_type = lo_datadescr ). + + else. + ls_comp-type = lo_datadescr. + endif. + + append ls_comp to lt_comp. + endloop. + + " create data structure + lo_structdescr = cl_abap_structdescr=>create( lt_comp ). + create data lr_data type handle lo_structdescr. + assign lr_data->* to . + create data lr_data like table of . + assign lr_data->* to . + + + " populate data structure + loop at into lr_data. + assign lr_data->* to . + if not is assigned. + create data lr_data type handle lo_structdescr. + assign lr_data->* to . + endif. + lv_tabix = 0. + loop at into lr_values. + lv_tabix = lv_tabix + 1. + read table lt_comp index lv_tabix into ls_comp. + case ls_comp-type->type_kind. + when cl_abap_structdescr=>typekind_table. + assign component ls_comp-name of structure to . + assign lr_values->* to . + loop at into lr_data. + assign lr_data->* to . + insert into table . + endloop. + when others. + assign component ls_comp-name of structure to . + assign lr_values->* to . + = . + endcase. + endloop. + + insert into table . + unassign . " force data creation at next loop step + + endloop. + + move-corresponding to e_itab. endmethod. diff --git a/src/zcl_ibmc_util.clas.xml b/src/zcl_ibmc_util.clas.xml index ac71b34..2a1f5db 100644 --- a/src/zcl_ibmc_util.clas.xml +++ b/src/zcl_ibmc_util.clas.xml @@ -36,6 +36,18 @@ E Returns mime type for a given extension + + ZCL_IBMC_UTIL + ITAB_TO_TABLESCHEMA + E + Converts an internal table to table schema JSON format + + + ZCL_IBMC_UTIL + TABLESCHEMA_TO_ITAB + E + Converts a JSON string in table schema format to an itab + ZCL_IBMC_UTIL UTC_TO_TIMEZONE diff --git a/src/zcl_ibmc_visual_recognition_v3.clas.abap b/src/zcl_ibmc_visual_recognition_v3.clas.abap index a9ae428..e755104 100644 --- a/src/zcl_ibmc_visual_recognition_v3.clas.abap +++ b/src/zcl_ibmc_visual_recognition_v3.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,46 +28,82 @@ public section. types: "! Result of a class within a classifier. begin of T_CLASS_RESULT, + "! Name of the class.
+ "!
+ "! Class names are translated in the language defined by the **Accept-Language** + "! request header for the build-in classifier IDs (`default`, `food`, and + "! `explicit`). Class names of custom classifiers are not translated. The response + "! might not be in the specified language when the requested language is not + "! supported or when there is no translation for the class name. CLASS type STRING, + "! Confidence score for the property in the range of 0 to 1. A higher score + "! indicates greater likelihood that the class is depicted in the image. The + "! default threshold for returning scores from a classifier is 0.5. SCORE type FLOAT, + "! Knowledge graph of the property. For example, `/fruit/pome/apple/eating + "! apple/Granny Smith`. Included only if identified. TYPE_HIERARCHY type STRING, end of T_CLASS_RESULT. types: "! Classifier and score combination. begin of T_CLASSIFIER_RESULT, + "! Name of the classifier. NAME type STRING, + "! ID of a classifier identified in the image. CLASSIFIER_ID type STRING, + "! Classes within the classifier. CLASSES type STANDARD TABLE OF T_CLASS_RESULT WITH NON-UNIQUE DEFAULT KEY, end of T_CLASSIFIER_RESULT. types: "! Information about what might have caused a failure, such as an image that is too "! large. Not returned when there is no error. begin of T_ERROR_INFO, + "! HTTP status code. CODE type INTEGER, + "! Human-readable error description. For example, `File size limit exceeded`. DESCRIPTION type STRING, + "! Codified error string. For example, `limit_exceeded`. ERROR_ID type STRING, end of T_ERROR_INFO. types: "! Results for one image. begin of T_CLASSIFIED_IMAGE, + "! Source of the image before any redirects. Not returned when the image is + "! uploaded. SOURCE_URL type STRING, + "! Fully resolved URL of the image after redirects are followed. Not returned when + "! the image is uploaded. RESOLVED_URL type STRING, + "! Relative path of the image file if uploaded directly. Not returned when the + "! image is passed by URL. IMAGE type STRING, + "! Information about what might have caused a failure, such as an image that is too + "! large. Not returned when there is no error. ERROR type T_ERROR_INFO, + "! The classifiers. CLASSIFIERS type STANDARD TABLE OF T_CLASSIFIER_RESULT WITH NON-UNIQUE DEFAULT KEY, end of T_CLASSIFIED_IMAGE. types: "! Information about something that went wrong. begin of T_WARNING_INFO, + "! Codified warning string, such as `limit_reached`. WARNING_ID type STRING, + "! Information about the error. DESCRIPTION type STRING, end of T_WARNING_INFO. types: "! Results for all images. begin of T_CLASSIFIED_IMAGES, + "! Number of custom classes identified in the images. CUSTOM_CLASSES type INTEGER, + "! Number of images processed for the API call. IMAGES_PROCESSED type INTEGER, + "! Classified images. IMAGES type STANDARD TABLE OF T_CLASSIFIED_IMAGE WITH NON-UNIQUE DEFAULT KEY, + "! Information about what might cause less than optimal output. For example, a + "! request sent with a corrupt .zip file and a list of image URLs will still + "! complete, but does not return the expected output. Not returned when there is + "! no warning. WARNINGS type STANDARD TABLE OF T_WARNING_INFO WITH NON-UNIQUE DEFAULT KEY, end of T_CLASSIFIED_IMAGES. types: @@ -77,6 +113,7 @@ public section. types: "! A category within a classifier. begin of T_CLASS, + "! The name of the class. CLASS type STRING, end of T_CLASS. types: @@ -85,43 +122,131 @@ public section. types: "! Error information. begin of T_ERROR_RESPONSE, + "! HTTP error code. CODE type INTEGER, + "! Human-readable error string, like 'Invalid image file'. ERROR type STRING, end of T_ERROR_RESPONSE. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT1, + "! The name of the new classifier. Encode special characters in UTF-8. NAME type STRING, + "! A .zip file of images that depict the visual subject of a class in the new + "! classifier. You can include more than one positive example file in a call.
+ "!
+ "! Specify the parameter name by appending `_positive_examples` to the class name. + "! For example, `goldenretriever_positive_examples` creates the class + "! **goldenretriever**. The string cannot contain the following characters: ``$ * + "! - { } \ | / ' " ` [ ]``.
+ "!
+ "! Include at least 10 images in .jpg or .png format. The minimum recommended image + "! resolution is 32X32 pixels. The maximum number of images is 10,000 images or + "! 100 MB per .zip file.
+ "!
+ "! Encode special characters in the file name in UTF-8. POSITIVE_EXAMPLES type FILE, + "! A .zip file of images that do not depict the visual subject of any of the + "! classes of the new classifier. Must contain a minimum of 10 images.
+ "!
+ "! Encode special characters in the file name in UTF-8. NEGATIVE_EXAMPLES type FILE, end of T_INLINE_OBJECT1. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT, + "! An image file (.gif, .jpg, .png, .tif) or .zip file with images. Maximum image + "! size is 10 MB. Include no more than 20 images and limit the .zip file to 100 + "! MB. Encode the image and .zip file names in UTF-8 if they contain non-ASCII + "! characters. The service assumes UTF-8 encoding if it encounters non-ASCII + "! characters.
+ "!
+ "! You can also include an image with the **url** parameter. IMAGES_FILE type FILE, + "! The URL of an image (.gif, .jpg, .png, .tif) to analyze. The minimum recommended + "! pixel density is 32X32 pixels, but the service tends to perform better with + "! images that are at least 224 x 224 pixels. The maximum image size is 10 + "! MB.
+ "!
+ "! You can also include images with the **images_file** parameter. URL type STRING, + "! The minimum score a class must have to be displayed in the response. Set the + "! threshold to `0.0` to return all identified classes. THRESHOLD type FLOAT, + "! The categories of classifiers to apply. The **classifier_ids** parameter + "! overrides **owners**, so make sure that **classifier_ids** is empty.
+ "! - Use `IBM` to classify against the `default` general classifier. You get the + "! same result if both **classifier_ids** and **owners** parameters are + "! empty.
+ "! - Use `me` to classify against all your custom classifiers. However, for better + "! performance use **classifier_ids** to specify the specific custom classifiers + "! to apply.
+ "! - Use both `IBM` and `me` to analyze the image against both classifier + "! categories. OWNERS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! Which classifiers to apply. Overrides the **owners** parameter. You can specify + "! both custom and built-in classifier IDs. The built-in `default` classifier is + "! used if both **classifier_ids** and **owners** parameters are empty.
+ "!
+ "! The following built-in classifier IDs require no training:
+ "! - `default`: Returns classes from thousands of general tags.
+ "! - `food`: Enhances specificity and accuracy for images of food items.
+ "! - `explicit`: Evaluates whether the image might be pornographic. CLASSIFIER_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, end of T_INLINE_OBJECT. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT2, + "! A .zip file of images that depict the visual subject of a class in the + "! classifier. The positive examples create or update classes in the classifier. + "! You can include more than one positive example file in a call.
+ "!
+ "! Specify the parameter name by appending `_positive_examples` to the class name. + "! For example, `goldenretriever_positive_examples` creates the class + "! `goldenretriever`. The string cannot contain the following characters: ``$ * - + "! { } \ | / ' " ` [ ]``.
+ "!
+ "! Include at least 10 images in .jpg or .png format. The minimum recommended image + "! resolution is 32X32 pixels. The maximum number of images is 10,000 images or + "! 100 MB per .zip file.
+ "!
+ "! Encode special characters in the file name in UTF-8. POSITIVE_EXAMPLES type FILE, + "! A .zip file of images that do not depict the visual subject of any of the + "! classes of the new classifier. Must contain a minimum of 10 images.
+ "!
+ "! Encode special characters in the file name in UTF-8. NEGATIVE_EXAMPLES type FILE, end of T_INLINE_OBJECT2. types: "! Information about a classifier. begin of T_CLASSIFIER, + "! ID of a classifier identified in the image. CLASSIFIER_ID type STRING, + "! Name of the classifier. NAME type STRING, + "! Unique ID of the account who owns the classifier. Might not be returned by some + "! requests. OWNER type STRING, + "! Training status of classifier. STATUS type STRING, + "! Whether the classifier can be downloaded as a Core ML model after the training + "! status is `ready`. CORE_ML_ENABLED type BOOLEAN, + "! If classifier training has failed, this field might explain why. EXPLANATION type STRING, + "! Date and time in Coordinated Universal Time (UTC) that the classifier was + "! created. CREATED type DATETIME, + "! Classes that define a classifier. CLASSES type STANDARD TABLE OF T_CLASS WITH NON-UNIQUE DEFAULT KEY, + "! Date and time in Coordinated Universal Time (UTC) that the classifier was + "! updated. Might not be returned by some requests. Identical to `updated` and + "! retained for backward compatibility. RETRAINED type DATETIME, + "! Date and time in Coordinated Universal Time (UTC) that the classifier was most + "! recently updated. The field matches either `retrained` or `created`. Might not + "! be returned by some requests. UPDATED type DATETIME, end of T_CLASSIFIER. types: @@ -139,6 +264,7 @@ public section. types: "! Error information. begin of T_ERROR_HTML, + "! HTML description of the error. ERROR1 type STRING, end of T_ERROR_HTML. types: @@ -152,6 +278,7 @@ public section. types: "! A container for the list of classifiers. begin of T_CLASSIFIERS, + "! List of classifiers. CLASSIFIERS type STANDARD TABLE OF T_CLASSIFIER WITH NON-UNIQUE DEFAULT KEY, end of T_CLASSIFIERS. @@ -224,61 +351,64 @@ constants: "! Classify images. "! - "! @parameter I_images_file | + "! @parameter I_IMAGES_FILE | "! An image file (.gif, .jpg, .png, .tif) or .zip file with images. Maximum image "! size is 10 MB. Include no more than 20 images and limit the .zip file to 100 "! MB. Encode the image and .zip file names in UTF-8 if they contain non-ASCII "! characters. The service assumes UTF-8 encoding if it encounters non-ASCII - "! characters. - "! + "! characters.
+ "!
"! You can also include an image with the **url** parameter. - "! @parameter I_images_filename | + "! @parameter I_IMAGES_FILENAME | "! The filename for imagesFile. - "! @parameter I_images_file_content_type | + "! @parameter I_IMAGES_FILE_CONTENT_TYPE | "! The content type of imagesFile. - "! @parameter I_url | + "! @parameter I_URL | "! The URL of an image (.gif, .jpg, .png, .tif) to analyze. The minimum recommended "! pixel density is 32X32 pixels, but the service tends to perform better with - "! images that are at least 224 x 224 pixels. The maximum image size is 10 MB. - "! + "! images that are at least 224 x 224 pixels. The maximum image size is 10 + "! MB.
+ "!
"! You can also include images with the **images_file** parameter. - "! @parameter I_threshold | + "! @parameter I_THRESHOLD | "! The minimum score a class must have to be displayed in the response. Set the "! threshold to `0.0` to return all identified classes. - "! @parameter I_owners | + "! @parameter I_OWNERS | "! The categories of classifiers to apply. The **classifier_ids** parameter - "! overrides **owners**, so make sure that **classifier_ids** is empty. + "! overrides **owners**, so make sure that **classifier_ids** is empty.
"! - Use `IBM` to classify against the `default` general classifier. You get the - "! same result if both **classifier_ids** and **owners** parameters are empty. + "! same result if both **classifier_ids** and **owners** parameters are + "! empty.
"! - Use `me` to classify against all your custom classifiers. However, for better "! performance use **classifier_ids** to specify the specific custom classifiers - "! to apply. + "! to apply.
"! - Use both `IBM` and `me` to analyze the image against both classifier "! categories. - "! @parameter I_classifier_ids | + "! @parameter I_CLASSIFIER_IDS | "! Which classifiers to apply. Overrides the **owners** parameter. You can specify "! both custom and built-in classifier IDs. The built-in `default` classifier is - "! used if both **classifier_ids** and **owners** parameters are empty. - "! - "! The following built-in classifier IDs require no training: - "! - `default`: Returns classes from thousands of general tags. - "! - `food`: Enhances specificity and accuracy for images of food items. + "! used if both **classifier_ids** and **owners** parameters are empty.
+ "!
+ "! The following built-in classifier IDs require no training:
+ "! - `default`: Returns classes from thousands of general tags.
+ "! - `food`: Enhances specificity and accuracy for images of food items.
"! - `explicit`: Evaluates whether the image might be pornographic. - "! @parameter I_Accept_Language | + "! @parameter I_ACCEPT_LANGUAGE | "! The desired language of parts of the response. See the response for details. "! @parameter E_RESPONSE | "! Service return value of type T_CLASSIFIED_IMAGES + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CLASSIFY importing - !I_images_file type FILE optional - !I_images_filename type STRING optional - !I_images_file_content_type type STRING optional - !I_url type STRING optional - !I_threshold type FLOAT optional - !I_owners type TT_STRING optional - !I_classifier_ids type TT_STRING optional - !I_Accept_Language type STRING default 'en' + !I_IMAGES_FILE type FILE optional + !I_IMAGES_FILENAME type STRING optional + !I_IMAGES_FILE_CONTENT_TYPE type STRING optional + !I_URL type STRING optional + !I_THRESHOLD type FLOAT optional + !I_OWNERS type TT_STRING optional + !I_CLASSIFIER_IDS type TT_STRING optional + !I_ACCEPT_LANGUAGE type STRING default 'en' !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -288,39 +418,41 @@ constants: "! Create a classifier. "! - "! @parameter I_name | + "! @parameter I_NAME | "! The name of the new classifier. Encode special characters in UTF-8. - "! @parameter I_positive_examples | + "! @parameter I_POSITIVE_EXAMPLES | "! A .zip file of images that depict the visual subject of a class in the new - "! classifier. You can include more than one positive example file in a call. - "! + "! classifier. You can include more than one positive example file in a call.
+ "!
"! Specify the parameter name by appending `_positive_examples` to the class name. "! For example, `goldenretriever_positive_examples` creates the class - "! **goldenretriever**. - "! + "! **goldenretriever**. The string cannot contain the following characters: ``$ * + "! - { } \ | / ' " ` [ ]``.
+ "!
"! Include at least 10 images in .jpg or .png format. The minimum recommended image "! resolution is 32X32 pixels. The maximum number of images is 10,000 images or - "! 100 MB per .zip file. - "! + "! 100 MB per .zip file.
+ "!
"! Encode special characters in the file name in UTF-8. - "! @parameter I_negative_examples | + "! @parameter I_NEGATIVE_EXAMPLES | "! A .zip file of images that do not depict the visual subject of any of the - "! classes of the new classifier. Must contain a minimum of 10 images. - "! + "! classes of the new classifier. Must contain a minimum of 10 images.
+ "!
"! Encode special characters in the file name in UTF-8. - "! @parameter I_negative_examples_filename | + "! @parameter I_NEGATIVE_EXAMPLES_FILENAME | "! The filename for negativeExamples. "! @parameter E_RESPONSE | "! Service return value of type T_CLASSIFIER + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_CLASSIFIER importing - !I_name type STRING - !I_positive_examples type TT_MAP_FILE - !I_negative_examples type FILE optional - !I_negative_examples_filename type STRING optional - !I_positive_examples_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL - !I_negative_examples_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL + !I_NAME type STRING + !I_POSITIVE_EXAMPLES type TT_MAP_FILE + !I_NEGATIVE_EXAMPLES type FILE optional + !I_NEGATIVE_EXAMPLES_FILENAME type STRING optional + !I_POSITIVE_EXAMPLES_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL + !I_NEGATIVE_EXAMPLES_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -329,15 +461,16 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Retrieve a list of classifiers. "! - "! @parameter I_verbose | + "! @parameter I_VERBOSE | "! Specify `true` to return details about the classifiers. Omit this parameter to "! return a brief list of classifiers. "! @parameter E_RESPONSE | "! Service return value of type T_CLASSIFIERS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_CLASSIFIERS importing - !I_verbose type BOOLEAN optional + !I_VERBOSE type BOOLEAN optional !I_accept type string default 'application/json' exporting !E_RESPONSE type T_CLASSIFIERS @@ -345,14 +478,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Retrieve classifier details. "! - "! @parameter I_classifier_id | + "! @parameter I_CLASSIFIER_ID | "! The ID of the classifier. "! @parameter E_RESPONSE | "! Service return value of type T_CLASSIFIER + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_CLASSIFIER importing - !I_classifier_id type STRING + !I_CLASSIFIER_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_CLASSIFIER @@ -360,40 +494,42 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update a classifier. "! - "! @parameter I_classifier_id | + "! @parameter I_CLASSIFIER_ID | "! The ID of the classifier. - "! @parameter I_positive_examples | + "! @parameter I_POSITIVE_EXAMPLES | "! A .zip file of images that depict the visual subject of a class in the "! classifier. The positive examples create or update classes in the classifier. - "! You can include more than one positive example file in a call. - "! + "! You can include more than one positive example file in a call.
+ "!
"! Specify the parameter name by appending `_positive_examples` to the class name. "! For example, `goldenretriever_positive_examples` creates the class - "! `goldenretriever`. - "! + "! `goldenretriever`. The string cannot contain the following characters: ``$ * - + "! { } \ | / ' " ` [ ]``.
+ "!
"! Include at least 10 images in .jpg or .png format. The minimum recommended image "! resolution is 32X32 pixels. The maximum number of images is 10,000 images or - "! 100 MB per .zip file. - "! + "! 100 MB per .zip file.
+ "!
"! Encode special characters in the file name in UTF-8. - "! @parameter I_negative_examples | + "! @parameter I_NEGATIVE_EXAMPLES | "! A .zip file of images that do not depict the visual subject of any of the - "! classes of the new classifier. Must contain a minimum of 10 images. - "! + "! classes of the new classifier. Must contain a minimum of 10 images.
+ "!
"! Encode special characters in the file name in UTF-8. - "! @parameter I_negative_examples_filename | + "! @parameter I_NEGATIVE_EXAMPLES_FILENAME | "! The filename for negativeExamples. "! @parameter E_RESPONSE | "! Service return value of type T_CLASSIFIER + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_CLASSIFIER importing - !I_classifier_id type STRING - !I_positive_examples type TT_MAP_FILE optional - !I_negative_examples type FILE optional - !I_negative_examples_filename type STRING optional - !I_positive_examples_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL - !I_negative_examples_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL + !I_CLASSIFIER_ID type STRING + !I_POSITIVE_EXAMPLES type TT_MAP_FILE optional + !I_NEGATIVE_EXAMPLES type FILE optional + !I_NEGATIVE_EXAMPLES_FILENAME type STRING optional + !I_POSITIVE_EXAMPLES_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL + !I_NEGATIVE_EXAMPLES_CT type STRING default ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-ALL !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -402,26 +538,28 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a classifier. "! - "! @parameter I_classifier_id | + "! @parameter I_CLASSIFIER_ID | "! The ID of the classifier. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_CLASSIFIER importing - !I_classifier_id type STRING + !I_CLASSIFIER_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Retrieve a Core ML model of a classifier. "! - "! @parameter I_classifier_id | + "! @parameter I_CLASSIFIER_ID | "! The ID of the classifier. "! @parameter E_RESPONSE | "! Service return value of type FILE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_CORE_ML_MODEL importing - !I_classifier_id type STRING + !I_CLASSIFIER_ID type STRING !I_accept type string default 'application/octet-stream' exporting !E_RESPONSE type FILE @@ -430,12 +568,13 @@ constants: "! Delete labeled data. "! - "! @parameter I_customer_id | + "! @parameter I_CUSTOMER_ID | "! The customer ID for which all data is to be deleted. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_USER_DATA importing - !I_customer_id type STRING + !I_CUSTOMER_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . @@ -476,7 +615,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -508,7 +647,7 @@ endmethod. * +--------------------------------------------------------------------------------------
method get_sdk_version_date. - e_sdk_version_date = '20191002122854'. + e_sdk_version_date = '20200210092829'. endmethod. @@ -517,14 +656,14 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V3->CLASSIFY * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_images_file TYPE FILE(optional) -* | [--->] I_images_filename TYPE STRING(optional) -* | [--->] I_images_file_content_type TYPE STRING(optional) -* | [--->] I_url TYPE STRING(optional) -* | [--->] I_threshold TYPE FLOAT(optional) -* | [--->] I_owners TYPE TT_STRING(optional) -* | [--->] I_classifier_ids TYPE TT_STRING(optional) -* | [--->] I_Accept_Language TYPE STRING (default ='en') +* | [--->] I_IMAGES_FILE TYPE FILE(optional) +* | [--->] I_IMAGES_FILENAME TYPE STRING(optional) +* | [--->] I_IMAGES_FILE_CONTENT_TYPE TYPE STRING(optional) +* | [--->] I_URL TYPE STRING(optional) +* | [--->] I_THRESHOLD TYPE FLOAT(optional) +* | [--->] I_OWNERS TYPE TT_STRING(optional) +* | [--->] I_CLASSIFIER_IDS TYPE TT_STRING(optional) +* | [--->] I_ACCEPT_LANGUAGE TYPE STRING (default ='en') * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CLASSIFIED_IMAGES @@ -554,8 +693,8 @@ method CLASSIFY. data: lv_headerparam type string ##NEEDED. - if i_Accept_Language is supplied. - lv_headerparam = I_Accept_Language. + if i_ACCEPT_LANGUAGE is supplied. + lv_headerparam = I_ACCEPT_LANGUAGE. add_header_parameter( exporting i_parameter = 'Accept-Language' @@ -577,55 +716,55 @@ method CLASSIFY. lv_extension type string ##NEEDED. - if not i_url is initial. + if not i_URL is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="url"' ##NO_TEXT. - lv_formdata = i_url. + lv_formdata = i_URL. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_threshold is initial. + if not i_THRESHOLD is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="threshold"' ##NO_TEXT. - lv_formdata = i_threshold. + lv_formdata = i_THRESHOLD. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_owners is initial. + if not i_OWNERS is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="owners"' ##NO_TEXT. field-symbols: - like line of i_owners. - loop at i_owners assigning . -* ls_form_part-cdata = . + like line of i_OWNERS. + loop at i_OWNERS assigning . +* ls_form_part-cdata = . * append ls_form_part to lt_form_part. if ls_form_part-cdata is initial. - ls_form_part-cdata = . + ls_form_part-cdata = . else. - ls_form_part-cdata = ls_form_part-cdata && `,` && . + ls_form_part-cdata = ls_form_part-cdata && `,` && . endif. endloop. append ls_form_part to lt_form_part. endif. - if not i_classifier_ids is initial. + if not i_CLASSIFIER_IDS is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="classifier_ids"' ##NO_TEXT. field-symbols: - like line of i_classifier_ids. - loop at i_classifier_ids assigning . -* ls_form_part-cdata = . + like line of i_CLASSIFIER_IDS. + loop at i_CLASSIFIER_IDS assigning . +* ls_form_part-cdata = . * append ls_form_part to lt_form_part. if ls_form_part-cdata is initial. - ls_form_part-cdata = . + ls_form_part-cdata = . else. - ls_form_part-cdata = ls_form_part-cdata && `,` && . + ls_form_part-cdata = ls_form_part-cdata && `,` && . endif. endloop. @@ -635,7 +774,7 @@ method CLASSIFY. - if not i_images_file is initial. + if not i_IMAGES_FILE is initial. if not I_images_filename is initial. lv_value = `form-data; name="images_file"; filename="` && I_images_filename && `"` ##NO_TEXT. else. @@ -646,7 +785,7 @@ method CLASSIFY. clear ls_form_part. ls_form_part-content_type = I_images_file_content_type. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_images_file. + ls_form_part-xdata = i_IMAGES_FILE. append ls_form_part to lt_form_part. endif. @@ -672,12 +811,12 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V3->CREATE_CLASSIFIER * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_name TYPE STRING -* | [--->] I_positive_examples TYPE TT_MAP_FILE -* | [--->] I_negative_examples TYPE FILE(optional) -* | [--->] I_negative_examples_filename TYPE STRING(optional) -* | [--->] I_positive_examples_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) -* | [--->] I_negative_examples_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) +* | [--->] I_NAME TYPE STRING +* | [--->] I_POSITIVE_EXAMPLES TYPE TT_MAP_FILE +* | [--->] I_NEGATIVE_EXAMPLES TYPE FILE(optional) +* | [--->] I_NEGATIVE_EXAMPLES_FILENAME TYPE STRING(optional) +* | [--->] I_POSITIVE_EXAMPLES_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) +* | [--->] I_NEGATIVE_EXAMPLES_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CLASSIFIER @@ -717,47 +856,47 @@ method CREATE_CLASSIFIER. lv_extension type string ##NEEDED. - if not i_name is initial. + if not i_NAME is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="name"' ##NO_TEXT. - lv_formdata = i_name. + lv_formdata = i_NAME. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_positive_examples is initial. - lv_extension = get_file_extension( I_positive_examples_CT ). + if not i_POSITIVE_EXAMPLES is initial. + lv_extension = get_file_extension( I_POSITIVE_EXAMPLES_CT ). field-symbols: - type line of TT_MAP_FILE. + type line of TT_MAP_FILE. find regex '(\{.*\})' in '{{classname}}_positive_examples' submatches lv_keypattern. - loop at i_positive_examples assigning . + loop at i_POSITIVE_EXAMPLES assigning . lv_base_name = '{{classname}}_positive_examples'. - replace lv_keypattern in lv_base_name with -key. + replace lv_keypattern in lv_base_name with -key. lv_value = `form-data; name="` && lv_base_name && `"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. - ls_form_part-content_type = I_positive_examples_CT. + ls_form_part-content_type = I_POSITIVE_EXAMPLES_CT. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = -data. + ls_form_part-xdata = -data. append ls_form_part to lt_form_part. endloop. endif. - if not i_negative_examples is initial. + if not i_NEGATIVE_EXAMPLES is initial. if not I_negative_examples_filename is initial. lv_value = `form-data; name="negative_examples"; filename="` && I_negative_examples_filename && `"` ##NO_TEXT. else. - lv_extension = get_file_extension( I_negative_examples_CT ). + lv_extension = get_file_extension( I_NEGATIVE_EXAMPLES_CT ). lv_value = `form-data; name="negative_examples"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. endif. lv_index = lv_index + 1. clear ls_form_part. - ls_form_part-content_type = I_negative_examples_CT. + ls_form_part-content_type = I_NEGATIVE_EXAMPLES_CT. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_negative_examples. + ls_form_part-xdata = i_NEGATIVE_EXAMPLES. append ls_form_part to lt_form_part. endif. @@ -782,7 +921,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V3->LIST_CLASSIFIERS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_verbose TYPE BOOLEAN(optional) +* | [--->] I_VERBOSE TYPE BOOLEAN(optional) * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CLASSIFIERS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -808,8 +947,8 @@ method LIST_CLASSIFIERS. data: lv_queryparam type string. - if i_verbose is supplied. - lv_queryparam = i_verbose. + if i_VERBOSE is supplied. + lv_queryparam = i_VERBOSE. add_query_parameter( exporting i_parameter = `verbose` @@ -842,7 +981,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V3->GET_CLASSIFIER * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_classifier_id TYPE STRING +* | [--->] I_CLASSIFIER_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CLASSIFIER * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -857,7 +996,7 @@ method GET_CLASSIFIER. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v3/classifiers/{classifier_id}'. - replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_classifier_id ignoring case. + replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_CLASSIFIER_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -890,12 +1029,12 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V3->UPDATE_CLASSIFIER * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_classifier_id TYPE STRING -* | [--->] I_positive_examples TYPE TT_MAP_FILE(optional) -* | [--->] I_negative_examples TYPE FILE(optional) -* | [--->] I_negative_examples_filename TYPE STRING(optional) -* | [--->] I_positive_examples_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) -* | [--->] I_negative_examples_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) +* | [--->] I_CLASSIFIER_ID TYPE STRING +* | [--->] I_POSITIVE_EXAMPLES TYPE TT_MAP_FILE(optional) +* | [--->] I_NEGATIVE_EXAMPLES TYPE FILE(optional) +* | [--->] I_NEGATIVE_EXAMPLES_FILENAME TYPE STRING(optional) +* | [--->] I_POSITIVE_EXAMPLES_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) +* | [--->] I_NEGATIVE_EXAMPLES_CT TYPE STRING (default = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-all) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_CLASSIFIER @@ -911,7 +1050,7 @@ method UPDATE_CLASSIFIER. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v3/classifiers/{classifier_id}'. - replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_classifier_id ignoring case. + replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_CLASSIFIER_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -938,36 +1077,36 @@ method UPDATE_CLASSIFIER. - if not i_positive_examples is initial. - lv_extension = get_file_extension( I_positive_examples_CT ). + if not i_POSITIVE_EXAMPLES is initial. + lv_extension = get_file_extension( I_POSITIVE_EXAMPLES_CT ). field-symbols: - type line of TT_MAP_FILE. + type line of TT_MAP_FILE. find regex '(\{.*\})' in '{{classname}}_positive_examples' submatches lv_keypattern. - loop at i_positive_examples assigning . + loop at i_POSITIVE_EXAMPLES assigning . lv_base_name = '{{classname}}_positive_examples'. - replace lv_keypattern in lv_base_name with -key. + replace lv_keypattern in lv_base_name with -key. lv_value = `form-data; name="` && lv_base_name && `"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. lv_index = lv_index + 1. clear ls_form_part. - ls_form_part-content_type = I_positive_examples_CT. + ls_form_part-content_type = I_POSITIVE_EXAMPLES_CT. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = -data. + ls_form_part-xdata = -data. append ls_form_part to lt_form_part. endloop. endif. - if not i_negative_examples is initial. + if not i_NEGATIVE_EXAMPLES is initial. if not I_negative_examples_filename is initial. lv_value = `form-data; name="negative_examples"; filename="` && I_negative_examples_filename && `"` ##NO_TEXT. else. - lv_extension = get_file_extension( I_negative_examples_CT ). + lv_extension = get_file_extension( I_NEGATIVE_EXAMPLES_CT ). lv_value = `form-data; name="negative_examples"; filename="file` && lv_index && `.` && lv_extension && `"` ##NO_TEXT. endif. lv_index = lv_index + 1. clear ls_form_part. - ls_form_part-content_type = I_negative_examples_CT. + ls_form_part-content_type = I_NEGATIVE_EXAMPLES_CT. ls_form_part-content_disposition = lv_value. - ls_form_part-xdata = i_negative_examples. + ls_form_part-xdata = i_NEGATIVE_EXAMPLES. append ls_form_part to lt_form_part. endif. @@ -992,7 +1131,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V3->DELETE_CLASSIFIER * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_classifier_id TYPE STRING +* | [--->] I_CLASSIFIER_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -1006,7 +1145,7 @@ method DELETE_CLASSIFIER. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v3/classifiers/{classifier_id}'. - replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_classifier_id ignoring case. + replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_CLASSIFIER_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1032,7 +1171,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V3->GET_CORE_ML_MODEL * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_classifier_id TYPE STRING +* | [--->] I_CLASSIFIER_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/octet-stream') * | [<---] E_RESPONSE TYPE FILE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1047,7 +1186,7 @@ method GET_CORE_ML_MODEL. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v3/classifiers/{classifier_id}/core_ml_model'. - replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_classifier_id ignoring case. + replace all occurrences of `{classifier_id}` in ls_request_prop-url-path with i_CLASSIFIER_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1075,7 +1214,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V3->DELETE_USER_DATA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customer_id TYPE STRING +* | [--->] I_CUSTOMER_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -1100,7 +1239,7 @@ method DELETE_USER_DATA. data: lv_queryparam type string. - lv_queryparam = escape( val = i_customer_id format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_CUSTOMER_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `customer_id` diff --git a/src/zcl_ibmc_visual_recognition_v4.clas.abap b/src/zcl_ibmc_visual_recognition_v4.clas.abap index 9a4be29..5d4cfec 100644 --- a/src/zcl_ibmc_visual_recognition_v4.clas.abap +++ b/src/zcl_ibmc_visual_recognition_v4.clas.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019, 2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,13 +13,7 @@ * limitations under the License. "!

Visual Recognition v4

"! Provide images to the IBM Watson™ Visual Recognition service for analysis. -"! The service detects objects based on a set of images with training data. -"! -"! **Beta:** The Visual Recognition v4 API and Object Detection model are beta -"! features. For more information about beta features, see the [Release -"! notes](https://cloud.ibm.com/docs/services/visual-recognition?topic=visual-reco -"! gnition-release-notes#beta). -"! {: important}
+"! The service detects objects based on a set of images with training data.
class ZCL_IBMC_VISUAL_RECOGNITION_V4 DEFINITION public inheriting from ZCL_IBMC_SERVICE_EXT @@ -29,113 +23,191 @@ public section. types: "! Defines the location of the bounding box around the object. begin of T_LOCATION, + "! Y-position of top-left pixel of the bounding box. TOP type INTEGER, + "! X-position of top-left pixel of the bounding box. LEFT type INTEGER, + "! Width in pixels of of the bounding box. WIDTH type INTEGER, + "! Height in pixels of the bounding box. HEIGHT type INTEGER, end of T_LOCATION. types: "! Training status for the objects in the collection. begin of T_OBJECT_TRAINING_STATUS, + "! Whether you can analyze images in the collection with the **objects** feature. READY type BOOLEAN, + "! Whether training is in progress. IN_PROGRESS type BOOLEAN, + "! Whether there are changes to the training data since the most recent training. DATA_CHANGED type BOOLEAN, + "! Whether the most recent training failed. LATEST_FAILED type BOOLEAN, + "! Details about the training. If training is in progress, includes information + "! about the status. If training is not in progress, includes a success message or + "! information about why training failed. DESCRIPTION type STRING, end of T_OBJECT_TRAINING_STATUS. types: "! Training status information for the collection. begin of T_TRAINING_STATUS, + "! Training status for the objects in the collection. OBJECTS type T_OBJECT_TRAINING_STATUS, end of T_TRAINING_STATUS. + types: + "! Basic information about an object. + begin of T_OBJECT_METADATA, + "! The name of the object. + OBJECT type STRING, + "! Number of bounding boxes with this object name in the collection. + COUNT type INTEGER, + end of T_OBJECT_METADATA. types: "! The source type of the image. begin of T_IMAGE_SOURCE, + "! The source type of the image. TYPE type STRING, + "! Name of the image file if uploaded. Not returned when the image is passed by + "! URL. FILENAME type STRING, + "! Name of the .zip file of images if uploaded. Not returned when the image is + "! passed directly or by URL. ARCHIVE_FILENAME type STRING, + "! Source of the image before any redirects. Not returned when the image is + "! uploaded. SOURCE_URL type STRING, + "! Fully resolved URL of the image after redirects are followed. Not returned when + "! the image is uploaded. RESOLVED_URL type STRING, end of T_IMAGE_SOURCE. types: "! Details about the training data. begin of T_TRAINING_DATA_OBJECT, + "! The name of the object. OBJECT type STRING, + "! Defines the location of the bounding box around the object. LOCATION type T_LOCATION, end of T_TRAINING_DATA_OBJECT. types: "! Training data for all objects. begin of T_TRAINING_DATA_OBJECTS, + "! Training data for specific objects. OBJECTS type STANDARD TABLE OF T_TRAINING_DATA_OBJECT WITH NON-UNIQUE DEFAULT KEY, end of T_TRAINING_DATA_OBJECTS. types: "! Details about a collection. begin of T_COLLECTION, + "! The identifier of the collection. COLLECTION_ID type STRING, + "! The name of the collection. NAME type STRING, + "! The description of the collection. DESCRIPTION type STRING, + "! Date and time in Coordinated Universal Time (UTC) that the collection was + "! created. CREATED type DATETIME, + "! Date and time in Coordinated Universal Time (UTC) that the collection was most + "! recently updated. UPDATED type DATETIME, + "! Number of images in the collection. IMAGE_COUNT type INTEGER, + "! Training status information for the collection. TRAINING_STATUS type T_TRAINING_STATUS, end of T_COLLECTION. types: "! Height and width of an image. begin of T_IMAGE_DIMENSIONS, + "! Height in pixels of the image. HEIGHT type INTEGER, + "! Width in pixels of the image. WIDTH type INTEGER, end of T_IMAGE_DIMENSIONS. types: "! Details about the specific area of the problem. begin of T_ERROR_TARGET, + "! The parameter or property that is the focus of the problem. TYPE type STRING, + "! The property that is identified with the problem. NAME type STRING, end of T_ERROR_TARGET. types: "! Details about an error. begin of T_ERROR, + "! Identifier of the problem. CODE type STRING, + "! An explanation of the problem with possible solutions. MESSAGE type STRING, + "! A URL for more information about the solution. MORE_INFO type STRING, + "! Details about the specific area of the problem. TARGET type T_ERROR_TARGET, end of T_ERROR. types: "! A container for the list of request-level problems. begin of T_ERROR_RESPONSE, + "! A container for the problems in the request. ERRORS type STANDARD TABLE OF T_ERROR WITH NON-UNIQUE DEFAULT KEY, + "! A unique identifier of the request. TRACE type STRING, end of T_ERROR_RESPONSE. types: "! Details about an object and its location. begin of T_BASE_OBJECT, + "! The name of the object. The name can contain alphanumeric, underscore, hyphen, + "! space, and dot characters. It cannot begin with the reserved prefix `sys-`. OBJECT type STRING, + "! Defines the location of the bounding box around the object. LOCATION type T_LOCATION, end of T_BASE_OBJECT. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT, + "! The IDs of the collections to analyze. COLLECTION_IDS type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The features to analyze. FEATURES type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! An array of image files (.jpg or .png) or .zip files with images.
+ "! - Include a maximum of 20 images in a request.
+ "! - Limit the .zip file to 100 MB.
+ "! - Limit each image file to 10 MB.
+ "!
+ "! You can also include an image with the **image_url** parameter. IMAGES_FILE type STANDARD TABLE OF FILE WITH NON-UNIQUE DEFAULT KEY, + "! An array of URLs of image files (.jpg or .png).
+ "! - Include a maximum of 20 images in a request.
+ "! - Limit each image file to 10 MB.
+ "! - Minimum width and height is 30 pixels, but the service tends to perform better + "! with images that are at least 300 x 300 pixels. Maximum is 5400 pixels for + "! either height or width.
+ "!
+ "! You can also include images with the **images_file** parameter. IMAGE_URL type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! The minimum score a feature must have to be returned. THRESHOLD type FLOAT, end of T_INLINE_OBJECT. types: "! Details about an object in the collection. begin of T_OBJECT_DETAIL, + "! The label for the object. OBJECT type STRING, + "! Defines the location of the bounding box around the object. LOCATION type T_LOCATION, + "! Confidence score for the object in the range of 0 to 1. A higher score indicates + "! greater likelihood that the object is depicted at this location in the image. SCORE type FLOAT, end of T_OBJECT_DETAIL. types: "! The objects in a collection that are detected in an image. begin of T_COLLECTION_OBJECTS, + "! The identifier of the collection. COLLECTION_ID type STRING, + "! The identified objects in a collection. OBJECTS type STANDARD TABLE OF T_OBJECT_DETAIL WITH NON-UNIQUE DEFAULT KEY, end of T_COLLECTION_OBJECTS. types: "! Container for the list of collections that have objects detected in an image. begin of T_DETECTED_OBJECTS, + "! The collections with identified objects. COLLECTIONS type STANDARD TABLE OF T_COLLECTION_OBJECTS WITH NON-UNIQUE DEFAULT KEY, end of T_DETECTED_OBJECTS. types: @@ -144,31 +216,81 @@ public section. types: "! A container for the list of collections. begin of T_COLLECTIONS_LIST, + "! The collections in this service instance. COLLECTIONS type STANDARD TABLE OF T_COLLECTION WITH NON-UNIQUE DEFAULT KEY, end of T_COLLECTIONS_LIST. + types: + "! Details about the training event. + begin of T_TRAINING_EVENT, + "! Trained object type. Only `objects` is currently supported. + TYPE type STRING, + "! Identifier of the trained collection. + COLLECTION_ID type STRING, + "! Date and time in Coordinated Universal Time (UTC) that training on the + "! collection finished. + COMPLETION_TIME type DATETIME, + "! Training status of the training event. + STATUS type STRING, + "! The total number of images that were used in training for this training event. + IMAGE_COUNT type INTEGER, + end of T_TRAINING_EVENT. + types: + "! Details about the training events. + begin of T_TRAINING_EVENTS, + "! The starting day for the returned training events in Coordinated Universal Time + "! (UTC). If not specified in the request, it identifies the earliest training + "! event. + START_TIME type DATETIME, + "! The ending day for the returned training events in Coordinated Universal Time + "! (UTC). If not specified in the request, it lists the current time. + END_TIME type DATETIME, + "! The total number of training events in the response for the start and end times. + "! + COMPLETED_EVENTS type INTEGER, + "! The total number of images that were used in training for the start and end + "! times. + TRAINED_IMAGES type INTEGER, + "! The completed training events for the start and end time. + EVENTS type STANDARD TABLE OF T_TRAINING_EVENT WITH NON-UNIQUE DEFAULT KEY, + end of T_TRAINING_EVENTS. types: "! Details about an image. begin of T_IMAGE_DETAILS, + "! The identifier of the image. IMAGE_ID type STRING, + "! Date and time in Coordinated Universal Time (UTC) that the image was most + "! recently updated. UPDATED type DATETIME, + "! Date and time in Coordinated Universal Time (UTC) that the image was created. CREATED type DATETIME, + "! The source type of the image. SOURCE type T_IMAGE_SOURCE, + "! Height and width of an image. DIMENSIONS type T_IMAGE_DIMENSIONS, - ERRORS type T_ERROR, + "! No documentation available. + ERRORS type STANDARD TABLE OF T_ERROR WITH NON-UNIQUE DEFAULT KEY, + "! Training data for all objects. TRAINING_DATA type T_TRAINING_DATA_OBJECTS, end of T_IMAGE_DETAILS. types: "! Details about a problem. begin of T_WARNING, + "! Identifier of the problem. CODE type STRING, + "! An explanation of the problem with possible solutions. MESSAGE type STRING, + "! A URL for more information about the solution. MORE_INFO type STRING, end of T_WARNING. types: "! List of information about the images. begin of T_IMAGE_DETAILS_LIST, + "! The images in the collection. IMAGES type STANDARD TABLE OF T_IMAGE_DETAILS WITH NON-UNIQUE DEFAULT KEY, + "! Information about what might cause less than optimal output. WARNINGS type STANDARD TABLE OF T_WARNING WITH NON-UNIQUE DEFAULT KEY, + "! A unique identifier of the request. Included only when an error or warning is + "! returned. TRACE type STRING, end of T_IMAGE_DETAILS_LIST. types: @@ -177,63 +299,125 @@ public section. types: "! Basic information about an image. begin of T_IMAGE_SUMMARY, + "! The identifier of the image. IMAGE_ID type STRING, + "! Date and time in Coordinated Universal Time (UTC) that the image was most + "! recently updated. UPDATED type DATETIME, end of T_IMAGE_SUMMARY. types: "! Container for the training data. begin of T_BASE_TRAINING_DATA_OBJECTS, + "! Training data for specific objects. OBJECTS type STANDARD TABLE OF T_TRAINING_DATA_OBJECT WITH NON-UNIQUE DEFAULT KEY, end of T_BASE_TRAINING_DATA_OBJECTS. types: - "! + "! No documentation available. begin of T_INLINE_OBJECT1, + "! An array of image files (.jpg or .png) or .zip files with images.
+ "! - Include a maximum of 20 images in a request.
+ "! - Limit the .zip file to 100 MB.
+ "! - Limit each image file to 10 MB.
+ "!
+ "! You can also include an image with the **image_url** parameter. IMAGES_FILE type STANDARD TABLE OF FILE WITH NON-UNIQUE DEFAULT KEY, + "! The array of URLs of image files (.jpg or .png).
+ "! - Include a maximum of 20 images in a request.
+ "! - Limit each image file to 10 MB.
+ "! - Minimum width and height is 30 pixels, but the service tends to perform better + "! with images that are at least 300 x 300 pixels. Maximum is 5400 pixels for + "! either height or width.
+ "!
+ "! You can also include images with the **images_file** parameter. IMAGE_URL type STANDARD TABLE OF STRING WITH NON-UNIQUE DEFAULT KEY, + "! Training data for a single image. Include training data only if you add one + "! image with the request.
+ "!
+ "! The `object` property can contain alphanumeric, underscore, hyphen, space, and + "! dot characters. It cannot begin with the reserved prefix `sys-` and must be no + "! longer than 32 characters. TRAINING_DATA type STRING, end of T_INLINE_OBJECT1. types: "! List of images. begin of T_IMAGE_SUMMARY_LIST, + "! The images in the collection. IMAGES type STANDARD TABLE OF T_IMAGE_SUMMARY WITH NON-UNIQUE DEFAULT KEY, end of T_IMAGE_SUMMARY_LIST. types: "! Details about an image. begin of T_IMAGE, + "! The source type of the image. SOURCE type T_IMAGE_SOURCE, + "! Height and width of an image. DIMENSIONS type T_IMAGE_DIMENSIONS, + "! Container for the list of collections that have objects detected in an image. OBJECTS type T_DETECTED_OBJECTS, - ERRORS type T_ERROR, + "! A container for the problems in the request. + ERRORS type STANDARD TABLE OF T_ERROR WITH NON-UNIQUE DEFAULT KEY, end of T_IMAGE. types: "! Results for all images. begin of T_ANALYZE_RESPONSE, + "! Analyzed images. IMAGES type STANDARD TABLE OF T_IMAGE WITH NON-UNIQUE DEFAULT KEY, + "! Information about what might cause less than optimal output. WARNINGS type STANDARD TABLE OF T_WARNING WITH NON-UNIQUE DEFAULT KEY, + "! A unique identifier of the request. Included only when an error or warning is + "! returned. TRACE type STRING, end of T_ANALYZE_RESPONSE. types: "! Base details about a collection. begin of T_BASE_COLLECTION, + "! The identifier of the collection. COLLECTION_ID type STRING, + "! The name of the collection. The name can contain alphanumeric, underscore, + "! hyphen, and dot characters. It cannot begin with the reserved prefix `sys-`. NAME type STRING, + "! The description of the collection. DESCRIPTION type STRING, + "! Date and time in Coordinated Universal Time (UTC) that the collection was + "! created. CREATED type DATETIME, + "! Date and time in Coordinated Universal Time (UTC) that the collection was most + "! recently updated. UPDATED type DATETIME, + "! Number of images in the collection. IMAGE_COUNT type INTEGER, + "! Training status information for the collection. TRAINING_STATUS type T_TRAINING_STATUS, end of T_BASE_COLLECTION. + types: + "! Basic information about an updated object. + begin of T_UPDATE_OBJECT_METADATA, + "! The updated name of the object. The name can contain alphanumeric, underscore, + "! hyphen, space, and dot characters. It cannot begin with the reserved prefix + "! `sys-`. + OBJECT type STRING, + "! Number of bounding boxes in the collection with the updated object name. + COUNT type INTEGER, + end of T_UPDATE_OBJECT_METADATA. + types: + "! List of objects. + begin of T_OBJECT_METADATA_LIST, + "! Number of unique named objects in the collection. + OBJECT_COUNT type INTEGER, + "! The objects in the collection. + OBJECTS type STANDARD TABLE OF T_OBJECT_METADATA WITH NON-UNIQUE DEFAULT KEY, + end of T_OBJECT_METADATA_LIST. constants: begin of C_REQUIRED_FIELDS, T_LOCATION type string value '|TOP|LEFT|WIDTH|HEIGHT|', T_OBJECT_TRAINING_STATUS type string value '|READY|IN_PROGRESS|DATA_CHANGED|LATEST_FAILED|DESCRIPTION|', T_TRAINING_STATUS type string value '|OBJECTS|', + T_OBJECT_METADATA type string value '|', T_IMAGE_SOURCE type string value '|TYPE|', T_TRAINING_DATA_OBJECT type string value '|', - T_TRAINING_DATA_OBJECTS type string value '|OBJECTS|', + T_TRAINING_DATA_OBJECTS type string value '|', T_COLLECTION type string value '|COLLECTION_ID|NAME|DESCRIPTION|CREATED|UPDATED|IMAGE_COUNT|TRAINING_STATUS|', - T_IMAGE_DIMENSIONS type string value '|HEIGHT|WIDTH|', + T_IMAGE_DIMENSIONS type string value '|', T_ERROR_TARGET type string value '|TYPE|NAME|', T_ERROR type string value '|CODE|MESSAGE|', T_ERROR_RESPONSE type string value '|ERRORS|TRACE|', @@ -243,7 +427,9 @@ constants: T_COLLECTION_OBJECTS type string value '|COLLECTION_ID|OBJECTS|', T_DETECTED_OBJECTS type string value '|', T_COLLECTIONS_LIST type string value '|COLLECTIONS|', - T_IMAGE_DETAILS type string value '|IMAGE_ID|UPDATED|CREATED|SOURCE|DIMENSIONS|TRAINING_DATA|', + T_TRAINING_EVENT type string value '|', + T_TRAINING_EVENTS type string value '|', + T_IMAGE_DETAILS type string value '|SOURCE|', T_WARNING type string value '|CODE|MESSAGE|', T_IMAGE_DETAILS_LIST type string value '|', T_IMAGE_SUMMARY type string value '|', @@ -253,6 +439,8 @@ constants: T_IMAGE type string value '|SOURCE|DIMENSIONS|OBJECTS|', T_ANALYZE_RESPONSE type string value '|IMAGES|', T_BASE_COLLECTION type string value '|', + T_UPDATE_OBJECT_METADATA type string value '|', + T_OBJECT_METADATA_LIST type string value '|OBJECT_COUNT|', __DUMMY type string value SPACE, end of C_REQUIRED_FIELDS . @@ -275,7 +463,17 @@ constants: IMAGE_COUNT type string value 'image_count', TRAINING_STATUS type string value 'training_status', COLLECTIONS type string value 'collections', + START_TIME type string value 'start_time', + END_TIME type string value 'end_time', + COMPLETED_EVENTS type string value 'completed_events', + TRAINED_IMAGES type string value 'trained_images', + EVENTS type string value 'events', + COMPLETION_TIME type string value 'completion_time', + STATUS type string value 'status', OBJECTS type string value 'objects', + OBJECT_COUNT type string value 'object_count', + OBJECT type string value 'object', + COUNT type string value 'count', READY type string value 'ready', IN_PROGRESS type string value 'in_progress', DATA_CHANGED type string value 'data_changed', @@ -286,7 +484,6 @@ constants: TRAINING_DATA type string value 'training_data', HEIGHT type string value 'height', WIDTH type string value 'width', - OBJECT type string value 'object', LOCATION type string value 'location', FILENAME type string value 'filename', ARCHIVE_FILENAME type string value 'archive_filename', @@ -316,38 +513,39 @@ constants: "! Analyze images. "! - "! @parameter I_collection_ids | + "! @parameter I_COLLECTION_IDS | "! The IDs of the collections to analyze. - "! @parameter I_features | + "! @parameter I_FEATURES | "! The features to analyze. - "! @parameter I_images_file | - "! An array of image files (.jpg or .png) or .zip files with images. - "! - Include a maximum of 20 images in a request. - "! - Limit the .zip file to 100 MB. - "! - Limit each image file to 10 MB. - "! + "! @parameter I_IMAGES_FILE | + "! An array of image files (.jpg or .png) or .zip files with images.
+ "! - Include a maximum of 20 images in a request.
+ "! - Limit the .zip file to 100 MB.
+ "! - Limit each image file to 10 MB.
+ "!
"! You can also include an image with the **image_url** parameter. - "! @parameter I_image_url | - "! An array of URLs of image files (.jpg or .png). - "! - Include a maximum of 20 images in a request. - "! - Limit each image file to 10 MB. + "! @parameter I_IMAGE_URL | + "! An array of URLs of image files (.jpg or .png).
+ "! - Include a maximum of 20 images in a request.
+ "! - Limit each image file to 10 MB.
"! - Minimum width and height is 30 pixels, but the service tends to perform better "! with images that are at least 300 x 300 pixels. Maximum is 5400 pixels for - "! either height or width. - "! + "! either height or width.
+ "!
"! You can also include images with the **images_file** parameter. - "! @parameter I_threshold | + "! @parameter I_THRESHOLD | "! The minimum score a feature must have to be returned. "! @parameter E_RESPONSE | "! Service return value of type T_ANALYZE_RESPONSE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ANALYZE importing - !I_collection_ids type TT_STRING - !I_features type TT_STRING - !I_images_file type TT_FILE_WITH_METADATA optional - !I_image_url type TT_STRING optional - !I_threshold type FLOAT optional + !I_COLLECTION_IDS type TT_STRING + !I_FEATURES type TT_STRING + !I_IMAGES_FILE type TT_FILE_WITH_METADATA optional + !I_IMAGE_URL type TT_STRING optional + !I_THRESHOLD type FLOAT optional !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -357,14 +555,15 @@ constants: "! Create a collection. "! - "! @parameter I_collection_info | + "! @parameter I_COLLECTION_INFO | "! The new collection. "! @parameter E_RESPONSE | "! Service return value of type T_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods CREATE_COLLECTION importing - !I_collection_info type T_BASE_COLLECTION + !I_COLLECTION_INFO type T_BASE_COLLECTION !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -375,6 +574,7 @@ constants: "! "! @parameter E_RESPONSE | "! Service return value of type T_COLLECTIONS_LIST + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_COLLECTIONS importing @@ -385,14 +585,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get collection details. "! - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The identifier of the collection. "! @parameter E_RESPONSE | "! Service return value of type T_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_COLLECTION importing - !I_collection_id type STRING + !I_COLLECTION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_COLLECTION @@ -400,17 +601,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Update a collection. "! - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The identifier of the collection. - "! @parameter I_collection_info | + "! @parameter I_COLLECTION_INFO | "! The updated collection. "! @parameter E_RESPONSE | "! Service return value of type T_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods UPDATE_COLLECTION importing - !I_collection_id type STRING - !I_collection_info type T_BASE_COLLECTION optional + !I_COLLECTION_ID type STRING + !I_COLLECTION_INFO type T_BASE_COLLECTION optional !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting @@ -419,52 +621,54 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete a collection. "! - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The identifier of the collection. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_COLLECTION importing - !I_collection_id type STRING + !I_COLLECTION_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Add images. "! - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The identifier of the collection. - "! @parameter I_images_file | - "! An array of image files (.jpg or .png) or .zip files with images. - "! - Include a maximum of 20 images in a request. - "! - Limit the .zip file to 100 MB. - "! - Limit each image file to 10 MB. - "! + "! @parameter I_IMAGES_FILE | + "! An array of image files (.jpg or .png) or .zip files with images.
+ "! - Include a maximum of 20 images in a request.
+ "! - Limit the .zip file to 100 MB.
+ "! - Limit each image file to 10 MB.
+ "!
"! You can also include an image with the **image_url** parameter. - "! @parameter I_image_url | - "! The array of URLs of image files (.jpg or .png). - "! - Include a maximum of 20 images in a request. - "! - Limit each image file to 10 MB. + "! @parameter I_IMAGE_URL | + "! The array of URLs of image files (.jpg or .png).
+ "! - Include a maximum of 20 images in a request.
+ "! - Limit each image file to 10 MB.
"! - Minimum width and height is 30 pixels, but the service tends to perform better "! with images that are at least 300 x 300 pixels. Maximum is 5400 pixels for - "! either height or width. - "! + "! either height or width.
+ "!
"! You can also include images with the **images_file** parameter. - "! @parameter I_training_data | + "! @parameter I_TRAINING_DATA | "! Training data for a single image. Include training data only if you add one - "! image with the request. - "! + "! image with the request.
+ "!
"! The `object` property can contain alphanumeric, underscore, hyphen, space, and "! dot characters. It cannot begin with the reserved prefix `sys-` and must be no "! longer than 32 characters. "! @parameter E_RESPONSE | "! Service return value of type T_IMAGE_DETAILS_LIST + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ADD_IMAGES importing - !I_collection_id type STRING - !I_images_file type TT_FILE_WITH_METADATA optional - !I_image_url type TT_STRING optional - !I_training_data type STRING optional + !I_COLLECTION_ID type STRING + !I_IMAGES_FILE type TT_FILE_WITH_METADATA optional + !I_IMAGE_URL type TT_STRING optional + !I_TRAINING_DATA type STRING optional !I_contenttype type string default 'multipart/form-data' !I_accept type string default 'application/json' exporting @@ -473,14 +677,15 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! List images. "! - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The identifier of the collection. "! @parameter E_RESPONSE | "! Service return value of type T_IMAGE_SUMMARY_LIST + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods LIST_IMAGES importing - !I_collection_id type STRING + !I_COLLECTION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_IMAGE_SUMMARY_LIST @@ -488,17 +693,18 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Get image details. "! - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The identifier of the collection. - "! @parameter I_image_id | + "! @parameter I_IMAGE_ID | "! The identifier of the image. "! @parameter E_RESPONSE | "! Service return value of type T_IMAGE_DETAILS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_IMAGE_DETAILS importing - !I_collection_id type STRING - !I_image_id type STRING + !I_COLLECTION_ID type STRING + !I_IMAGE_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_IMAGE_DETAILS @@ -506,50 +712,129 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Delete an image. "! - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The identifier of the collection. - "! @parameter I_image_id | + "! @parameter I_IMAGE_ID | "! The identifier of the image. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_IMAGE importing - !I_collection_id type STRING - !I_image_id type STRING + !I_COLLECTION_ID type STRING + !I_IMAGE_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . "! Get a JPEG file of an image. "! - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The identifier of the collection. - "! @parameter I_image_id | + "! @parameter I_IMAGE_ID | "! The identifier of the image. - "! @parameter I_size | - "! Specify the image size. + "! @parameter I_SIZE | + "! The image size. Specify `thumbnail` to return a version that maintains the + "! original aspect ratio but is no larger than 200 pixels in the larger dimension. + "! For example, an original 800 x 1000 image is resized to 160 x 200 pixels. "! @parameter E_RESPONSE | "! Service return value of type FILE + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods GET_JPEG_IMAGE importing - !I_collection_id type STRING - !I_image_id type STRING - !I_size type STRING default 'full' + !I_COLLECTION_ID type STRING + !I_IMAGE_ID type STRING + !I_SIZE type STRING default 'full' !I_accept type string default 'image/jpeg' exporting !E_RESPONSE type FILE raising ZCX_IBMC_SERVICE_EXCEPTION . + "! List object metadata. + "! + "! @parameter I_COLLECTION_ID | + "! The identifier of the collection. + "! @parameter E_RESPONSE | + "! Service return value of type T_OBJECT_METADATA_LIST + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + methods LIST_OBJECT_METADATA + importing + !I_COLLECTION_ID type STRING + !I_accept type string default 'application/json' + exporting + !E_RESPONSE type T_OBJECT_METADATA_LIST + raising + ZCX_IBMC_SERVICE_EXCEPTION . + "! Update an object name. + "! + "! @parameter I_COLLECTION_ID | + "! The identifier of the collection. + "! @parameter I_OBJECT | + "! The name of the object. + "! @parameter I_UPDATEOBJECTMETADATA | + "! No documentation available. + "! @parameter E_RESPONSE | + "! Service return value of type T_UPDATE_OBJECT_METADATA + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + methods UPDATE_OBJECT_METADATA + importing + !I_COLLECTION_ID type STRING + !I_OBJECT type STRING + !I_UPDATEOBJECTMETADATA type T_UPDATE_OBJECT_METADATA optional + !I_contenttype type string default 'application/json' + !I_accept type string default 'application/json' + exporting + !E_RESPONSE type T_UPDATE_OBJECT_METADATA + raising + ZCX_IBMC_SERVICE_EXCEPTION . + "! Get object metadata. + "! + "! @parameter I_COLLECTION_ID | + "! The identifier of the collection. + "! @parameter I_OBJECT | + "! The name of the object. + "! @parameter E_RESPONSE | + "! Service return value of type T_OBJECT_METADATA + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + methods GET_OBJECT_METADATA + importing + !I_COLLECTION_ID type STRING + !I_OBJECT type STRING + !I_accept type string default 'application/json' + exporting + !E_RESPONSE type T_OBJECT_METADATA + raising + ZCX_IBMC_SERVICE_EXCEPTION . + "! Delete an object. + "! + "! @parameter I_COLLECTION_ID | + "! The identifier of the collection. + "! @parameter I_OBJECT | + "! The name of the object. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + methods DELETE_OBJECT + importing + !I_COLLECTION_ID type STRING + !I_OBJECT type STRING + !I_accept type string default 'application/json' + raising + ZCX_IBMC_SERVICE_EXCEPTION . + "! Train a collection. "! - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The identifier of the collection. "! @parameter E_RESPONSE | "! Service return value of type T_COLLECTION + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods TRAIN importing - !I_collection_id type STRING + !I_COLLECTION_ID type STRING !I_accept type string default 'application/json' exporting !E_RESPONSE type T_COLLECTION @@ -557,35 +842,60 @@ constants: ZCX_IBMC_SERVICE_EXCEPTION . "! Add training data to an image. "! - "! @parameter I_collection_id | + "! @parameter I_COLLECTION_ID | "! The identifier of the collection. - "! @parameter I_image_id | + "! @parameter I_IMAGE_ID | "! The identifier of the image. - "! @parameter I_training_data | + "! @parameter I_TRAINING_DATA | "! Training data. Elements in the request replace the existing elements. "! @parameter E_RESPONSE | "! Service return value of type T_TRAINING_DATA_OBJECTS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods ADD_IMAGE_TRAINING_DATA importing - !I_collection_id type STRING - !I_image_id type STRING - !I_training_data type T_BASE_TRAINING_DATA_OBJECTS + !I_COLLECTION_ID type STRING + !I_IMAGE_ID type STRING + !I_TRAINING_DATA type T_BASE_TRAINING_DATA_OBJECTS !I_contenttype type string default 'application/json' !I_accept type string default 'application/json' exporting !E_RESPONSE type T_TRAINING_DATA_OBJECTS raising ZCX_IBMC_SERVICE_EXCEPTION . + "! Get training usage. + "! + "! @parameter I_START_TIME | + "! The earliest day to include training events. Specify dates in YYYY-MM-DD format. + "! If empty or not specified, the earliest training event is included. + "! @parameter I_END_TIME | + "! The most recent day to include training events. Specify dates in YYYY-MM-DD + "! format. All events for the day are included. If empty or not specified, the + "! current day is used. Specify the same value as `start_time` to request events + "! for a single day. + "! @parameter E_RESPONSE | + "! Service return value of type T_TRAINING_EVENTS + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. + "! + methods GET_TRAINING_USAGE + importing + !I_START_TIME type STRING optional + !I_END_TIME type STRING optional + !I_accept type string default 'application/json' + exporting + !E_RESPONSE type T_TRAINING_EVENTS + raising + ZCX_IBMC_SERVICE_EXCEPTION . "! Delete labeled data. "! - "! @parameter I_customer_id | + "! @parameter I_CUSTOMER_ID | "! The customer ID for which all data is to be deleted. + "! @raising ZCX_IBMC_SERVICE_EXCEPTION | Exception being raised in case of an error. "! methods DELETE_USER_DATA importing - !I_customer_id type STRING + !I_CUSTOMER_ID type STRING !I_accept type string default 'application/json' raising ZCX_IBMC_SERVICE_EXCEPTION . @@ -626,7 +936,7 @@ method GET_REQUEST_PROP. data: lv_auth_method type string ##NEEDED. - e_request_prop = super->get_request_prop( ). + e_request_prop = super->get_request_prop( i_auth_method = i_auth_method ). lv_auth_method = i_auth_method. if lv_auth_method eq c_default. @@ -658,7 +968,7 @@ endmethod. * +--------------------------------------------------------------------------------------
method get_sdk_version_date. - e_sdk_version_date = '20191002122856'. + e_sdk_version_date = '20200210092831'. endmethod. @@ -667,11 +977,11 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->ANALYZE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_collection_ids TYPE TT_STRING -* | [--->] I_features TYPE TT_STRING -* | [--->] I_images_file TYPE TT_FILE_WITH_METADATA(optional) -* | [--->] I_image_url TYPE TT_STRING(optional) -* | [--->] I_threshold TYPE FLOAT(optional) +* | [--->] I_COLLECTION_IDS TYPE TT_STRING +* | [--->] I_FEATURES TYPE TT_STRING +* | [--->] I_IMAGES_FILE TYPE TT_FILE_WITH_METADATA(optional) +* | [--->] I_IMAGE_URL TYPE TT_STRING(optional) +* | [--->] I_THRESHOLD TYPE FLOAT(optional) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_ANALYZE_RESPONSE @@ -711,67 +1021,67 @@ method ANALYZE. lv_extension type string ##NEEDED. - if not i_collection_ids is initial. + if not i_COLLECTION_IDS is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="collection_ids"' ##NO_TEXT. field-symbols: - like line of i_collection_ids. - loop at i_collection_ids assigning . - ls_form_part-cdata = . + like line of i_COLLECTION_IDS. + loop at i_COLLECTION_IDS assigning . + ls_form_part-cdata = . append ls_form_part to lt_form_part. endloop. endif. - if not i_features is initial. + if not i_FEATURES is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="features"' ##NO_TEXT. field-symbols: - like line of i_features. - loop at i_features assigning . - ls_form_part-cdata = . + like line of i_FEATURES. + loop at i_FEATURES assigning . + ls_form_part-cdata = . append ls_form_part to lt_form_part. endloop. endif. - if not i_image_url is initial. + if not i_IMAGE_URL is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="image_url"' ##NO_TEXT. field-symbols: - like line of i_image_url. - loop at i_image_url assigning . - ls_form_part-cdata = . + like line of i_IMAGE_URL. + loop at i_IMAGE_URL assigning . + ls_form_part-cdata = . append ls_form_part to lt_form_part. endloop. endif. - if not i_threshold is initial. + if not i_THRESHOLD is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="threshold"' ##NO_TEXT. - lv_formdata = i_threshold. + lv_formdata = i_THRESHOLD. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_images_file is initial. + if not i_IMAGES_FILE is initial. data: lv_filename type string, lv_content_type type string. field-symbols: - like line of i_images_file. - loop at i_images_file assigning . - if not -content_type is initial. - lv_content_type = -content_type. + like line of i_IMAGES_FILE. + loop at i_IMAGES_FILE assigning . + if not -content_type is initial. + lv_content_type = -content_type. else. lv_content_type = 'application/octet-stream' ##NO_TEXT. endif. - if not -filename is initial. - lv_filename = -filename. + if not -filename is initial. + lv_filename = -filename. else. lv_extension = get_file_extension( lv_content_type ). lv_filename = `file` && lv_index && `.` && lv_extension ##NO_TEXT. @@ -780,7 +1090,7 @@ method ANALYZE. clear ls_form_part. ls_form_part-content_type = lv_content_type. ls_form_part-content_disposition = `form-data; name="images_file"; filename="` && lv_filename && `"` ##NO_TEXT. - ls_form_part-xdata = -data. + ls_form_part-xdata = -data. append ls_form_part to lt_form_part. endloop. endif. @@ -807,7 +1117,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->CREATE_COLLECTION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_collection_info TYPE T_BASE_COLLECTION +* | [--->] I_COLLECTION_INFO TYPE T_BASE_COLLECTION * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COLLECTION @@ -844,20 +1154,20 @@ method CREATE_COLLECTION. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_collection_info ). + lv_datatype = get_datatype( i_COLLECTION_INFO ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_collection_info i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_COLLECTION_INFO i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'collection_info' i_value = i_collection_info ). + lv_bodyparam = abap_to_json( i_name = 'collection_info' i_value = i_COLLECTION_INFO ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_collection_info to . + assign i_COLLECTION_INFO to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -937,7 +1247,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->GET_COLLECTION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_collection_id TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -952,7 +1262,7 @@ method GET_COLLECTION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v4/collections/{collection_id}'. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -985,8 +1295,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->UPDATE_COLLECTION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_collection_id TYPE STRING -* | [--->] I_collection_info TYPE T_BASE_COLLECTION(optional) +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_COLLECTION_INFO TYPE T_BASE_COLLECTION(optional) * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COLLECTION @@ -1002,7 +1312,7 @@ method UPDATE_COLLECTION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v4/collections/{collection_id}'. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -1024,21 +1334,21 @@ method UPDATE_COLLECTION. field-symbols: type any. lv_separator = ''. - if not i_collection_info is initial. - lv_datatype = get_datatype( i_collection_info ). + if not i_COLLECTION_INFO is initial. + lv_datatype = get_datatype( i_COLLECTION_INFO ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_collection_info i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_COLLECTION_INFO i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'collection_info' i_value = i_collection_info ). + lv_bodyparam = abap_to_json( i_name = 'collection_info' i_value = i_COLLECTION_INFO ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_collection_info to . + assign i_COLLECTION_INFO to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -1073,7 +1383,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->DELETE_COLLECTION * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_collection_id TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -1087,7 +1397,7 @@ method DELETE_COLLECTION. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v4/collections/{collection_id}'. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1113,10 +1423,10 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->ADD_IMAGES * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_collection_id TYPE STRING -* | [--->] I_images_file TYPE TT_FILE_WITH_METADATA(optional) -* | [--->] I_image_url TYPE TT_STRING(optional) -* | [--->] I_training_data TYPE STRING(optional) +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_IMAGES_FILE TYPE TT_FILE_WITH_METADATA(optional) +* | [--->] I_IMAGE_URL TYPE TT_STRING(optional) +* | [--->] I_TRAINING_DATA TYPE STRING(optional) * | [--->] I_contenttype TYPE string (default ='multipart/form-data') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_IMAGE_DETAILS_LIST @@ -1132,7 +1442,7 @@ method ADD_IMAGES. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v4/collections/{collection_id}/images'. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -1157,43 +1467,43 @@ method ADD_IMAGES. lv_extension type string ##NEEDED. - if not i_image_url is initial. + if not i_IMAGE_URL is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="image_url"' ##NO_TEXT. field-symbols: - like line of i_image_url. - loop at i_image_url assigning . - ls_form_part-cdata = . + like line of i_IMAGE_URL. + loop at i_IMAGE_URL assigning . + ls_form_part-cdata = . append ls_form_part to lt_form_part. endloop. endif. - if not i_training_data is initial. + if not i_TRAINING_DATA is initial. clear ls_form_part. ls_form_part-content_type = ZIF_IBMC_SERVICE_ARCH~C_MEDIATYPE-TEXT_PLAIN. ls_form_part-content_disposition = 'form-data; name="training_data"' ##NO_TEXT. - lv_formdata = i_training_data. + lv_formdata = i_TRAINING_DATA. ls_form_part-cdata = lv_formdata. append ls_form_part to lt_form_part. endif. - if not i_images_file is initial. + if not i_IMAGES_FILE is initial. data: lv_filename type string, lv_content_type type string. field-symbols: - like line of i_images_file. - loop at i_images_file assigning . - if not -content_type is initial. - lv_content_type = -content_type. + like line of i_IMAGES_FILE. + loop at i_IMAGES_FILE assigning . + if not -content_type is initial. + lv_content_type = -content_type. else. lv_content_type = 'application/octet-stream' ##NO_TEXT. endif. - if not -filename is initial. - lv_filename = -filename. + if not -filename is initial. + lv_filename = -filename. else. lv_extension = get_file_extension( lv_content_type ). lv_filename = `file` && lv_index && `.` && lv_extension ##NO_TEXT. @@ -1202,7 +1512,7 @@ method ADD_IMAGES. clear ls_form_part. ls_form_part-content_type = lv_content_type. ls_form_part-content_disposition = `form-data; name="images_file"; filename="` && lv_filename && `"` ##NO_TEXT. - ls_form_part-xdata = -data. + ls_form_part-xdata = -data. append ls_form_part to lt_form_part. endloop. endif. @@ -1228,7 +1538,7 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->LIST_IMAGES * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_collection_id TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_IMAGE_SUMMARY_LIST * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1243,7 +1553,7 @@ method LIST_IMAGES. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v4/collections/{collection_id}/images'. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1276,8 +1586,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->GET_IMAGE_DETAILS * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_collection_id TYPE STRING -* | [--->] I_image_id TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_IMAGE_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_IMAGE_DETAILS * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1292,8 +1602,8 @@ method GET_IMAGE_DETAILS. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v4/collections/{collection_id}/images/{image_id}'. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{image_id}` in ls_request_prop-url-path with i_image_id ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{image_id}` in ls_request_prop-url-path with i_IMAGE_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1326,8 +1636,8 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->DELETE_IMAGE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_collection_id TYPE STRING -* | [--->] I_image_id TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_IMAGE_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -1341,8 +1651,8 @@ method DELETE_IMAGE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v4/collections/{collection_id}/images/{image_id}'. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{image_id}` in ls_request_prop-url-path with i_image_id ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{image_id}` in ls_request_prop-url-path with i_IMAGE_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1367,9 +1677,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->GET_JPEG_IMAGE * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_collection_id TYPE STRING -* | [--->] I_image_id TYPE STRING -* | [--->] I_size TYPE STRING (default ='full') +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_IMAGE_ID TYPE STRING +* | [--->] I_SIZE TYPE STRING (default ='full') * | [--->] I_accept TYPE string (default ='image/jpeg') * | [<---] E_RESPONSE TYPE FILE * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1384,8 +1694,8 @@ method GET_JPEG_IMAGE. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v4/collections/{collection_id}/images/{image_id}/jpeg'. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{image_id}` in ls_request_prop-url-path with i_image_id ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{image_id}` in ls_request_prop-url-path with i_IMAGE_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1397,8 +1707,8 @@ method GET_JPEG_IMAGE. data: lv_queryparam type string. - if i_size is supplied. - lv_queryparam = escape( val = i_size format = cl_abap_format=>e_uri_full ). + if i_SIZE is supplied. + lv_queryparam = escape( val = i_SIZE format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `size` @@ -1422,10 +1732,240 @@ method GET_JPEG_IMAGE. endmethod. +* ---------------------------------------------------------------------------------------+ +* | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->LIST_OBJECT_METADATA +* +-------------------------------------------------------------------------------------------------+ +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_accept TYPE string (default ='application/json') +* | [<---] E_RESPONSE TYPE T_OBJECT_METADATA_LIST +* | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION +* +-------------------------------------------------------------------------------------- +method LIST_OBJECT_METADATA. + + data: + ls_request_prop type ts_request_prop, + lv_separator(1) type c ##NEEDED, + lv_sep(1) type c ##NEEDED, + lo_response type to_rest_response, + lv_json type string ##NEEDED. + + ls_request_prop-url-path = '/v4/collections/{collection_id}/objects'. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + + " standard headers + ls_request_prop-header_accept = I_accept. + set_default_query_parameters( + changing + c_url = ls_request_prop-url ). + + + + + + + + + " execute HTTP GET request + lo_response = HTTP_GET( i_request_prop = ls_request_prop ). + + + " retrieve JSON data + lv_json = get_response_string( lo_response ). + parse_json( + exporting + i_json = lv_json + i_dictionary = c_abapname_dictionary + changing + c_abap = e_response ). + +endmethod. + +* ---------------------------------------------------------------------------------------+ +* | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->UPDATE_OBJECT_METADATA +* +-------------------------------------------------------------------------------------------------+ +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_OBJECT TYPE STRING +* | [--->] I_UPDATEOBJECTMETADATA TYPE T_UPDATE_OBJECT_METADATA(optional) +* | [--->] I_contenttype TYPE string (default ='application/json') +* | [--->] I_accept TYPE string (default ='application/json') +* | [<---] E_RESPONSE TYPE T_UPDATE_OBJECT_METADATA +* | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION +* +-------------------------------------------------------------------------------------- +method UPDATE_OBJECT_METADATA. + + data: + ls_request_prop type ts_request_prop, + lv_separator(1) type c ##NEEDED, + lv_sep(1) type c ##NEEDED, + lo_response type to_rest_response, + lv_json type string ##NEEDED. + + ls_request_prop-url-path = '/v4/collections/{collection_id}/objects/{object}'. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{object}` in ls_request_prop-url-path with i_OBJECT ignoring case. + + " standard headers + ls_request_prop-header_content_type = I_contenttype. + ls_request_prop-header_accept = I_accept. + set_default_query_parameters( + changing + c_url = ls_request_prop-url ). + + + + + + + " process body parameters + data: + lv_body type string, + lv_bodyparam type string, + lv_datatype type char. + field-symbols: + type any. + lv_separator = ''. + if not i_UPDATEOBJECTMETADATA is initial. + lv_datatype = get_datatype( i_UPDATEOBJECTMETADATA ). + + if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or + lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or + ls_request_prop-header_content_type cp '*json*'. + if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or + lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. + lv_bodyparam = abap_to_json( i_value = i_UPDATEOBJECTMETADATA i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + else. + lv_bodyparam = abap_to_json( i_name = 'UpdateObjectMetadata' i_value = i_UPDATEOBJECTMETADATA ). + endif. + lv_body = lv_body && lv_separator && lv_bodyparam. + else. + assign i_UPDATEOBJECTMETADATA to . + lv_bodyparam = . + concatenate lv_body lv_bodyparam into lv_body. + endif. + endif. + if ls_request_prop-header_content_type cp '*json*' and lv_body(1) ne '{'. + lv_body = `{` && lv_body && `}`. + endif. + + if ls_request_prop-header_content_type cp '*charset=utf-8*'. + ls_request_prop-body_bin = convert_string_to_utf8( i_string = lv_body ). + replace all occurrences of regex ';\s*charset=utf-8' in ls_request_prop-header_content_type with '' ignoring case. + else. + ls_request_prop-body = lv_body. + endif. + + + " execute HTTP POST request + lo_response = HTTP_POST( i_request_prop = ls_request_prop ). + + + " retrieve JSON data + lv_json = get_response_string( lo_response ). + parse_json( + exporting + i_json = lv_json + i_dictionary = c_abapname_dictionary + changing + c_abap = e_response ). + +endmethod. + +* ---------------------------------------------------------------------------------------+ +* | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->GET_OBJECT_METADATA +* +-------------------------------------------------------------------------------------------------+ +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_OBJECT TYPE STRING +* | [--->] I_accept TYPE string (default ='application/json') +* | [<---] E_RESPONSE TYPE T_OBJECT_METADATA +* | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION +* +-------------------------------------------------------------------------------------- +method GET_OBJECT_METADATA. + + data: + ls_request_prop type ts_request_prop, + lv_separator(1) type c ##NEEDED, + lv_sep(1) type c ##NEEDED, + lo_response type to_rest_response, + lv_json type string ##NEEDED. + + ls_request_prop-url-path = '/v4/collections/{collection_id}/objects/{object}'. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{object}` in ls_request_prop-url-path with i_OBJECT ignoring case. + + " standard headers + ls_request_prop-header_accept = I_accept. + set_default_query_parameters( + changing + c_url = ls_request_prop-url ). + + + + + + + + + " execute HTTP GET request + lo_response = HTTP_GET( i_request_prop = ls_request_prop ). + + + " retrieve JSON data + lv_json = get_response_string( lo_response ). + parse_json( + exporting + i_json = lv_json + i_dictionary = c_abapname_dictionary + changing + c_abap = e_response ). + +endmethod. + +* ---------------------------------------------------------------------------------------+ +* | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->DELETE_OBJECT +* +-------------------------------------------------------------------------------------------------+ +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_OBJECT TYPE STRING +* | [--->] I_accept TYPE string (default ='application/json') +* | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION +* +-------------------------------------------------------------------------------------- +method DELETE_OBJECT. + + data: + ls_request_prop type ts_request_prop, + lv_separator(1) type c ##NEEDED, + lv_sep(1) type c ##NEEDED, + lo_response type to_rest_response, + lv_json type string ##NEEDED. + + ls_request_prop-url-path = '/v4/collections/{collection_id}/objects/{object}'. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{object}` in ls_request_prop-url-path with i_OBJECT ignoring case. + + " standard headers + ls_request_prop-header_accept = I_accept. + set_default_query_parameters( + changing + c_url = ls_request_prop-url ). + + + + + + + + + " execute HTTP DELETE request + lo_response = HTTP_DELETE( i_request_prop = ls_request_prop ). + + + +endmethod. + + * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->TRAIN * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_collection_id TYPE STRING +* | [--->] I_COLLECTION_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_COLLECTION * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION @@ -1440,7 +1980,7 @@ method TRAIN. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v4/collections/{collection_id}/train'. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. " standard headers ls_request_prop-header_accept = I_accept. @@ -1473,9 +2013,9 @@ endmethod. * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->ADD_IMAGE_TRAINING_DATA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_collection_id TYPE STRING -* | [--->] I_image_id TYPE STRING -* | [--->] I_training_data TYPE T_BASE_TRAINING_DATA_OBJECTS +* | [--->] I_COLLECTION_ID TYPE STRING +* | [--->] I_IMAGE_ID TYPE STRING +* | [--->] I_TRAINING_DATA TYPE T_BASE_TRAINING_DATA_OBJECTS * | [--->] I_contenttype TYPE string (default ='application/json') * | [--->] I_accept TYPE string (default ='application/json') * | [<---] E_RESPONSE TYPE T_TRAINING_DATA_OBJECTS @@ -1491,8 +2031,8 @@ method ADD_IMAGE_TRAINING_DATA. lv_json type string ##NEEDED. ls_request_prop-url-path = '/v4/collections/{collection_id}/images/{image_id}/training_data'. - replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_collection_id ignoring case. - replace all occurrences of `{image_id}` in ls_request_prop-url-path with i_image_id ignoring case. + replace all occurrences of `{collection_id}` in ls_request_prop-url-path with i_COLLECTION_ID ignoring case. + replace all occurrences of `{image_id}` in ls_request_prop-url-path with i_IMAGE_ID ignoring case. " standard headers ls_request_prop-header_content_type = I_contenttype. @@ -1514,20 +2054,20 @@ method ADD_IMAGE_TRAINING_DATA. field-symbols: type any. lv_separator = ''. - lv_datatype = get_datatype( i_training_data ). + lv_datatype = get_datatype( i_TRAINING_DATA ). if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep or ls_request_prop-header_content_type cp '*json*'. if lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct or lv_datatype eq ZIF_IBMC_SERVICE_ARCH~c_datatype-struct_deep. - lv_bodyparam = abap_to_json( i_value = i_training_data i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). + lv_bodyparam = abap_to_json( i_value = i_TRAINING_DATA i_dictionary = c_abapname_dictionary i_required_fields = c_required_fields ). else. - lv_bodyparam = abap_to_json( i_name = 'training_data' i_value = i_training_data ). + lv_bodyparam = abap_to_json( i_name = 'training_data' i_value = i_TRAINING_DATA ). endif. lv_body = lv_body && lv_separator && lv_bodyparam. else. - assign i_training_data to . + assign i_TRAINING_DATA to . lv_bodyparam = . concatenate lv_body lv_bodyparam into lv_body. endif. @@ -1558,11 +2098,81 @@ method ADD_IMAGE_TRAINING_DATA. endmethod. +* ---------------------------------------------------------------------------------------+ +* | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->GET_TRAINING_USAGE +* +-------------------------------------------------------------------------------------------------+ +* | [--->] I_START_TIME TYPE STRING(optional) +* | [--->] I_END_TIME TYPE STRING(optional) +* | [--->] I_accept TYPE string (default ='application/json') +* | [<---] E_RESPONSE TYPE T_TRAINING_EVENTS +* | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION +* +-------------------------------------------------------------------------------------- +method GET_TRAINING_USAGE. + + data: + ls_request_prop type ts_request_prop, + lv_separator(1) type c ##NEEDED, + lv_sep(1) type c ##NEEDED, + lo_response type to_rest_response, + lv_json type string ##NEEDED. + + ls_request_prop-url-path = '/v4/training_usage'. + + " standard headers + ls_request_prop-header_accept = I_accept. + set_default_query_parameters( + changing + c_url = ls_request_prop-url ). + + " process query parameters + data: + lv_queryparam type string. + + if i_START_TIME is supplied. + lv_queryparam = escape( val = i_START_TIME format = cl_abap_format=>e_uri_full ). + add_query_parameter( + exporting + i_parameter = `start_time` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + + if i_END_TIME is supplied. + lv_queryparam = escape( val = i_END_TIME format = cl_abap_format=>e_uri_full ). + add_query_parameter( + exporting + i_parameter = `end_time` + i_value = lv_queryparam + changing + c_url = ls_request_prop-url ) ##NO_TEXT. + endif. + + + + + + + " execute HTTP GET request + lo_response = HTTP_GET( i_request_prop = ls_request_prop ). + + + " retrieve JSON data + lv_json = get_response_string( lo_response ). + parse_json( + exporting + i_json = lv_json + i_dictionary = c_abapname_dictionary + changing + c_abap = e_response ). + +endmethod. + * ---------------------------------------------------------------------------------------+ * | Instance Public Method ZCL_IBMC_VISUAL_RECOGNITION_V4->DELETE_USER_DATA * +-------------------------------------------------------------------------------------------------+ -* | [--->] I_customer_id TYPE STRING +* | [--->] I_CUSTOMER_ID TYPE STRING * | [--->] I_accept TYPE string (default ='application/json') * | [!CX!] ZCX_IBMC_SERVICE_EXCEPTION * +-------------------------------------------------------------------------------------- @@ -1587,7 +2197,7 @@ method DELETE_USER_DATA. data: lv_queryparam type string. - lv_queryparam = escape( val = i_customer_id format = cl_abap_format=>e_uri_full ). + lv_queryparam = escape( val = i_CUSTOMER_ID format = cl_abap_format=>e_uri_full ). add_query_parameter( exporting i_parameter = `customer_id` diff --git a/src/zibmc_config.tabl.xml b/src/zibmc_config.tabl.xml index a24a33b..fdd45e8 100644 --- a/src/zibmc_config.tabl.xml +++ b/src/zibmc_config.tabl.xml @@ -6,6 +6,7 @@ ZIBMC_CONFIG E TRANSP + X IBM Cloud Service Integration - Configuration X C @@ -22,12 +23,26 @@ ZIBMC_CONFIG - SERVICE + CLIENT E 0001 X 0 C + 000006 + X + CLNT + 000003 + CLNT + + + ZIBMC_CONFIG + SERVICE + E + 0002 + X + 0 + C 000060 X CHAR @@ -37,7 +52,7 @@ ZIBMC_CONFIG INSTANCE_UID - 0002 + 0003 X ZIBMC_TY_INSTANCE_UID 0 @@ -48,7 +63,7 @@ ZIBMC_CONFIG PARAM E - 0003 + 0004 X 0 C @@ -61,7 +76,7 @@ ZIBMC_CONFIG VALUE - 0004 + 0005 ZIBMC_TY_STRINGVALUE 0 E diff --git a/src/zibmc_token.tabl.xml b/src/zibmc_token.tabl.xml index c00fd4e..f651218 100644 --- a/src/zibmc_token.tabl.xml +++ b/src/zibmc_token.tabl.xml @@ -6,6 +6,7 @@ ZIBMC_TOKEN E TRANSP + X IAM tokens X L @@ -21,12 +22,26 @@ ZIBMC_TOKEN - SERVICE + CLIENT E 0001 X 0 C + 000006 + X + CLNT + 000003 + CLNT + + + ZIBMC_TOKEN + SERVICE + E + 0002 + X + 0 + C 000060 X CHAR @@ -36,7 +51,7 @@ ZIBMC_TOKEN INSTANCE_UID - 0002 + 0003 X ZIBMC_TY_INSTANCE_UID 0 @@ -47,7 +62,7 @@ ZIBMC_TOKEN ACCESS_TOKEN E - 0003 + 0004 0 g 000008 @@ -58,7 +73,7 @@ ZIBMC_TOKEN REFRESH_TOKEN E - 0004 + 0005 0 g 000008 @@ -69,7 +84,7 @@ ZIBMC_TOKEN TOKEN_TYPE E - 0005 + 0006 0 g 000008 @@ -80,7 +95,7 @@ ZIBMC_TOKEN EXPIRES_IN E - 0006 + 0007 0 X 000004 @@ -91,7 +106,7 @@ ZIBMC_TOKEN EXPIRES_TS - 0007 + 0008 TIMESTAMP 0 E @@ -100,7 +115,7 @@ ZIBMC_TOKEN EXPIRATION E - 0008 + 0009 0 X 000004 @@ -112,7 +127,7 @@ ZIBMC_TOKEN SCOPE E - 0009 + 0010 0 g 000008 diff --git a/src/zif_ibmc_service_arch.intf.abap b/src/zif_ibmc_service_arch.intf.abap index b80cd38..7acc531 100644 --- a/src/zif_ibmc_service_arch.intf.abap +++ b/src/zif_ibmc_service_arch.intf.abap @@ -1,4 +1,4 @@ -* Copyright 2019 IBM Corp. All Rights Reserved. +* Copyright 2019,2020 IBM Corp. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,6 +76,16 @@ interface ZIF_IBMC_SERVICE_ARCH end of ts_request_prop . types: tt_string type standard table of string with non-unique default key . + types: + begin of TS_FORM_PART, + CONTENT_TYPE type STRING, + CONTENT_DISPOSITION type STRING, + CDATA type STRING, + XDATA type XSTRING, + end of TS_FORM_PART . + types: + TT_FORM_PART type standard table of TS_FORM_PART with non-unique default key . + constants C_METHOD_GET type CHAR value 'g' ##NO_TEXT. constants C_METHOD_POST type CHAR value 'p' ##NO_TEXT.