use of com.ibm.watson.developer_cloud.assistant.v1.model.DialogNodeCollection in project java-sdk by watson-developer-cloud.
the class Assistant method listDialogNodes.
/**
* List dialog nodes.
*
* List the dialog nodes for a workspace. This operation is limited to 2500 requests per 30 minutes. For more
* information, see **Rate limiting**.
*
* @param listDialogNodesOptions the {@link ListDialogNodesOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link DialogNodeCollection}
*/
public ServiceCall<DialogNodeCollection> listDialogNodes(ListDialogNodesOptions listDialogNodesOptions) {
Validator.notNull(listDialogNodesOptions, "listDialogNodesOptions cannot be null");
String[] pathSegments = { "v1/workspaces", "dialog_nodes" };
String[] pathParameters = { listDialogNodesOptions.workspaceId() };
RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments, pathParameters));
builder.query(VERSION, versionDate);
if (listDialogNodesOptions.pageLimit() != null) {
builder.query("page_limit", String.valueOf(listDialogNodesOptions.pageLimit()));
}
if (listDialogNodesOptions.includeCount() != null) {
builder.query("include_count", String.valueOf(listDialogNodesOptions.includeCount()));
}
if (listDialogNodesOptions.sort() != null) {
builder.query("sort", listDialogNodesOptions.sort());
}
if (listDialogNodesOptions.cursor() != null) {
builder.query("cursor", listDialogNodesOptions.cursor());
}
if (listDialogNodesOptions.includeAudit() != null) {
builder.query("include_audit", String.valueOf(listDialogNodesOptions.includeAudit()));
}
return createServiceCall(builder.build(), ResponseConverterUtils.getObject(DialogNodeCollection.class));
}
Aggregations