|
80 | 80 | import com.ibm.watson.assistant.v1.model.Synonym;
|
81 | 81 | import com.ibm.watson.assistant.v1.model.SynonymCollection;
|
82 | 82 | import com.ibm.watson.assistant.v1.model.UpdateCounterexampleOptions;
|
| 83 | +import com.ibm.watson.assistant.v1.model.UpdateDialogNodeNullableOptions; |
83 | 84 | import com.ibm.watson.assistant.v1.model.UpdateDialogNodeOptions;
|
84 | 85 | import com.ibm.watson.assistant.v1.model.UpdateEntityOptions;
|
85 | 86 | import com.ibm.watson.assistant.v1.model.UpdateExampleOptions;
|
@@ -2289,6 +2290,51 @@ public ServiceCall<DialogNode> updateDialogNode(UpdateDialogNodeOptions updateDi
|
2289 | 2290 | return createServiceCall(builder.build(), responseConverter);
|
2290 | 2291 | }
|
2291 | 2292 |
|
| 2293 | + /** |
| 2294 | + * Update dialog node. |
| 2295 | + * |
| 2296 | + * <p>Update an existing dialog node with new or modified data. |
| 2297 | + * |
| 2298 | + * <p>If you want to update multiple dialog nodes with a single API call, consider using the |
| 2299 | + * **[Update workspace](#update-workspace)** method instead. |
| 2300 | + * |
| 2301 | + * @param UpdateDialogNodeNullableOptions the {@link UpdateDialogNodeNullableOptions} containing the |
| 2302 | + * options for the call |
| 2303 | + * @return a {@link ServiceCall} with a result of type {@link DialogNode} |
| 2304 | + */ |
| 2305 | + public ServiceCall<DialogNode> updateDialogNodeNullable( |
| 2306 | + UpdateDialogNodeNullableOptions UpdateDialogNodeNullableOptions) { |
| 2307 | + com.ibm.cloud.sdk.core.util.Validator.notNull( |
| 2308 | + UpdateDialogNodeNullableOptions, "UpdateDialogNodeNullableOptions cannot be null"); |
| 2309 | + Map<String, String> pathParamsMap = new HashMap<String, String>(); |
| 2310 | + pathParamsMap.put("workspace_id", UpdateDialogNodeNullableOptions.workspaceId()); |
| 2311 | + pathParamsMap.put("dialog_node", UpdateDialogNodeNullableOptions.dialogNode()); |
| 2312 | + RequestBuilder builder = |
| 2313 | + RequestBuilder.post( |
| 2314 | + RequestBuilder.resolveRequestUrl( |
| 2315 | + getServiceUrl(), |
| 2316 | + "/v1/workspaces/{workspace_id}/dialog_nodes/{dialog_node}", |
| 2317 | + pathParamsMap)); |
| 2318 | + Map<String, String> sdkHeaders = |
| 2319 | + SdkCommon.getSdkHeaders("conversation", "v1", "testUpdateDialogNode"); |
| 2320 | + for (Entry<String, String> header : sdkHeaders.entrySet()) { |
| 2321 | + builder.header(header.getKey(), header.getValue()); |
| 2322 | + } |
| 2323 | + builder.header("Accept", "application/json"); |
| 2324 | + builder.query("version", String.valueOf(this.version)); |
| 2325 | + if (UpdateDialogNodeNullableOptions.includeAudit() != null) { |
| 2326 | + builder.query("include_audit", String.valueOf(UpdateDialogNodeNullableOptions.includeAudit())); |
| 2327 | + } |
| 2328 | + builder.bodyContent( |
| 2329 | + com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls() |
| 2330 | + .toJson(UpdateDialogNodeNullableOptions.body()), |
| 2331 | + "application/json"); |
| 2332 | + ResponseConverter<DialogNode> responseConverter = |
| 2333 | + ResponseConverterUtils.getValue( |
| 2334 | + new com.google.gson.reflect.TypeToken<DialogNode>() {}.getType()); |
| 2335 | + return createServiceCall(builder.build(), responseConverter); |
| 2336 | + } |
| 2337 | + |
2292 | 2338 | /**
|
2293 | 2339 | * Delete dialog node.
|
2294 | 2340 | *
|
|
0 commit comments