From 8bac230a824d996f7807f943650c737ca3ae553d Mon Sep 17 00:00:00 2001 From: ehdsouza Date: Tue, 11 Feb 2020 14:42:41 -0500 Subject: [PATCH] feat(assistantv1): New params `audit` and `include_audit` in `update_value` --- ibm_watson/assistant_v1.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/ibm_watson/assistant_v1.py b/ibm_watson/assistant_v1.py index 69436de44..1b5c178ba 100644 --- a/ibm_watson/assistant_v1.py +++ b/ibm_watson/assistant_v1.py @@ -2047,6 +2047,8 @@ def update_value(self, new_type: str = None, new_synonyms: List[str] = None, new_patterns: List[str] = None, + append: bool = None, + include_audit: bool = None, **kwargs) -> 'DetailedResponse': """ Update entity value. @@ -2078,7 +2080,19 @@ def update_value(self, 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/services/assistant?topic=assistant-entities#entities-create-dictionary-based). + [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-entities#entities-create-dictionary-based). + :param bool append: (optional) 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. + :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 @@ -2099,7 +2113,11 @@ def update_value(self, operation_id='update_value') headers.update(sdk_headers) - params = {'version': self.version} + params = { + 'version': self.version, + 'append': append, + 'include_audit': include_audit + } data = { 'value': new_value,