Skip to content

Commit f6baaa2

Browse files
authored
Merge pull request #1128 from watson-developer-cloud/august-2020-release
August 2020 release
2 parents f0fdd3d + 4ea7acc commit f6baaa2

File tree

177 files changed

+6733
-615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+6733
-615
lines changed

assistant/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ checkstyle {
6161
dependencies {
6262
compile project(':common')
6363
testCompile project(':common').sourceSets.test.output
64-
compile 'com.ibm.cloud:sdk-core:8.1.0'
64+
compile 'com.ibm.cloud:sdk-core:8.4.1'
6565
signature 'org.codehaus.mojo.signature:java17:1.0@signature'
6666
}
6767

assistant/src/main/java/com/ibm/watson/assistant/v1/Assistant.java

Lines changed: 1 addition & 151 deletions
Large diffs are not rendered by default.

assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogNodeOutputGeneric.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ public class DialogNodeOutputGeneric extends GenericModel {
2424
* The type of response returned by the dialog node. The specified response type must be supported
2525
* by the client application or channel.
2626
*
27-
* <p>**Note:** The **search_skill** response type is available only for Plus and Premium users,
28-
* and is used only by the v2 runtime API.
27+
* <p>**Note:** The **search_skill** response type is used only by the v2 runtime API.
2928
*/
3029
public interface ResponseType {
3130
/** text. */
@@ -406,8 +405,7 @@ public Builder newBuilder() {
406405
* <p>The type of response returned by the dialog node. The specified response type must be
407406
* supported by the client application or channel.
408407
*
409-
* <p>**Note:** The **search_skill** response type is available only for Plus and Premium users,
410-
* and is used only by the v2 runtime API.
408+
* <p>**Note:** The **search_skill** response type is used only by the v2 runtime API.
411409
*
412410
* @return the responseType
413411
*/

assistant/src/main/java/com/ibm/watson/assistant/v1/model/DialogSuggestionResponseGeneric.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ public class DialogSuggestionResponseGeneric extends GenericModel {
2424
* The type of response returned by the dialog node. The specified response type must be supported
2525
* by the client application or channel.
2626
*
27-
* <p>**Note:** The **suggestion** response type is part of the disambiguation feature, which is
28-
* only available for Plus and Premium users. The **search_skill** response type is available only
29-
* for Plus and Premium users, and is used only by the v2 runtime API.
27+
* <p>**Note:** The **search_skill** response type is is used only by the v2 runtime API.
3028
*/
3129
public interface ResponseType {
3230
/** text. */
@@ -302,9 +300,7 @@ public Builder newBuilder() {
302300
* <p>The type of response returned by the dialog node. The specified response type must be
303301
* supported by the client application or channel.
304302
*
305-
* <p>**Note:** The **suggestion** response type is part of the disambiguation feature, which is
306-
* only available for Plus and Premium users. The **search_skill** response type is available only
307-
* for Plus and Premium users, and is used only by the v2 runtime API.
303+
* <p>**Note:** The **search_skill** response type is is used only by the v2 runtime API.
308304
*
309305
* @return the responseType
310306
*/

assistant/src/main/java/com/ibm/watson/assistant/v1/model/RuntimeResponseGeneric.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ public class RuntimeResponseGeneric extends GenericModel {
2323
/**
2424
* The type of response returned by the dialog node. The specified response type must be supported
2525
* by the client application or channel.
26-
*
27-
* <p>**Note:** The **suggestion** response type is part of the disambiguation feature, which is
28-
* only available for Plus and Premium users.
2926
*/
3027
public interface ResponseType {
3128
/** text. */
@@ -332,9 +329,6 @@ public Builder newBuilder() {
332329
* <p>The type of response returned by the dialog node. The specified response type must be
333330
* supported by the client application or channel.
334331
*
335-
* <p>**Note:** The **suggestion** response type is part of the disambiguation feature, which is
336-
* only available for Plus and Premium users.
337-
*
338332
* @return the responseType
339333
*/
340334
public String responseType() {
@@ -470,9 +464,6 @@ public String dialogNode() {
470464
* <p>An array of objects describing the possible matching dialog nodes from which the user can
471465
* choose.
472466
*
473-
* <p>**Note:** The **suggestions** property is part of the disambiguation feature, which is only
474-
* available for Plus and Premium users.
475-
*
476467
* @return the suggestions
477468
*/
478469
public List<DialogSuggestion> suggestions() {

assistant/src/main/java/com/ibm/watson/assistant/v1/model/SystemResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019.
2+
* (C) Copyright IBM Corp. 2019, 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at

assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettings.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ public WorkspaceSystemSettingsTooling tooling() {
182182
*
183183
* <p>Workspace settings related to the disambiguation feature.
184184
*
185-
* <p>**Note:** This feature is available only to Plus and Premium users.
186-
*
187185
* @return the disambiguation
188186
*/
189187
public WorkspaceSystemSettingsDisambiguation disambiguation() {

assistant/src/main/java/com/ibm/watson/assistant/v1/model/WorkspaceSystemSettingsDisambiguation.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
import com.google.gson.annotations.SerializedName;
1616
import com.ibm.cloud.sdk.core.service.model.GenericModel;
1717

18-
/**
19-
* Workspace settings related to the disambiguation feature.
20-
*
21-
* <p>**Note:** This feature is available only to Plus and Premium users.
22-
*/
18+
/** Workspace settings related to the disambiguation feature. */
2319
public class WorkspaceSystemSettingsDisambiguation extends GenericModel {
2420

2521
/**

assistant/src/main/java/com/ibm/watson/assistant/v1/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019.
2+
* (C) Copyright IBM Corp. 2019, 2020.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at

assistant/src/main/java/com/ibm/watson/assistant/v2/Assistant.java

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
import com.ibm.cloud.sdk.core.util.ResponseConverterUtils;
2323
import com.ibm.watson.assistant.v2.model.CreateSessionOptions;
2424
import com.ibm.watson.assistant.v2.model.DeleteSessionOptions;
25+
import com.ibm.watson.assistant.v2.model.DeleteUserDataOptions;
26+
import com.ibm.watson.assistant.v2.model.ListLogsOptions;
27+
import com.ibm.watson.assistant.v2.model.LogCollection;
2528
import com.ibm.watson.assistant.v2.model.MessageOptions;
2629
import com.ibm.watson.assistant.v2.model.MessageResponse;
2730
import com.ibm.watson.assistant.v2.model.MessageResponseStateless;
@@ -47,7 +50,7 @@ public class Assistant extends BaseService {
4750
private static final String DEFAULT_SERVICE_NAME = "assistant";
4851

4952
private static final String DEFAULT_SERVICE_URL =
50-
"https://gateway.watsonplatform.net/assistant/api";
53+
"https://api.us-south.assistant.watson.cloud.ibm.com";
5154

5255
private String versionDate;
5356

@@ -175,8 +178,6 @@ public ServiceCall<Void> deleteSession(DeleteSessionOptions deleteSessionOptions
175178
* <p>Send user input to an assistant and receive a response, with conversation state (including
176179
* context data) stored by Watson Assistant for the duration of the session.
177180
*
178-
* <p>There is no rate limit for this operation.
179-
*
180181
* @param messageOptions the {@link MessageOptions} containing the options for the call
181182
* @return a {@link ServiceCall} with a response type of {@link MessageResponse}
182183
*/
@@ -217,8 +218,6 @@ public ServiceCall<MessageResponse> message(MessageOptions messageOptions) {
217218
* <p>Send user input to an assistant and receive a response, with conversation state (including
218219
* context data) managed by your application.
219220
*
220-
* <p>There is no rate limit for this operation.
221-
*
222221
* @param messageStatelessOptions the {@link MessageStatelessOptions} containing the options for
223222
* the call
224223
* @return a {@link ServiceCall} with a response type of {@link MessageResponseStateless}
@@ -258,4 +257,82 @@ public ServiceCall<MessageResponseStateless> messageStateless(
258257
new com.google.gson.reflect.TypeToken<MessageResponseStateless>() {}.getType());
259258
return createServiceCall(builder.build(), responseConverter);
260259
}
260+
261+
/**
262+
* List log events for an assistant.
263+
*
264+
* <p>List the events from the log of an assistant.
265+
*
266+
* <p>This method is available only with Premium plans.
267+
*
268+
* @param listLogsOptions the {@link ListLogsOptions} containing the options for the call
269+
* @return a {@link ServiceCall} with a response type of {@link LogCollection}
270+
*/
271+
public ServiceCall<LogCollection> listLogs(ListLogsOptions listLogsOptions) {
272+
com.ibm.cloud.sdk.core.util.Validator.notNull(
273+
listLogsOptions, "listLogsOptions cannot be null");
274+
String[] pathSegments = {"v2/assistants", "logs"};
275+
String[] pathParameters = {listLogsOptions.assistantId()};
276+
RequestBuilder builder =
277+
RequestBuilder.get(
278+
RequestBuilder.constructHttpUrl(getServiceUrl(), pathSegments, pathParameters));
279+
builder.query("version", versionDate);
280+
Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("conversation", "v2", "listLogs");
281+
for (Entry<String, String> header : sdkHeaders.entrySet()) {
282+
builder.header(header.getKey(), header.getValue());
283+
}
284+
builder.header("Accept", "application/json");
285+
if (listLogsOptions.sort() != null) {
286+
builder.query("sort", listLogsOptions.sort());
287+
}
288+
if (listLogsOptions.filter() != null) {
289+
builder.query("filter", listLogsOptions.filter());
290+
}
291+
if (listLogsOptions.pageLimit() != null) {
292+
builder.query("page_limit", String.valueOf(listLogsOptions.pageLimit()));
293+
}
294+
if (listLogsOptions.cursor() != null) {
295+
builder.query("cursor", listLogsOptions.cursor());
296+
}
297+
ResponseConverter<LogCollection> responseConverter =
298+
ResponseConverterUtils.getValue(
299+
new com.google.gson.reflect.TypeToken<LogCollection>() {}.getType());
300+
return createServiceCall(builder.build(), responseConverter);
301+
}
302+
303+
/**
304+
* Delete labeled data.
305+
*
306+
* <p>Deletes all data associated with a specified customer ID. The method has no effect if no
307+
* data is associated with the customer ID.
308+
*
309+
* <p>You associate a customer ID with data by passing the `X-Watson-Metadata` header with a
310+
* request that passes data. For more information about personal data and customer IDs, see
311+
* [Information
312+
* security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).
313+
*
314+
* <p>This operation is limited to 4 requests per minute. For more information, see **Rate
315+
* limiting**.
316+
*
317+
* @param deleteUserDataOptions the {@link DeleteUserDataOptions} containing the options for the
318+
* call
319+
* @return a {@link ServiceCall} with a response type of Void
320+
*/
321+
public ServiceCall<Void> deleteUserData(DeleteUserDataOptions deleteUserDataOptions) {
322+
com.ibm.cloud.sdk.core.util.Validator.notNull(
323+
deleteUserDataOptions, "deleteUserDataOptions cannot be null");
324+
String[] pathSegments = {"v2/user_data"};
325+
RequestBuilder builder =
326+
RequestBuilder.delete(RequestBuilder.constructHttpUrl(getServiceUrl(), pathSegments));
327+
builder.query("version", versionDate);
328+
Map<String, String> sdkHeaders =
329+
SdkCommon.getSdkHeaders("conversation", "v2", "deleteUserData");
330+
for (Entry<String, String> header : sdkHeaders.entrySet()) {
331+
builder.header(header.getKey(), header.getValue());
332+
}
333+
builder.header("Accept", "application/json");
334+
builder.query("customer_id", deleteUserDataOptions.customerId());
335+
ResponseConverter<Void> responseConverter = ResponseConverterUtils.getVoid();
336+
return createServiceCall(builder.build(), responseConverter);
337+
}
261338
}

0 commit comments

Comments
 (0)