Skip to content

Commit

Permalink
feat(assistantv1): New param include_audit in create_workspace an…
Browse files Browse the repository at this point in the history
…d `update_workspace`
  • Loading branch information
ehdsouza committed Feb 11, 2020
1 parent 80b3306 commit e44cb16
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions ibm_watson/assistant_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ def create_workspace(self,
dialog_nodes: List['DialogNode'] = None,
counterexamples: List['Counterexample'] = None,
webhooks: List['Webhook'] = None,
include_audit: bool = None,
**kwargs) -> 'DetailedResponse':
"""
Create workspace.
Expand Down Expand Up @@ -273,6 +274,8 @@ def create_workspace(self,
:param List[Counterexample] counterexamples: (optional) An array of objects
defining input examples that have been marked as irrelevant input.
:param List[Webhook] webhooks: (optional)
: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 @@ -299,7 +302,7 @@ def create_workspace(self,
operation_id='create_workspace')
headers.update(sdk_headers)

params = {'version': self.version}
params = {'version': self.version, 'include_audit': include_audit}

data = {
'name': name,
Expand Down Expand Up @@ -398,6 +401,7 @@ def update_workspace(self,
counterexamples: List['Counterexample'] = None,
webhooks: List['Webhook'] = None,
append: bool = None,
include_audit: bool = None,
**kwargs) -> 'DetailedResponse':
"""
Update workspace.
Expand Down Expand Up @@ -430,14 +434,16 @@ def update_workspace(self,
defining input examples that have been marked as irrelevant input.
:param List[Webhook] webhooks: (optional)
:param bool append: (optional) Whether the new data is to be appended to
the existing data in the workspace. 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.
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 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.
: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 Down Expand Up @@ -466,7 +472,11 @@ def update_workspace(self,
operation_id='update_workspace')
headers.update(sdk_headers)

params = {'version': self.version, 'append': append}
params = {
'version': self.version,
'append': append,
'include_audit': include_audit
}

data = {
'name': name,
Expand Down

0 comments on commit e44cb16

Please sign in to comment.