From b1f99ec1e4fad3655ff526cab7de5f18e29607a0 Mon Sep 17 00:00:00 2001 From: ehdsouza Date: Tue, 11 Feb 2020 14:29:12 -0500 Subject: [PATCH] feat(assistantv1): New param `include_audit` in `create_example`, `update_example`, `create_counterexample`, `update_counterexample`, `create_entity` --- ibm_watson/assistant_v1.py | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/ibm_watson/assistant_v1.py b/ibm_watson/assistant_v1.py index 6ac745af2..9cb3c08d8 100644 --- a/ibm_watson/assistant_v1.py +++ b/ibm_watson/assistant_v1.py @@ -934,6 +934,7 @@ def create_example(self, text: str, *, mentions: List['Mention'] = None, + include_audit: bool = None, **kwargs) -> 'DetailedResponse': """ Create user input example. @@ -952,6 +953,8 @@ def create_example(self, - It cannot consist of only whitespace characters. :param List[Mention] mentions: (optional) An array of contextual entity mentions. + :param bool include_audit: (optional) Whether to include the audit + properties (`created` and `updated` timestamps) in the response. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers and HTTP status code. :rtype: DetailedResponse @@ -974,7 +977,7 @@ def create_example(self, operation_id='create_example') headers.update(sdk_headers) - params = {'version': self.version} + params = {'version': self.version, 'include_audit': include_audit} data = {'text': text, 'mentions': mentions} @@ -1047,6 +1050,7 @@ def update_example(self, *, new_text: str = None, new_mentions: List['Mention'] = None, + include_audit: bool = None, **kwargs) -> 'DetailedResponse': """ Update user input example. @@ -1066,6 +1070,8 @@ def update_example(self, - It cannot consist of only whitespace characters. :param List[Mention] new_mentions: (optional) An array of contextual entity mentions. + :param bool include_audit: (optional) Whether to include the audit + properties (`created` and `updated` timestamps) in the response. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers and HTTP status code. :rtype: DetailedResponse @@ -1088,7 +1094,7 @@ def update_example(self, operation_id='update_example') headers.update(sdk_headers) - params = {'version': self.version} + params = {'version': self.version, 'include_audit': include_audit} data = {'text': new_text, 'mentions': new_mentions} @@ -1211,7 +1217,11 @@ def list_counterexamples(self, response = self.send(request) return response - def create_counterexample(self, workspace_id: str, text: str, + def create_counterexample(self, + workspace_id: str, + text: str, + *, + include_audit: bool = None, **kwargs) -> 'DetailedResponse': """ Create counterexample. @@ -1228,6 +1238,8 @@ def create_counterexample(self, workspace_id: str, text: str, string must conform to the following restrictions: - It cannot contain carriage return, newline, or tab characters. - It cannot consist of only whitespace characters. + :param bool include_audit: (optional) Whether to include the audit + properties (`created` and `updated` timestamps) in the response. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers and HTTP status code. :rtype: DetailedResponse @@ -1246,7 +1258,7 @@ def create_counterexample(self, workspace_id: str, text: str, operation_id='create_counterexample') headers.update(sdk_headers) - params = {'version': self.version} + params = {'version': self.version, 'include_audit': include_audit} data = {'text': text} @@ -1315,6 +1327,7 @@ def update_counterexample(self, text: str, *, new_text: str = None, + include_audit: bool = None, **kwargs) -> 'DetailedResponse': """ Update counterexample. @@ -1333,6 +1346,8 @@ def update_counterexample(self, 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. + :param bool include_audit: (optional) Whether to include the audit + properties (`created` and `updated` timestamps) in the response. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers and HTTP status code. :rtype: DetailedResponse @@ -1351,7 +1366,7 @@ def update_counterexample(self, operation_id='update_counterexample') headers.update(sdk_headers) - params = {'version': self.version} + params = {'version': self.version, 'include_audit': include_audit} data = {'text': new_text} @@ -1487,6 +1502,7 @@ def create_entity(self, metadata: dict = None, fuzzy_match: bool = None, values: List['CreateValue'] = None, + include_audit: bool = None, **kwargs) -> 'DetailedResponse': """ Create entity. @@ -1512,6 +1528,8 @@ def create_entity(self, entity. :param List[CreateValue] values: (optional) An array of objects describing the entity values. + :param bool include_audit: (optional) Whether to include the audit + properties (`created` and `updated` timestamps) in the response. :param dict headers: A `dict` containing the request headers :return: A `DetailedResponse` containing the result, headers and HTTP status code. :rtype: DetailedResponse @@ -1532,7 +1550,7 @@ def create_entity(self, operation_id='create_entity') headers.update(sdk_headers) - params = {'version': self.version} + params = {'version': self.version, 'include_audit': include_audit} data = { 'entity': entity,