Skip to content

Commit

Permalink
feat(assistantv1): New params audit and include_audit in `update_…
Browse files Browse the repository at this point in the history
…value`
  • Loading branch information
ehdsouza committed Feb 11, 2020
1 parent 4d32257 commit 8bac230
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions ibm_watson/assistant_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit 8bac230

Please sign in to comment.