Skip to content

Commit 60df916

Browse files
jeff-arnapaparazzi0329
authored andcommitted
chore(hand edits): apply assistantv1 hand edits
1 parent 6b740f5 commit 60df916

8 files changed

+844
-33
lines changed

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

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
import com.ibm.watson.assistant.v1.model.Synonym;
8383
import com.ibm.watson.assistant.v1.model.SynonymCollection;
8484
import com.ibm.watson.assistant.v1.model.UpdateCounterexampleOptions;
85+
import com.ibm.watson.assistant.v1.model.UpdateDialogNodeNullableOptions;
8586
import com.ibm.watson.assistant.v1.model.UpdateDialogNodeOptions;
8687
import com.ibm.watson.assistant.v1.model.UpdateEntityOptions;
8788
import com.ibm.watson.assistant.v1.model.UpdateExampleOptions;
@@ -112,7 +113,7 @@
112113
public class Assistant extends BaseService {
113114

114115
/** Default service name used when configuring the `Assistant` client. */
115-
public static final String DEFAULT_SERVICE_NAME = "conversation";
116+
public static final String DEFAULT_SERVICE_NAME = "assistant";
116117

117118
/** Default service endpoint URL. */
118119
public static final String DEFAULT_SERVICE_URL =
@@ -196,6 +197,52 @@ public void setVersion(final String version) {
196197
this.version = version;
197198
}
198199

200+
/**
201+
* Update dialog node.
202+
*
203+
* <p>Update an existing dialog node with new or modified data.
204+
*
205+
* <p>If you want to update multiple dialog nodes with a single API call, consider using the
206+
* **[Update workspace](#update-workspace)** method instead.
207+
*
208+
* @param UpdateDialogNodeNullableOptions the {@link UpdateDialogNodeNullableOptions} containing
209+
* the options for the call
210+
* @return a {@link ServiceCall} with a result of type {@link DialogNode}
211+
*/
212+
public ServiceCall<DialogNode> updateDialogNodeNullable(
213+
UpdateDialogNodeNullableOptions UpdateDialogNodeNullableOptions) {
214+
com.ibm.cloud.sdk.core.util.Validator.notNull(
215+
UpdateDialogNodeNullableOptions, "UpdateDialogNodeNullableOptions cannot be null");
216+
Map<String, String> pathParamsMap = new HashMap<String, String>();
217+
pathParamsMap.put("workspace_id", UpdateDialogNodeNullableOptions.workspaceId());
218+
pathParamsMap.put("dialog_node", UpdateDialogNodeNullableOptions.dialogNode());
219+
RequestBuilder builder =
220+
RequestBuilder.post(
221+
RequestBuilder.resolveRequestUrl(
222+
getServiceUrl(),
223+
"/v1/workspaces/{workspace_id}/dialog_nodes/{dialog_node}",
224+
pathParamsMap));
225+
Map<String, String> sdkHeaders =
226+
SdkCommon.getSdkHeaders("conversation", "v1", "testUpdateDialogNode");
227+
for (Entry<String, String> header : sdkHeaders.entrySet()) {
228+
builder.header(header.getKey(), header.getValue());
229+
}
230+
builder.header("Accept", "application/json");
231+
builder.query("version", String.valueOf(this.version));
232+
if (UpdateDialogNodeNullableOptions.includeAudit() != null) {
233+
builder.query(
234+
"include_audit", String.valueOf(UpdateDialogNodeNullableOptions.includeAudit()));
235+
}
236+
builder.bodyContent(
237+
com.ibm.cloud.sdk.core.util.GsonSingleton.getGsonWithSerializeNulls()
238+
.toJson(UpdateDialogNodeNullableOptions.body()),
239+
"application/json");
240+
ResponseConverter<DialogNode> responseConverter =
241+
ResponseConverterUtils.getValue(
242+
new com.google.gson.reflect.TypeToken<DialogNode>() {}.getType());
243+
return createServiceCall(builder.build(), responseConverter);
244+
}
245+
199246
/**
200247
* Get response to user input.
201248
*

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ public interface QueryType {
122122
@SerializedName("agent_unavailable")
123123
protected AgentAvailabilityMessage agentUnavailable;
124124

125-
@SerializedName("transfer_info")
126-
protected DialogNodeOutputConnectToAgentTransferInfo transferInfo;
127-
128125
protected String query;
129126

130127
@SerializedName("query_type")
@@ -331,17 +328,6 @@ public AgentAvailabilityMessage agentUnavailable() {
331328
return agentUnavailable;
332329
}
333330

334-
/**
335-
* Gets the transferInfo.
336-
*
337-
* <p>Routing or other contextual information to be used by target service desk systems.
338-
*
339-
* @return the transferInfo
340-
*/
341-
public DialogNodeOutputConnectToAgentTransferInfo transferInfo() {
342-
return transferInfo;
343-
}
344-
345331
/**
346332
* Gets the query.
347333
*

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@
1212
*/
1313
package com.ibm.watson.assistant.v1.model;
1414

15+
import com.google.gson.annotations.SerializedName;
1516
import java.util.ArrayList;
1617
import java.util.List;
1718

1819
/** DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer. */
1920
public class DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer
2021
extends DialogNodeOutputGeneric {
2122

23+
@SerializedName("transfer_info")
24+
private ChannelTransferInfo transferInfo;
25+
2226
/** Builder. */
2327
public static class Builder {
2428
private String responseType;
@@ -34,7 +38,7 @@ public static class Builder {
3438
* initialize the Builder with
3539
*/
3640
public Builder(
37-
DialogNodeOutputGeneric
41+
DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer
3842
dialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer) {
3943
this.responseType =
4044
dialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer.responseType;
@@ -153,4 +157,15 @@ protected DialogNodeOutputGenericDialogNodeOutputResponseTypeChannelTransfer(Bui
153157
public Builder newBuilder() {
154158
return new Builder(this);
155159
}
160+
161+
/**
162+
* Gets the transferInfo.
163+
*
164+
* <p>Routing or other contextual information to be used by target service desk systems.
165+
*
166+
* @return the transferInfo
167+
*/
168+
public ChannelTransferInfo transferInfo() {
169+
return transferInfo;
170+
}
156171
}

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@
1212
*/
1313
package com.ibm.watson.assistant.v1.model;
1414

15+
import com.google.gson.annotations.SerializedName;
1516
import java.util.ArrayList;
1617
import java.util.List;
1718

1819
/** DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent. */
1920
public class DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent
2021
extends DialogNodeOutputGeneric {
2122

23+
@SerializedName("transfer_info")
24+
private DialogNodeOutputConnectToAgentTransferInfo transferInfo;
25+
2226
/** Builder. */
2327
public static class Builder {
2428
private String responseType;
@@ -36,7 +40,8 @@ public static class Builder {
3640
* initialize the Builder with
3741
*/
3842
public Builder(
39-
DialogNodeOutputGeneric dialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent) {
43+
DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent
44+
dialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent) {
4045
this.responseType =
4146
dialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent.responseType;
4247
this.messageToHumanAgent =
@@ -174,4 +179,15 @@ protected DialogNodeOutputGenericDialogNodeOutputResponseTypeConnectToAgent(Buil
174179
public Builder newBuilder() {
175180
return new Builder(this);
176181
}
182+
183+
/**
184+
* Gets the transferInfo.
185+
*
186+
* <p>Routing or other contextual information to be used by target service desk systems.
187+
*
188+
* @return the transferInfo
189+
*/
190+
public DialogNodeOutputConnectToAgentTransferInfo transferInfo() {
191+
return transferInfo;
192+
}
177193
}

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ public interface Preference {
8989
@SerializedName("agent_unavailable")
9090
protected AgentAvailabilityMessage agentUnavailable;
9191

92-
@SerializedName("transfer_info")
93-
protected DialogNodeOutputConnectToAgentTransferInfo transferInfo;
94-
9592
protected String topic;
9693

9794
@SerializedName("dialog_node")
@@ -273,17 +270,6 @@ public AgentAvailabilityMessage agentUnavailable() {
273270
return agentUnavailable;
274271
}
275272

276-
/**
277-
* Gets the transferInfo.
278-
*
279-
* <p>Routing or other contextual information to be used by target service desk systems.
280-
*
281-
* @return the transferInfo
282-
*/
283-
public DialogNodeOutputConnectToAgentTransferInfo transferInfo() {
284-
return transferInfo;
285-
}
286-
287273
/**
288274
* Gets the topic.
289275
*

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@
1212
*/
1313
package com.ibm.watson.assistant.v1.model;
1414

15+
import com.google.gson.annotations.SerializedName;
1516
import java.util.ArrayList;
1617
import java.util.List;
1718

1819
/** RuntimeResponseGenericRuntimeResponseTypeChannelTransfer. */
1920
public class RuntimeResponseGenericRuntimeResponseTypeChannelTransfer
2021
extends RuntimeResponseGeneric {
2122

23+
@SerializedName("transfer_info")
24+
protected ChannelTransferInfo transferInfo;
25+
2226
/** Builder. */
2327
public static class Builder {
2428
private String responseType;
@@ -34,7 +38,8 @@ public static class Builder {
3438
* the Builder with
3539
*/
3640
public Builder(
37-
RuntimeResponseGeneric runtimeResponseGenericRuntimeResponseTypeChannelTransfer) {
41+
RuntimeResponseGenericRuntimeResponseTypeChannelTransfer
42+
runtimeResponseGenericRuntimeResponseTypeChannelTransfer) {
3843
this.responseType = runtimeResponseGenericRuntimeResponseTypeChannelTransfer.responseType;
3944
this.messageToUser = runtimeResponseGenericRuntimeResponseTypeChannelTransfer.messageToUser;
4045
this.transferInfo = runtimeResponseGenericRuntimeResponseTypeChannelTransfer.transferInfo;
@@ -149,4 +154,15 @@ protected RuntimeResponseGenericRuntimeResponseTypeChannelTransfer(Builder build
149154
public Builder newBuilder() {
150155
return new Builder(this);
151156
}
157+
158+
/**
159+
* Gets the transferInfo.
160+
*
161+
* <p>Routing or other contextual information to be used by target service desk systems.
162+
*
163+
* @return the transferInfo
164+
*/
165+
public ChannelTransferInfo transferInfo() {
166+
return transferInfo;
167+
}
152168
}

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@
1212
*/
1313
package com.ibm.watson.assistant.v1.model;
1414

15+
import com.google.gson.annotations.SerializedName;
1516
import java.util.ArrayList;
1617
import java.util.List;
1718

1819
/** RuntimeResponseGenericRuntimeResponseTypeConnectToAgent. */
1920
public class RuntimeResponseGenericRuntimeResponseTypeConnectToAgent
2021
extends RuntimeResponseGeneric {
2122

23+
@SerializedName("transfer_info")
24+
protected DialogNodeOutputConnectToAgentTransferInfo transferInfo;
25+
2226
/** Builder. */
2327
public static class Builder {
2428
private String responseType;
@@ -37,7 +41,9 @@ public static class Builder {
3741
* @param runtimeResponseGenericRuntimeResponseTypeConnectToAgent the instance to initialize the
3842
* Builder with
3943
*/
40-
public Builder(RuntimeResponseGeneric runtimeResponseGenericRuntimeResponseTypeConnectToAgent) {
44+
public Builder(
45+
RuntimeResponseGenericRuntimeResponseTypeConnectToAgent
46+
runtimeResponseGenericRuntimeResponseTypeConnectToAgent) {
4147
this.responseType = runtimeResponseGenericRuntimeResponseTypeConnectToAgent.responseType;
4248
this.messageToHumanAgent =
4349
runtimeResponseGenericRuntimeResponseTypeConnectToAgent.messageToHumanAgent;
@@ -198,4 +204,15 @@ protected RuntimeResponseGenericRuntimeResponseTypeConnectToAgent(Builder builde
198204
public Builder newBuilder() {
199205
return new Builder(this);
200206
}
207+
208+
/**
209+
* Gets the transferInfo.
210+
*
211+
* <p>Routing or other contextual information to be used by target service desk systems.
212+
*
213+
* @return the transferInfo
214+
*/
215+
public DialogNodeOutputConnectToAgentTransferInfo transferInfo() {
216+
return transferInfo;
217+
}
201218
}

0 commit comments

Comments
 (0)