Skip to content

Commit c9f8db3

Browse files
authored
Merge pull request #1037 from watson-developer-cloud/release-6.14.0
Release 6.14.0
2 parents eb7fd84 + 12338db commit c9f8db3

File tree

65 files changed

+590
-192
lines changed

Some content is hidden

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

65 files changed

+590
-192
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 6.13.2
2+
current_version = 6.14.0
33
commit = True
44
message = [skip ci] docs: Update version numbers from {current_version} -> {new_version}
55

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ All the services:
6161
<dependency>
6262
<groupId>com.ibm.watson.developer_cloud</groupId>
6363
<artifactId>java-sdk</artifactId>
64-
<version>6.13.2</version>
64+
<version>6.14.0</version>
6565
</dependency>
6666
```
6767

@@ -71,7 +71,7 @@ Only Discovery:
7171
<dependency>
7272
<groupId>com.ibm.watson.developer_cloud</groupId>
7373
<artifactId>discovery</artifactId>
74-
<version>6.13.2</version>
74+
<version>6.14.0</version>
7575
</dependency>
7676
```
7777

@@ -80,13 +80,13 @@ Only Discovery:
8080
All the services:
8181

8282
```gradle
83-
'com.ibm.watson.developer_cloud:java-sdk:6.13.2'
83+
'com.ibm.watson.developer_cloud:java-sdk:6.14.0'
8484
```
8585

8686
Only Assistant:
8787

8888
```gradle
89-
'com.ibm.watson.developer_cloud:assistant:6.13.2'
89+
'com.ibm.watson.developer_cloud:assistant:6.14.0'
9090
```
9191

9292
##### Development snapshots
@@ -109,7 +109,7 @@ And then reference the snapshot version on your app module gradle
109109
Only Speech to Text:
110110

111111
```gradle
112-
'com.ibm.watson.developer_cloud:speech-to-text:6.13.3-SNAPSHOT'
112+
'com.ibm.watson.developer_cloud:speech-to-text:6.14.1-SNAPSHOT'
113113
```
114114

115115
##### JAR
@@ -388,7 +388,7 @@ Gradle:
388388

389389
```sh
390390
cd java-sdk
391-
gradle jar # build jar file (build/libs/watson-developer-cloud-6.13.2.jar)
391+
gradle jar # build jar file (build/libs/watson-developer-cloud-6.14.0.jar)
392392
gradle test # run tests
393393
gradle check # performs quality checks on source files and generates reports
394394
gradle testReport # run tests and generate the aggregated test report (build/reports/allTests)
@@ -441,4 +441,4 @@ or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson).
441441
[ibm-cloud-onboarding]: http://cloud.ibm.com/registration?target=/developer/watson&cm_sp=WatsonPlatform-WatsonServices-_-OnPageNavLink-IBMWatson_SDKs-_-Java
442442

443443

444-
[jar]: https://github.com/watson-developer-cloud/java-sdk/releases/download/java-sdk-6.13.2/java-sdk-6.13.2-jar-with-dependencies.jar
444+
[jar]: https://github.com/watson-developer-cloud/java-sdk/releases/download/java-sdk-6.14.0/java-sdk-6.14.0-jar-with-dependencies.jar

assistant/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<dependency>
88
<groupId>com.ibm.watson.developer_cloud</groupId>
99
<artifactId>assistant</artifactId>
10-
<version>6.13.2</version>
10+
<version>6.14.0</version>
1111
</dependency>
1212
```
1313

1414
##### Gradle
1515
```gradle
16-
'com.ibm.watson.developer_cloud:assistant:6.13.2'
16+
'com.ibm.watson.developer_cloud:assistant:6.14.0'
1717
```
1818

1919
## Usage

assistant/src/main/java/com/ibm/watson/developer_cloud/assistant/v1/model/MessageResponse.java

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,92 +12,100 @@
1212
*/
1313
package com.ibm.watson.developer_cloud.assistant.v1.model;
1414

15-
import java.lang.reflect.Type;
1615
import java.util.List;
1716

