Skip to content

Commit 4e22c56

Browse files
committed
feat(Assistant): Add system_settings parameter to create_workspace and update_workspace
1 parent 27b2dc7 commit 4e22c56

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lib/ibm_watson/assistant_v1.rb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def list_workspaces(page_limit: nil, include_count: nil, sort: nil, cursor: nil,
255255
end
256256

257257
##
258-
# @!method create_workspace(name: nil, description: nil, language: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil)
258+
# @!method create_workspace(name: nil, description: nil, language: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil, system_settings: nil)
259259
# Create workspace.
260260
# Create a workspace based on component objects. You must provide workspace
261261
# components defining the content of the new workspace.
@@ -275,8 +275,9 @@ def list_workspaces(page_limit: nil, include_count: nil, sort: nil, cursor: nil,
275275
# @param metadata [Object] Any metadata related to the workspace.
276276
# @param learning_opt_out [Boolean] Whether training data from the workspace can be used by IBM for general service
277277
# improvements. `true` indicates that workspace training data is not to be used.
278+
# @param system_settings [WorkspaceSystemSettings] Global settings for the workspace.
278279
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
279-
def create_workspace(name: nil, description: nil, language: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil)
280+
def create_workspace(name: nil, description: nil, language: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil, system_settings: nil)
280281
headers = {
281282
}
282283
params = {
@@ -291,7 +292,8 @@ def create_workspace(name: nil, description: nil, language: nil, intents: nil, e
291292
"dialog_nodes" => dialog_nodes,
292293
"counterexamples" => counterexamples,
293294
"metadata" => metadata,
294-
"learning_opt_out" => learning_opt_out
295+
"learning_opt_out" => learning_opt_out,
296+
"system_settings" => system_settings
295297
}
296298
method_url = "/v1/workspaces"
297299
response = request(
@@ -341,7 +343,7 @@ def get_workspace(workspace_id:, export: nil, include_audit: nil)
341343
end
342344

343345
##
344-
# @!method update_workspace(workspace_id:, name: nil, description: nil, language: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil, append: nil)
346+
# @!method update_workspace(workspace_id:, name: nil, description: nil, language: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, append: nil)
345347
# Update workspace.
346348
# Update an existing workspace with new or modified data. You must provide component
347349
# objects defining the content of the updated workspace.
@@ -362,6 +364,7 @@ def get_workspace(workspace_id:, export: nil, include_audit: nil)
362364
# @param metadata [Object] Any metadata related to the workspace.
363365
# @param learning_opt_out [Boolean] Whether training data from the workspace can be used by IBM for general service
364366
# improvements. `true` indicates that workspace training data is not to be used.
367+
# @param system_settings [WorkspaceSystemSettings] Global settings for the workspace.
365368
# @param append [Boolean] Whether the new data is to be appended to the existing data in the workspace. If
366369
# **append**=`false`, elements included in the new data completely replace the
367370
# corresponding existing elements, including all subelements. For example, if the
@@ -372,7 +375,7 @@ def get_workspace(workspace_id:, export: nil, include_audit: nil)
372375
# added. If any elements in the new data collide with existing elements, the update
373376
# request fails.
374377
# @return [DetailedResponse] A `DetailedResponse` object representing the response.
375-
def update_workspace(workspace_id:, name: nil, description: nil, language: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil, append: nil)
378+
def update_workspace(workspace_id:, name: nil, description: nil, language: nil, intents: nil, entities: nil, dialog_nodes: nil, counterexamples: nil, metadata: nil, learning_opt_out: nil, system_settings: nil, append: nil)
376379
raise ArgumentError("workspace_id must be provided") if workspace_id.nil?
377380
headers = {
378381
}
@@ -389,7 +392,8 @@ def update_workspace(workspace_id:, name: nil, description: nil, language: nil,
389392
"dialog_nodes" => dialog_nodes,
390393
"counterexamples" => counterexamples,
391394
"metadata" => metadata,
392-
"learning_opt_out" => learning_opt_out
395+
"learning_opt_out" => learning_opt_out,
396+
"system_settings" => system_settings
393397
}
394398
method_url = "/v1/workspaces/%s" % [ERB::Util.url_encode(workspace_id)]
395399
response = request(

0 commit comments

Comments
 (0)