Skip to content

Commit e143979

Browse files
authored
Merge pull request #1168 from watson-developer-cloud/release-may
May Release
2 parents 58e4b6f + 047e39c commit e143979

File tree

300 files changed

+16533
-980
lines changed

Some content is hidden

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

300 files changed

+16533
-980
lines changed

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

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2020.
2+
* (C) Copyright IBM Corp. 2019, 2021.
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
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/*
15-
* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-be3b4618-20201201-123423
15+
* IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-902c9336-20210513-140138
1616
*/
1717

1818
package com.ibm.watson.assistant.v1;
@@ -253,6 +253,9 @@ public ServiceCall<MessageResponse> message(MessageOptions messageOptions) {
253253
"output",
254254
com.ibm.cloud.sdk.core.util.GsonSingleton.getGson().toJsonTree(messageOptions.output()));
255255
}
256+
if (messageOptions.userId() != null) {
257+
contentJson.addProperty("user_id", messageOptions.userId());
258+
}
256259
builder.bodyJson(contentJson);
257260
ResponseConverter<MessageResponse> responseConverter =
258261
ResponseConverterUtils.getValue(
@@ -267,7 +270,7 @@ public ServiceCall<MessageResponse> message(MessageOptions messageOptions) {
267270
* the intents and entities recognized in each input. This method is useful for testing and
268271
* comparing the performance of different workspaces.
269272
*
270-
* <p>This method is available only with Premium plans.
273+
* <p>This method is available only with Enterprise with Data Isolation plans.
271274
*
272275
* @param bulkClassifyOptions the {@link BulkClassifyOptions} containing the options for the call
273276
* @return a {@link ServiceCall} with a result of type {@link BulkClassifyResponse}
@@ -2298,40 +2301,41 @@ public ServiceCall<DialogNode> updateDialogNode(UpdateDialogNodeOptions updateDi
22982301
* <p>If you want to update multiple dialog nodes with a single API call, consider using the
22992302
* **[Update workspace](#update-workspace)** method instead.
23002303
*
2301-
* @param UpdateDialogNodeNullableOptions the {@link UpdateDialogNodeNullableOptions} containing the
2302-
* options for the call
2304+
* @param UpdateDialogNodeNullableOptions the {@link UpdateDialogNodeNullableOptions} containing
2305+
* the options for the call
23032306
* @return a {@link ServiceCall} with a result of type {@link DialogNode}
23042307
*/
23052308
public ServiceCall<DialogNode> updateDialogNodeNullable(
2306-
UpdateDialogNodeNullableOptions UpdateDialogNodeNullableOptions) {
2309+
UpdateDialogNodeNullableOptions UpdateDialogNodeNullableOptions) {
23072310
com.ibm.cloud.sdk.core.util.Validator.notNull(
2308-
UpdateDialogNodeNullableOptions, "UpdateDialogNodeNullableOptions cannot be null");
2311+
UpdateDialogNodeNullableOptions, "UpdateDialogNodeNullableOptions cannot be null");
23092312
Map<String, String> pathParamsMap = new HashMap<String, String>();
23102313
pathParamsMap.put("workspace_id", UpdateDialogNodeNullableOptions.workspaceId());
23112314
pathParamsMap.put("dialog_node", UpdateDialogNodeNullableOptions.dialogNode());
23122315
RequestBuilder builder =
2313-
RequestBuilder.post(
2314-
RequestBuilder.resolveRequestUrl(
2315-
getServiceUrl(),
2316-
"/v1/workspaces/{workspace_id}/dialog_nodes/{dialog_node}",
2317-
pathParamsMap));
2316+
RequestBuilder.post(
2317+
RequestBuilder.resolveRequestUrl(
2318+
getServiceUrl(),
2319+
"/v1/workspaces/{workspace_id}/dialog_nodes/{dialog_node}",
2320+
pathParamsMap));
23182321
Map<String, String> sdkHeaders =
2319-
SdkCommon.getSdkHeaders("conversation", "v1", "testUpdateDialogNode");
2322+
SdkCommon.getSdkHeaders("conversation", "v1", "testUpdateDialogNode");
23202323
for (Entry<String, String> header : sdkHeaders.entrySet()) {
23212324
builder.header(header.getKey(), header.getValue());
23222325
}
23232326
builder.header("Accept", "application/json");
23242327
builder.query("version", String.valueOf(this.version));
23252328
if (UpdateDialogNodeNullableOptions.includeAudit() != null) {
2326-
builder.query("include_audit", String.valueOf(UpdateDialogNodeNullableOptions.includeAudit()));
2329+
builder.query(
2330+
"include_audit", String.valueOf(UpdateDialogNodeNullableOptions.includeAudit()));
23272331
}
23282332
builder.bodyContent(
2329-
com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls()
2330-
.toJson(UpdateDialogNodeNullableOptions.body()),
2331-
"application/json");
2333+
com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls()
2334+
.toJson(UpdateDialogNodeNullableOptions.body()),
2335+
"application/json");
23322336
ResponseConverter<DialogNode> responseConverter =
2333-
ResponseConverterUtils.getValue(
2334-
new com.google.gson.reflect.TypeToken<DialogNode>() {}.getType());
2337+
ResponseConverterUtils.getValue(
2338+
new com.google.gson.reflect.TypeToken<DialogNode>() {}.getType());
23352339
return createServiceCall(builder.build(), responseConverter);
23362340
}
23372341

@@ -2372,6 +2376,8 @@ public ServiceCall<Void> deleteDialogNode(DeleteDialogNodeOptions deleteDialogNo
23722376
*
23732377
* <p>List the events from the log of a specific workspace.
23742378
*
2379+
* <p>This method requires Manager access.
2380+
*
23752381
* @param listLogsOptions the {@link ListLogsOptions} containing the options for the call
23762382
* @return a {@link ServiceCall} with a result of type {@link LogCollection}
23772383
*/
@@ -2454,6 +2460,11 @@ public ServiceCall<LogCollection> listAllLogs(ListAllLogsOptions listAllLogsOpti
24542460
* [Information
24552461
* security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).
24562462
*
2463+
* <p>**Note:** This operation is intended only for deleting data associated with a single
2464+
* specific customer, not for deleting data associated with multiple customers or for any other
2465+
* purpose. For more information, see [Labeling and deleting data in Watson
2466+
* Assistant](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security-gdpr-wa).
2467+
*
24572468
* @param deleteUserDataOptions the {@link DeleteUserDataOptions} containing the options for the
24582469
* call
24592470
* @return a {@link ServiceCall} with a void result
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2021.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.assistant.v1.model;
14+
15+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
16+
17+
/** Information used by an integration to transfer the conversation to a different channel. */
18+
public class ChannelTransferInfo extends GenericModel {
19+
20+
protected ChannelTransferTarget target;
21+
22+
/** Builder. */
23+
public static class Builder {
24+
private ChannelTransferTarget target;
25+
26+
private Builder(ChannelTransferInfo channelTransferInfo) {
27+
this.target = channelTransferInfo.target;
28+
}
29+
30+
/** Instantiates a new builder. */
31+
public Builder() {}
32+
33+
/**
34+
* Instantiates a new builder with required properties.
35+
*
36+
* @param target the target
37+
*/
38+
public Builder(ChannelTransferTarget target) {
39+
this.target = target;
40+
}
41+
42+
/**
43+
* Builds a ChannelTransferInfo.
44+
*
45+
* @return the new ChannelTransferInfo instance
46+
*/
47+
public ChannelTransferInfo build() {
48+
return new ChannelTransferInfo(this);
49+
}
50+
51+
/**
52+
* Set the target.
53+
*
54+
* @param target the target
55+
* @return the ChannelTransferInfo builder
56+
*/
57+
public Builder target(ChannelTransferTarget target) {
58+
this.target = target;
59+
return this;
60+
}
61+
}
62+
63+
protected ChannelTransferInfo(Builder builder) {
64+
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.target, "target cannot be null");
65+
target = builder.target;
66+
}
67+
68+
/**
69+
* New builder.
70+
*
71+
* @return a ChannelTransferInfo builder
72+
*/
73+
public Builder newBuilder() {
74+
return new Builder(this);
75+
}
76+
77+
/**
78+
* Gets the target.
79+
*
80+
* <p>An object specifying target channels available for the transfer. Each property of this
81+
* object represents an available transfer target. Currently, the only supported property is
82+
* **chat**, representing the web chat integration.
83+
*
84+
* @return the target
85+
*/
86+
public ChannelTransferTarget target() {
87+
return target;
88+
}
89+
}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2021.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.assistant.v1.model;
14+
15+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
16+
17+
/**
18+
* An object specifying target channels available for the transfer. Each property of this object
19+
* represents an available transfer target. Currently, the only supported property is **chat**,
20+
* representing the web chat integration.
21+
*/
22+
public class ChannelTransferTarget extends GenericModel {
23+
24+
protected ChannelTransferTargetChat chat;
25+
26+
/** Builder. */
27+
public static class Builder {
28+
private ChannelTransferTargetChat chat;
29+
30+
private Builder(ChannelTransferTarget channelTransferTarget) {
31+
this.chat = channelTransferTarget.chat;
32+
}
33+
34+
/** Instantiates a new builder. */
35+
public Builder() {}
36+
37+
/**
38+
* Builds a ChannelTransferTarget.
39+
*
40+
* @return the new ChannelTransferTarget instance
41+
*/
42+
public ChannelTransferTarget build() {
43+
return new ChannelTransferTarget(this);
44+
}
45+
46+
/**
47+
* Set the chat.
48+
*
49+
* @param chat the chat
50+
* @return the ChannelTransferTarget builder
51+
*/
52+
public Builder chat(ChannelTransferTargetChat chat) {
53+
this.chat = chat;
54+
return this;
55+
}
56+
}
57+
58+
protected ChannelTransferTarget(Builder builder) {
59+
chat = builder.chat;
60+
}
61+
62+
/**
63+
* New builder.
64+
*
65+
* @return a ChannelTransferTarget builder
66+
*/
67+
public Builder newBuilder() {
68+
return new Builder(this);
69+
}
70+
71+
/**
72+
* Gets the chat.
73+
*
74+
* <p>Information for transferring to the web chat integration.
75+
*
76+
* @return the chat
77+
*/
78+
public ChannelTransferTargetChat chat() {
79+
return chat;
80+
}
81+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*
2+
* (C) Copyright IBM Corp. 2021.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*/
13+
package com.ibm.watson.assistant.v1.model;
14+
15+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
16+
17+
/** Information for transferring to the web chat integration. */
18+
public class ChannelTransferTargetChat extends GenericModel {
19+
20+
protected String url;
21+
22+
/** Builder. */
23+
public static class Builder {
24+
private String url;
25+
26+
private Builder(ChannelTransferTargetChat channelTransferTargetChat) {
27+
this.url = channelTransferTargetChat.url;
28+
}
29+
30+
/** Instantiates a new builder. */
31+
public Builder() {}
32+
33+
/**
34+
* Builds a ChannelTransferTargetChat.
35+
*
36+
* @return the new ChannelTransferTargetChat instance
37+
*/
38+
public ChannelTransferTargetChat build() {
39+
return new ChannelTransferTargetChat(this);
40+
}
41+
42+
/**
43+
* Set the url.
44+
*
45+
* @param url the url
46+
* @return the ChannelTransferTargetChat builder
47+
*/
48+
public Builder url(String url) {
49+
this.url = url;
50+
return this;
51+
}
52+
}
53+
54+
protected ChannelTransferTargetChat(Builder builder) {
55+
url = builder.url;
56+
}
57+
58+
/**
59+
* New builder.
60+
*
61+
* @return a ChannelTransferTargetChat builder
62+
*/
63+
public Builder newBuilder() {
64+
return new Builder(this);
65+
}
66+
67+
/**
68+
* Gets the url.
69+
*
70+
* <p>The URL of the target web chat.
71+
*
72+
* @return the url
73+
*/
74+
public String url() {
75+
return url;
76+
}
77+
}

0 commit comments

Comments
 (0)