18-
import com.google.gson.reflect.TypeToken;
19-
import com.ibm.watson.developer_cloud.service.model.DynamicModel;
20-
import com.ibm.watson.developer_cloud.util.GsonSerializationHelper;
17+
import com.google.gson.annotations.SerializedName;
18+
import com.ibm.watson.developer_cloud.service.model.GenericModel;
2119

2220
/**
2321
* The response sent by the workspace, including the output text, detected intents and entities, and context.
2422
*/
25-
public class MessageResponse extends DynamicModel {
26-
private Type inputType = new TypeToken<MessageInput>() {
27-
}.getType();
28-
private Type intentsType = new TypeToken<List<RuntimeIntent>>() {
29-
}.getType();
30-
private Type entitiesType = new TypeToken<List<RuntimeEntity>>() {
31-
}.getType();
32-
private Type alternateIntentsType = new TypeToken<Boolean>() {
33-
}.getType();
34-
private Type contextType = new TypeToken<Context>() {
35-
}.getType();
36-
private Type outputType = new TypeToken<OutputData>() {
37-
}.getType();
38-
private Type actionsType = new TypeToken<List<DialogNodeAction>>() {
39-
}.getType();
23+
public class MessageResponse extends GenericModel {
24+
25+
private MessageInput input;
26+
private List<RuntimeIntent> intents;
27+
private List<RuntimeEntity> entities;
28+
@SerializedName("alternate_intents")
29+
private Boolean alternateIntents;
30+
private Context context;
31+
private OutputData output;
32+
private List<DialogNodeAction> actions;
4033

4134
/**
4235
* Gets the input.
4336
*
37+
* The text of the user input.
38+
*
4439
* @return the input
4540
*/
4641
public MessageInput getInput() {
47-
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("input"), inputType);
42+
return input;
4843
}
4944

5045
/**
5146
* Gets the intents.
5247
*
48+
* An array of intents recognized in the user input, sorted in descending order of confidence.
49+
*
5350
* @return the intents
5451
*/
5552
public List<RuntimeIntent> getIntents() {
56-
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("intents"), intentsType);
53+
return intents;
5754
}
5855

5956
/**
6057
* Gets the entities.
6158
*
59+
* An array of entities identified in the user input.
60+
*
6261
* @return the entities
6362
*/
6463
public List<RuntimeEntity> getEntities() {
65-
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("entities"), entitiesType);
64+
return entities;
6665
}
6766

6867
/**
6968
* Gets the alternateIntents.
7069
*
70+
* Whether to return more than one intent. A value of `true` indicates that all matching intents are returned.
71+
*
7172
* @return the alternateIntents
7273
*/
7374
public Boolean isAlternateIntents() {
74-
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("alternate_intents"), alternateIntentsType);
75+
return alternateIntents;
7576
}
7677

7778
/**
7879
* Gets the context.
7980
*
81+
* State information for the conversation. To maintain state, include the context from the previous response.
82+
*
8083
* @return the context
8184
*/
8285
public Context getContext() {
83-
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("context"), contextType);
86+
return context;
8487
}
8588

8689
/**
8790
* Gets the output.
8891
*
92+
* An output object that includes the response to the user, the dialog nodes that were triggered, and messages from
93+
* the log.
94+
*
8995
* @return the output
9096
*/
9197
public OutputData getOutput() {
92-
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("output"), outputType);
98+
return output;
9399
}
94100

95101
/**
96102
* Gets the actions.
97103
*
104+
* An array of objects describing any actions requested by the dialog node.
105+
*
98106
* @return the actions
99107
*/
100108
public List<DialogNodeAction> getActions() {
101-
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("actions"), actionsType);
109+
return actions;
102110
}
103111
}

