Skip to content

Commit

Permalink
Merge pull request #1037 from watson-developer-cloud/release-6.14.0
Browse files Browse the repository at this point in the history
Release 6.14.0
  • Loading branch information
lpatino10 authored Feb 5, 2019
2 parents eb7fd84 + 12338db commit c9f8db3
Show file tree
Hide file tree
Showing 65 changed files with 590 additions and 192 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 6.13.2
current_version = 6.14.0
commit = True
message = [skip ci] docs: Update version numbers from {current_version} -> {new_version}

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ All the services:
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>java-sdk</artifactId>
<version>6.13.2</version>
<version>6.14.0</version>
</dependency>
```

Expand All @@ -71,7 +71,7 @@ Only Discovery:
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>discovery</artifactId>
<version>6.13.2</version>
<version>6.14.0</version>
</dependency>
```

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

```gradle
'com.ibm.watson.developer_cloud:java-sdk:6.13.2'
'com.ibm.watson.developer_cloud:java-sdk:6.14.0'
```

Only Assistant:

```gradle
'com.ibm.watson.developer_cloud:assistant:6.13.2'
'com.ibm.watson.developer_cloud:assistant:6.14.0'
```

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

```gradle
'com.ibm.watson.developer_cloud:speech-to-text:6.13.3-SNAPSHOT'
'com.ibm.watson.developer_cloud:speech-to-text:6.14.1-SNAPSHOT'
```

##### JAR
Expand Down Expand Up @@ -388,7 +388,7 @@ Gradle:

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


