Skip to content

Commit dc7f6a4

Browse files
committed
feat(assistant-v1): generated using api-def: master & generator: 3.46.0
OutputData: BREAKING required text property removed, RuntimeEntity: BREAKING optional metadata property removed, RuntimeResponseGeneric: Three new response types added, Workspace: MAYBE BREAKING workspaceID changed form required to optional BREAKING CHANGE: OutputData: BREAKING required text property removed, RuntimeEntity: BREAKING optional metadata property removed
1 parent 96e94d2 commit dc7f6a4

File tree

7 files changed

+568
-99
lines changed

7 files changed

+568
-99
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2021.
2+
* (C) Copyright IBM Corp. 2022.
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: 3.38.0-07189efd-20210827-205025
15+
* IBM OpenAPI SDK Code Generator Version: 3.46.0-a4e29da0-20220224-210428
1616
*/
1717

1818
package com.ibm.watson.assistant.v1;
@@ -109,7 +109,7 @@
109109
*/
110110
public class Assistant extends BaseService {
111111

112-
public static final String DEFAULT_SERVICE_NAME = "assistant";
112+
public static final String DEFAULT_SERVICE_NAME = "conversation";
113113

114114
public static final String DEFAULT_SERVICE_URL =
115115
"https://api.us-south.assistant.watson.cloud.ibm.com";
@@ -121,7 +121,7 @@ public class Assistant extends BaseService {
121121
* the client instance.
122122
*
123123
* @param version Release date of the API version you want to use. Specify dates in YYYY-MM-DD
124-
* format. The current version is `2021-06-14`.
124+
* format. The current version is `2021-11-27`.
125125
*/
126126
public Assistant(String version) {
127127
this(
@@ -135,7 +135,7 @@ public Assistant(String version) {
135135
* authenticator are used to configure the client instance.
136136
*
137137
* @param version Release date of the API version you want to use. Specify dates in YYYY-MM-DD
138-
* format. The current version is `2021-06-14`.
138+
* format. The current version is `2021-11-27`.
139139
* @param authenticator the {@link Authenticator} instance to be configured for this client
140140
*/
141141
public Assistant(String version, Authenticator authenticator) {
@@ -147,7 +147,7 @@ public Assistant(String version, Authenticator authenticator) {
147147
* configure the client instance.
148148
*
149149
* @param version Release date of the API version you want to use. Specify dates in YYYY-MM-DD
150-
* format. The current version is `2021-06-14`.
150+
* format. The current version is `2021-11-27`.
151151
* @param serviceName the service name to be used when configuring the client instance
152152
*/
153153
public Assistant(String version, String serviceName) {
@@ -159,7 +159,7 @@ public Assistant(String version, String serviceName) {
159159
* are used to configure the client instance.
160160
*
161161
* @param version Release date of the API version you want to use. Specify dates in YYYY-MM-DD
162-
* format. The current version is `2021-06-14`.
162+
* format. The current version is `2021-11-27`.
163163
* @param serviceName the service name to be used when configuring the client instance
164164
* @param authenticator the {@link Authenticator} instance to be configured for this client
165165
*/
@@ -174,7 +174,7 @@ public Assistant(String version, String serviceName, Authenticator authenticator
174174
* Gets the version.
175175
*
176176
* <p>Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The
177-
* current version is `2021-06-14`.
177+
* current version is `2021-11-27`.
178178
*
179179
* @return the version
180180
*/

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

Lines changed: 2 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2017, 2020.
2+
* (C) Copyright IBM Corp. 2022.
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
@@ -35,9 +35,6 @@ public class OutputData extends DynamicModel<Object> {
3535
@SerializedName("log_messages")
3636
protected List<LogMessage> logMessages;
3737

38-
@SerializedName("text")
39-
protected List<String> text;
40-
4138
@SerializedName("generic")
4239
protected List<RuntimeResponseGeneric> generic;
4340

@@ -50,15 +47,13 @@ public static class Builder {
5047
private List<String> nodesVisited;
5148
private List<DialogNodeVisitedDetails> nodesVisitedDetails;
5249
private List<LogMessage> logMessages;
53-
private List<String> text;
5450
private List<RuntimeResponseGeneric> generic;
5551
private Map<String, Object> dynamicProperties;
5652

5753
private Builder(OutputData outputData) {
5854
this.nodesVisited = outputData.nodesVisited;
5955
this.nodesVisitedDetails = outputData.nodesVisitedDetails;
6056
this.logMessages = outputData.logMessages;
61-
this.text = outputData.text;
6257
this.generic = outputData.generic;
6358
this.dynamicProperties = outputData.getProperties();
6459
}
@@ -70,11 +65,9 @@ public Builder() {}
7065
* Instantiates a new builder with required properties.
7166
*
7267
* @param logMessages the logMessages
73-
* @param text the text
7468
*/
75-
public Builder(List<LogMessage> logMessages, List<String> text) {
69+
public Builder(List<LogMessage> logMessages) {
7670
this.logMessages = logMessages;
77-
this.text = text;
7871
}
7972

8073
/**
@@ -132,21 +125,6 @@ public Builder addLogMessages(LogMessage logMessages) {
132125
return this;
133126
}
134127

135-
/**
136-
* Adds an text to text.
137-
*
138-
* @param text the new text
139-
* @return the OutputData builder
140-
*/
141-
public Builder addText(String text) {
142-
com.ibm.cloud.sdk.core.util.Validator.notNull(text, "text cannot be null");
143-
if (this.text == null) {
144-
this.text = new ArrayList<String>();
145-
}
146-
this.text.add(text);
147-
return this;
148-
}
149-
150128
/**
151129
* Adds an generic to generic.
152130
*
@@ -195,17 +173,6 @@ public Builder logMessages(List<LogMessage> logMessages) {
195173
return this;
196174
}
197175

198-
/**
199-
* Set the text. Existing text will be replaced.
200-
*
201-
* @param text the text
202-
* @return the OutputData builder
203-
*/
204-
public Builder text(List<String> text) {
205-
this.text = text;
206-
return this;
207-
}
208-
209176
/**
210177
* Set the generic. Existing generic will be replaced.
211178
*
@@ -238,11 +205,9 @@ protected OutputData(Builder builder) {
238205
super(new TypeToken<Object>() {});
239206
com.ibm.cloud.sdk.core.util.Validator.notNull(
240207
builder.logMessages, "logMessages cannot be null");
241-
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.text, "text cannot be null");
242208
nodesVisited = builder.nodesVisited;
243209
nodesVisitedDetails = builder.nodesVisitedDetails;
244210
logMessages = builder.logMessages;
245-
text = builder.text;
246211
generic = builder.generic;
247212
this.setProperties(builder.dynamicProperties);
248213
}
@@ -320,26 +285,6 @@ public void setLogMessages(final List<LogMessage> logMessages) {
320285
this.logMessages = logMessages;
321286
}
322287

323-
/**
324-
* Gets the text.
325-
*
326-
* <p>An array of responses to the user.
327-
*
328-
* @return the text
329-
*/
330-
public List<String> getText() {
331-
return this.text;
332-
}
333-
334-
/**
335-
* Sets the text.
336-
*
337-
* @param text the new text
338-
*/
339-
public void setText(final List<String> text) {
340-
this.text = text;
341-
}
342-
343288
/**
344289
* Gets the generic.
345290
*

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

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2017, 2021.
2+
* (C) Copyright IBM Corp. 2022.
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
@@ -15,7 +15,6 @@
1515
import com.ibm.cloud.sdk.core.service.model.GenericModel;
1616
import java.util.ArrayList;
1717
import java.util.List;
18-
import java.util.Map;
1918

2019
/** A term from the request that was identified as an entity. */
2120
public class RuntimeEntity extends GenericModel {
@@ -24,7 +23,6 @@ public class RuntimeEntity extends GenericModel {
2423
protected List<Long> location;
2524
protected String value;
2625
protected Double confidence;
27-
protected Map<String, Object> metadata;
2826
protected List<CaptureGroup> groups;
2927
protected RuntimeEntityInterpretation interpretation;
3028
protected List<RuntimeEntityAlternative> alternatives;
@@ -36,7 +34,6 @@ public static class Builder {
3634
private List<Long> location;
3735
private String value;
3836
private Double confidence;
39-
private Map<String, Object> metadata;
4037
private List<CaptureGroup> groups;
4138
private RuntimeEntityInterpretation interpretation;
4239
private List<RuntimeEntityAlternative> alternatives;
@@ -47,7 +44,6 @@ private Builder(RuntimeEntity runtimeEntity) {
4744
this.location = runtimeEntity.location;
4845
this.value = runtimeEntity.value;
4946
this.confidence = runtimeEntity.confidence;
50-
this.metadata = runtimeEntity.metadata;
5147
this.groups = runtimeEntity.groups;
5248
this.interpretation = runtimeEntity.interpretation;
5349
this.alternatives = runtimeEntity.alternatives;
@@ -166,17 +162,6 @@ public Builder confidence(Double confidence) {
166162
return this;
167163
}
168164

169-
/**
170-
* Set the metadata.
171-
*
172-
* @param metadata the metadata
173-
* @return the RuntimeEntity builder
174-
*/
175-
public Builder metadata(Map<String, Object> metadata) {
176-
this.metadata = metadata;
177-
return this;
178-
}
179-
180165
/**
181166
* Set the groups. Existing groups will be replaced.
182167
*
@@ -229,7 +214,6 @@ protected RuntimeEntity(Builder builder) {
229214
location = builder.location;
230215
value = builder.value;
231216
confidence = builder.confidence;
232-
metadata = builder.metadata;
233217
groups = builder.groups;
234218
interpretation = builder.interpretation;
235219
alternatives = builder.alternatives;
@@ -290,21 +274,6 @@ public Double confidence() {
290274
return confidence;
291275
}
292276

293-
/**
294-
* Gets the metadata.
295-
*
296-
* <p>**Deprecated.** Any metadata for the entity.
297-
*
298-
* <p>Beginning with the `2021-06-14` API version, the `metadata` property is no longer returned.
299-
* For information about system entities recognized in the user input, see the `interpretation`
300-
* property.
301-
*
302-
* @return the metadata
303-
*/
304-
public Map<String, Object> metadata() {
305-
return metadata;
306-
}
307-
308277
/**
309278
* Gets the groups.
310279
*

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

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2021.
2+
* (C) Copyright IBM Corp. 2022.
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
@@ -26,7 +26,9 @@
2626
* RuntimeResponseGenericRuntimeResponseTypeConnectToAgent -
2727
* RuntimeResponseGenericRuntimeResponseTypeSuggestion -
2828
* RuntimeResponseGenericRuntimeResponseTypeChannelTransfer -
29-
* RuntimeResponseGenericRuntimeResponseTypeUserDefined
29+
* RuntimeResponseGenericRuntimeResponseTypeUserDefined -
30+
* RuntimeResponseGenericRuntimeResponseTypeVideo - RuntimeResponseGenericRuntimeResponseTypeAudio -
31+
* RuntimeResponseGenericRuntimeResponseTypeIframe
3032
*/
3133
public class RuntimeResponseGeneric extends GenericModel {
3234
@SuppressWarnings("unused")
@@ -36,10 +38,12 @@ public class RuntimeResponseGeneric extends GenericModel {
3638

3739
static {
3840
discriminatorMapping = new java.util.HashMap<>();
41+
discriminatorMapping.put("audio", RuntimeResponseGenericRuntimeResponseTypeAudio.class);
3942
discriminatorMapping.put(
4043
"channel_transfer", RuntimeResponseGenericRuntimeResponseTypeChannelTransfer.class);
4144
discriminatorMapping.put(
4245
"connect_to_agent", RuntimeResponseGenericRuntimeResponseTypeConnectToAgent.class);
46+
discriminatorMapping.put("iframe", RuntimeResponseGenericRuntimeResponseTypeIframe.class);
4347
discriminatorMapping.put("image", RuntimeResponseGenericRuntimeResponseTypeImage.class);
4448
discriminatorMapping.put("option", RuntimeResponseGenericRuntimeResponseTypeOption.class);
4549
discriminatorMapping.put(
@@ -48,6 +52,7 @@ public class RuntimeResponseGeneric extends GenericModel {
4852
discriminatorMapping.put("text", RuntimeResponseGenericRuntimeResponseTypeText.class);
4953
discriminatorMapping.put(
5054
"user_defined", RuntimeResponseGenericRuntimeResponseTypeUserDefined.class);
55+
discriminatorMapping.put("video", RuntimeResponseGenericRuntimeResponseTypeVideo.class);
5156
}
5257

5358
/** The preferred type of control to display. */
@@ -97,6 +102,12 @@ public interface Preference {
97102
@SerializedName("user_defined")
98103
protected Map<String, Object> userDefined;
99104

105+
@SerializedName("channel_options")
106+
protected Map<String, Object> channelOptions;
107+
108+
@SerializedName("image_url")
109+
protected String imageUrl;
110+
100111
protected RuntimeResponseGeneric() {}
101112

102113
/**
@@ -316,4 +327,26 @@ public String messageToUser() {
316327
public Map<String, Object> userDefined() {
317328
return userDefined;
318329
}
330+
331+
/**
332+
* Gets the channelOptions.
333+
*
334+
* <p>For internal use only.
335+
*
336+
* @return the channelOptions
337+
*/
338+
public Map<String, Object> channelOptions() {
339+
return channelOptions;
340+
}
341+
342+
/**
343+
* Gets the imageUrl.
344+
*
345+
* <p>The URL of an image that shows a preview of the embedded content.
346+
*
347+
* @return the imageUrl
348+
*/
349+
public String imageUrl() {
350+
return imageUrl;
351+
}
319352
}

0 commit comments

Comments
 (0)