assistant/src/test/java/com/ibm/watson/developer_cloud/assistant/v1/AssistantTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public void testSendMessage() throws IOException, InterruptedException {
166166

167167
String path = StringUtils.join(PATH_MESSAGE, "?", VERSION, "=2018-07-10");
168168
assertEquals(path, request.getPath());
169-
assertArrayEquals(new String[] { "Great choice! Playing some jazz for you." },
169+
assertArrayEquals(new String[]{"Great choice! Playing some jazz for you."},
170170
serviceResponse.getOutput().getText().toArray(new String[0]));
171171
assertEquals(request.getMethod(), "POST");
172172
assertNotNull(request.getHeader(HttpHeaders.AUTHORIZATION));
@@ -183,7 +183,6 @@ public void testSendMessage() throws IOException, InterruptedException {
183183
assertNotNull(serviceResponse.getOutput().getNodesVisitedDetails().get(0).getTitle());
184184
assertNotNull(serviceResponse.getOutput().getNodesVisitedDetails().get(0).getConditions());
185185
assertNotNull(serviceResponse.getOutput().getNodesVisitedDetails().get(0).getConditions());
186-
assertEquals(serviceResponse, mockResponse);
187186
}
188187

189188
/**
@@ -224,7 +223,6 @@ public void testSendMessageWithAlternateIntents() throws IOException, Interrupte
224223
serviceResponse.getOutput().getText().toArray(new String[0]));
225224
assertEquals(request.getMethod(), "POST");
226225
assertNotNull(request.getHeader(HttpHeaders.AUTHORIZATION));
227-
assertEquals(serviceResponse, mockResponse);
228226
}
229227

230228
/**

compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/CompareComply.java

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public CompareComply(String versionDate, IamOptions iamOptions) {
9595
/**
9696
* Convert file to HTML.
9797
*
98-
* Uploads an input file. The response includes an HTML version of the document.
98+
* Convert an uploaded file to HTML.
9999
*
100100
* @param convertToHtmlOptions the {@link ConvertToHtmlOptions} containing the options for the call
101101
* @return a {@link ServiceCall} with a response type of {@link HTMLReturn}
@@ -122,7 +122,7 @@ public ServiceCall<HTMLReturn> convertToHtml(ConvertToHtmlOptions convertToHtmlO
122122
/**
123123
* Classify the elements of a document.
124124
*
125-
* Uploads a file. The response includes an analysis of the document's structural and semantic elements.
125+
* Analyze an uploaded file's structural and semantic elements.
126126
*
127127
* @param classifyElementsOptions the {@link ClassifyElementsOptions} containing the options for the call
128128
* @return a {@link ServiceCall} with a response type of {@link ClassifyReturn}
@@ -149,7 +149,7 @@ public ServiceCall<ClassifyReturn> classifyElements(ClassifyElementsOptions clas
149149
/**
150150
* Extract a document's tables.
151151
*
152-
* Uploads a file. The response includes an analysis of the document's tables.
152+
* Extract and analyze an uploaded file's tables.
153153
*
154154
* @param extractTablesOptions the {@link ExtractTablesOptions} containing the options for the call
155155
* @return a {@link ServiceCall} with a response type of {@link TableReturn}
@@ -176,8 +176,7 @@ public ServiceCall<TableReturn> extractTables(ExtractTablesOptions extractTables
176176
/**
177177
* Compare two documents.
178178
*
179-
* Uploads two input files. The response includes JSON comparing the two documents. Uploaded files must be in the same
180-
* file format.
179+
* Compare two uploaded input files. Uploaded files must be in the same file format.
181180
*
182181
* @param compareDocumentsOptions the {@link CompareDocumentsOptions} containing the options for the call
183182
* @return a {@link ServiceCall} with a response type of {@link CompareReturn}
@@ -360,10 +359,9 @@ public ServiceCall<FeedbackList> listFeedback() {
360359
*
361360
* Run Compare and Comply methods over a collection of input documents.
362361
* **Important:** Batch processing requires the use of the [IBM Cloud Object Storage
363-
* service]
364-
* (https://console.bluemix.net/docs/services/cloud-object-storage/about-cos.html#about-ibm-cloud-object-storage).
362+
* service](https://cloud.ibm.com/docs/services/cloud-object-storage/about-cos.html#about-ibm-cloud-object-storage).
365363
* The use of IBM Cloud Object Storage with Compare and Comply is discussed at [Using batch
366-
* processing](https://console.bluemix.net/docs/services/compare-comply/batching.html#before-you-batch).
364+
* processing](https://cloud.ibm.com/docs/services/compare-comply/batching.html#before-you-batch).
367365
*
368366
* @param createBatchOptions the {@link CreateBatchOptions} containing the options for the call
369367
* @return a {@link ServiceCall} with a response type of {@link BatchStatus}
@@ -398,9 +396,9 @@ public ServiceCall<BatchStatus> createBatch(CreateBatchOptions createBatchOption
398396
}
399397

400398
/**
401-
* Gets information about a specific batch-processing request.
399+
* Get information about a specific batch-processing request.
402400
*
403-
* Gets information about a batch-processing request with a specified ID.
401+
* Get information about a batch-processing request with a specified ID.
404402
*
405403
* @param getBatchOptions the {@link GetBatchOptions} containing the options for the call
406404
* @return a {@link ServiceCall} with a response type of {@link BatchStatus}
@@ -417,9 +415,9 @@ public ServiceCall<BatchStatus> getBatch(GetBatchOptions getBatchOptions) {
417415
}
418416

419417
/**
420-
* Gets the list of submitted batch-processing jobs.
418+
* List submitted batch-processing jobs.
421419
*
422-
* Gets the list of batch-processing jobs submitted by users.
420+
* List the batch-processing jobs submitted by users.
423421
*
424422
* @param listBatchesOptions the {@link ListBatchesOptions} containing the options for the call
425423
* @return a {@link ServiceCall} with a response type of {@link Batches}
@@ -436,9 +434,9 @@ public ServiceCall<Batches> listBatches(ListBatchesOptions listBatchesOptions) {
436434
}
437435

438436
/**
439-
* Gets the list of submitted batch-processing jobs.
437+
* List submitted batch-processing jobs.
440438
*
441-
* Gets the list of batch-processing jobs submitted by users.
439+
* List the batch-processing jobs submitted by users.
442440
*
443441
* @return a {@link ServiceCall} with a response type of {@link Batches}
444442
*/
@@ -447,9 +445,9 @@ public ServiceCall<Batches> listBatches() {
447445
}
448446

449447
/**
450-
* Updates a pending or active batch-processing request.
448+
* Update a pending or active batch-processing request.
451449
*
452-
* Updates a pending or active batch-processing request. You can rescan the input bucket to check for new documents or
450+
* Update a pending or active batch-processing request. You can rescan the input bucket to check for new documents or
453451
* cancel a request.
454452
*
455453
* @param updateBatchOptions the {@link UpdateBatchOptions} containing the options for the call

compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/Attribute.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
public class Attribute extends GenericModel {
2121

2222
/**
23-
* The type of attribute. Possible values are `Currency`, `DateTime`, `Location`, `Organization`, and `Person`.
23+
* The type of attribute.
2424
*/
2525
public interface Type {
26+
/** Address. */
27+
String ADDRESS = "Address";
2628
/** Currency. */
2729
String CURRENCY = "Currency";
2830
/** DateTime. */
@@ -42,7 +44,7 @@ public interface Type {
4244
/**
4345
* Gets the type.
4446
*
45-
* The type of attribute. Possible values are `Currency`, `DateTime`, `Location`, `Organization`, and `Person`.
47+
* The type of attribute.
4648
*
4749
* @return the type
4850
*/

compare-comply/src/main/java/com/ibm/watson/developer_cloud/compare_comply/v1/model/BodyCells.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public class BodyCells extends GenericModel {
4646
private List<String> columnHeaderTexts;
4747
@SerializedName("column_header_texts_normalized")
4848
private List<String> columnHeaderTextsNormalized;
49+
private List<Attribute> attributes;
4950

5051
/**
5152
* Gets the cellId.
@@ -193,4 +194,13 @@ public List<String> getColumnHeaderTexts() {
193194
public List<String> getColumnHeaderTextsNormalized() {
194195
return columnHeaderTextsNormalized;
195196
}
197+
198+
/**
199+
* Gets the attributes.
200+
*
201+
* @return the attributes
202+
*/
203+
public List<Attribute> getAttributes() {
204+
return attributes;
205+
}
196206
}

0 commit comments

Comments
 (0)