[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
[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
4 changes: 2 additions & 2 deletions assistant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>assistant</artifactId>
<version>6.13.2</version>
<version>6.14.0</version>
</dependency>
```

##### Gradle
```gradle
'com.ibm.watson.developer_cloud:assistant:6.13.2'
'com.ibm.watson.developer_cloud:assistant:6.14.0'
```

## Usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,92 +12,100 @@
*/
package com.ibm.watson.developer_cloud.assistant.v1.model;

import java.lang.reflect.Type;
import java.util.List;

import com.google.gson.reflect.TypeToken;
import com.ibm.watson.developer_cloud.service.model.DynamicModel;
import com.ibm.watson.developer_cloud.util.GsonSerializationHelper;
import com.google.gson.annotations.SerializedName;
import com.ibm.watson.developer_cloud.service.model.GenericModel;

/**
* The response sent by the workspace, including the output text, detected intents and entities, and context.
*/
public class MessageResponse extends DynamicModel {
private Type inputType = new TypeToken<MessageInput>() {
}.getType();
private Type intentsType = new TypeToken<List<RuntimeIntent>>() {
}.getType();
private Type entitiesType = new TypeToken<List<RuntimeEntity>>() {
}.getType();
private Type alternateIntentsType = new TypeToken<Boolean>() {
}.getType();
private Type contextType = new TypeToken<Context>() {
}.getType();
private Type outputType = new TypeToken<OutputData>() {
}.getType();
private Type actionsType = new TypeToken<List<DialogNodeAction>>() {
}.getType();
public class MessageResponse extends GenericModel {

private MessageInput input;
private List<RuntimeIntent> intents;
private List<RuntimeEntity> entities;
@SerializedName("alternate_intents")
private Boolean alternateIntents;
private Context context;
private OutputData output;
private List<DialogNodeAction> actions;

/**
* Gets the input.
*
* The text of the user input.
*
* @return the input
*/
public MessageInput getInput() {
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("input"), inputType);
return input;
}

/**
* Gets the intents.
*
* An array of intents recognized in the user input, sorted in descending order of confidence.
*
* @return the intents
*/
public List<RuntimeIntent> getIntents() {
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("intents"), intentsType);
return intents;
}

/**
* Gets the entities.
*
* An array of entities identified in the user input.
*
* @return the entities
*/
public List<RuntimeEntity> getEntities() {
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("entities"), entitiesType);
return entities;
}

/**
* Gets the alternateIntents.
*
* Whether to return more than one intent. A value of `true` indicates that all matching intents are returned.
*
* @return the alternateIntents
*/
public Boolean isAlternateIntents() {
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("alternate_intents"), alternateIntentsType);
return alternateIntents;
}

/**
* Gets the context.
*
* State information for the conversation. To maintain state, include the context from the previous response.
*
* @return the context
*/
public Context getContext() {
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("context"), contextType);
return context;
}

/**
* Gets the output.
*
* An output object that includes the response to the user, the dialog nodes that were triggered, and messages from
* the log.
*
* @return the output
*/
public OutputData getOutput() {
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("output"), outputType);
return output;
}

/**
* Gets the actions.
*
* An array of objects describing any actions requested by the dialog node.
*
* @return the actions
*/
public List<DialogNodeAction> getActions() {
return GsonSerializationHelper.serializeDynamicModelProperty(this.get("actions"), actionsType);
return actions;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void testSendMessage() throws IOException, InterruptedException {

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

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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public CompareComply(String versionDate, IamOptions iamOptions) {
/**
* Convert file to HTML.
*
* Uploads an input file. The response includes an HTML version of the document.
* Convert an uploaded file to HTML.
*
* @param convertToHtmlOptions the {@link ConvertToHtmlOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link HTMLReturn}
Expand All @@ -122,7 +122,7 @@ public ServiceCall<HTMLReturn> convertToHtml(ConvertToHtmlOptions convertToHtmlO
/**
* Classify the elements of a document.
*
* Uploads a file. The response includes an analysis of the document's structural and semantic elements.
* Analyze an uploaded file's structural and semantic elements.
*
* @param classifyElementsOptions the {@link ClassifyElementsOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link ClassifyReturn}
Expand All @@ -149,7 +149,7 @@ public ServiceCall<ClassifyReturn> classifyElements(ClassifyElementsOptions clas
/**
* Extract a document's tables.
*
* Uploads a file. The response includes an analysis of the document's tables.
* Extract and analyze an uploaded file's tables.
*
* @param extractTablesOptions the {@link ExtractTablesOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link TableReturn}
Expand All @@ -176,8 +176,7 @@ public ServiceCall<TableReturn> extractTables(ExtractTablesOptions extractTables
/**
* Compare two documents.
*
* Uploads two input files. The response includes JSON comparing the two documents. Uploaded files must be in the same
* file format.
* Compare two uploaded input files. Uploaded files must be in the same file format.
*
* @param compareDocumentsOptions the {@link CompareDocumentsOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link CompareReturn}
Expand Down Expand Up @@ -360,10 +359,9 @@ public ServiceCall<FeedbackList> listFeedback() {
*
* Run Compare and Comply methods over a collection of input documents.
* **Important:** Batch processing requires the use of the [IBM Cloud Object Storage
* service]
* (https://console.bluemix.net/docs/services/cloud-object-storage/about-cos.html#about-ibm-cloud-object-storage).
* service](https://cloud.ibm.com/docs/services/cloud-object-storage/about-cos.html#about-ibm-cloud-object-storage).
* The use of IBM Cloud Object Storage with Compare and Comply is discussed at [Using batch
* processing](https://console.bluemix.net/docs/services/compare-comply/batching.html#before-you-batch).
* processing](https://cloud.ibm.com/docs/services/compare-comply/batching.html#before-you-batch).
*
* @param createBatchOptions the {@link CreateBatchOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link BatchStatus}
Expand Down Expand Up @@ -398,9 +396,9 @@ public ServiceCall<BatchStatus> createBatch(CreateBatchOptions createBatchOption
}

/**
* Gets information about a specific batch-processing request.
* Get information about a specific batch-processing request.
*
* Gets information about a batch-processing request with a specified ID.
* Get information about a batch-processing request with a specified ID.
*
* @param getBatchOptions the {@link GetBatchOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link BatchStatus}
Expand All @@ -417,9 +415,9 @@ public ServiceCall<BatchStatus> getBatch(GetBatchOptions getBatchOptions) {
}

/**
* Gets the list of submitted batch-processing jobs.
* List submitted batch-processing jobs.
*
* Gets the list of batch-processing jobs submitted by users.
* List the batch-processing jobs submitted by users.
*
* @param listBatchesOptions the {@link ListBatchesOptions} containing the options for the call
* @return a {@link ServiceCall} with a response type of {@link Batches}
Expand All @@ -436,9 +434,9 @@ public ServiceCall<Batches> listBatches(ListBatchesOptions listBatchesOptions) {
}

/**
* Gets the list of submitted batch-processing jobs.
* List submitted batch-processing jobs.
*
* Gets the list of batch-processing jobs submitted by users.
* List the batch-processing jobs submitted by users.
*
* @return a {@link ServiceCall} with a response type of {@link Batches}
*/
Expand All @@ -447,9 +445,9 @@ public ServiceCall<Batches> listBatches() {
}

/**
* Updates a pending or active batch-processing request.
* Update a pending or active batch-processing request.
*
* Updates a pending or active batch-processing request. You can rescan the input bucket to check for new documents or
* Update a pending or active batch-processing request. You can rescan the input bucket to check for new documents or
* cancel a request.
*
* @param updateBatchOptions the {@link UpdateBatchOptions} containing the options for the call
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
public class Attribute extends GenericModel {

/**
* The type of attribute. Possible values are `Currency`, `DateTime`, `Location`, `Organization`, and `Person`.
* The type of attribute.
*/
public interface Type {
/** Address. */
String ADDRESS = "Address";
/** Currency. */
String CURRENCY = "Currency";
/** DateTime. */
Expand All @@ -42,7 +44,7 @@ public interface Type {
/**
* Gets the type.
*
* The type of attribute. Possible values are `Currency`, `DateTime`, `Location`, `Organization`, and `Person`.
* The type of attribute.
*
* @return the type
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class BodyCells extends GenericModel {
private List<String> columnHeaderTexts;
@SerializedName("column_header_texts_normalized")
private List<String> columnHeaderTextsNormalized;
private List<Attribute> attributes;

/**
* Gets the cellId.
Expand Down Expand Up @@ -193,4 +194,13 @@ public List<String> getColumnHeaderTexts() {
public List<String> getColumnHeaderTextsNormalized() {
return columnHeaderTextsNormalized;
}

/**
* Gets the attributes.
*
* @return the attributes
*/
public List<Attribute> getAttributes() {
return attributes;
}
}
Loading

0 comments on commit c9f8db3

Please sign in to comment.