Skip to content

Commit f411623

Browse files
authored
Merge pull request #1001 from watson-developer-cloud/codegen-updates
Release 6.9.0
2 parents a2aeb7e + 4c549e0 commit f411623

File tree

79 files changed

+1433
-613
lines changed

Some content is hidden

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

79 files changed

+1433
-613
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.8.0
2+
current_version = 6.9.0
33
commit = True
44
message = 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
@@ -60,7 +60,7 @@ All the services:
6060
<dependency>
6161
<groupId>com.ibm.watson.developer_cloud</groupId>
6262
<artifactId>java-sdk</artifactId>
63-
<version>6.8.0</version>
63+
<version>6.9.0</version>
6464
</dependency>
6565
```
6666

@@ -70,7 +70,7 @@ Only Discovery:
7070
<dependency>
7171
<groupId>com.ibm.watson.developer_cloud</groupId>
7272
<artifactId>discovery</artifactId>
73-
<version>6.8.0</version>
73+
<version>6.9.0</version>
7474
</dependency>
7575
```
7676

@@ -79,13 +79,13 @@ Only Discovery:
7979
All the services:
8080

8181
```gradle
82-
'com.ibm.watson.developer_cloud:java-sdk:6.8.0'
82+
'com.ibm.watson.developer_cloud:java-sdk:6.9.0'
8383
```
8484

8585
Only Assistant:
8686

8787
```gradle
88-
'com.ibm.watson.developer_cloud:assistant:6.8.0'
88+
'com.ibm.watson.developer_cloud:assistant:6.9.0'
8989
```
9090

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

110110
```gradle
111-
'com.ibm.watson.developer_cloud:speech-to-text:6.8.1-SNAPSHOT'
111+
'com.ibm.watson.developer_cloud:speech-to-text:6.9.1-SNAPSHOT'
112112
```
113113

114114
##### JAR
@@ -347,7 +347,7 @@ Gradle:
347347

348348
```sh
349349
cd java-sdk
350-
gradle jar # build jar file (build/libs/watson-developer-cloud-6.8.0.jar)
350+
gradle jar # build jar file (build/libs/watson-developer-cloud-6.9.0.jar)
351351
gradle test # run tests
352352
gradle check # performs quality checks on source files and generates reports
353353
gradle testReport # run tests and generate the aggregated test report (build/reports/allTests)
@@ -400,4 +400,4 @@ or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson).
400400
[ibm-cloud-onboarding]: http://console.bluemix.net/registration?target=/developer/watson&cm_sp=WatsonPlatform-WatsonServices-_-OnPageNavLink-IBMWatson_SDKs-_-Java
401401

402402

403-
[jar]: https://github.com/watson-developer-cloud/java-sdk/releases/download/java-sdk-6.8.0/java-sdk-6.8.0-jar-with-dependencies.jar
403+
[jar]: https://github.com/watson-developer-cloud/java-sdk/releases/download/java-sdk-6.9.0/java-sdk-6.9.0-jar-with-dependencies.jar

assistant/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ This service is currently in **private beta** and requires access to use. To lea
1010
<dependency>
1111
<groupId>com.ibm.watson.developer_cloud</groupId>
1212
<artifactId>assistant</artifactId>
13-
<version>6.8.0</version>
13+
<version>6.9.0</version>
1414
</dependency>
1515
```
1616

1717
##### Gradle
1818
```gradle
19-
'com.ibm.watson.developer_cloud:assistant:6.8.0'
19+
'com.ibm.watson.developer_cloud:assistant:6.9.0'
2020
```
2121

2222
## Usage

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ public interface ActionType {
3030
String CLIENT = "client";
3131
/** server. */
3232
String SERVER = "server";
33+
/** cloud_function. */
34+
String CLOUD_FUNCTION = "cloud_function";
35+
/** web_action. */
36+
String WEB_ACTION = "web_action";
3337
}
3438

3539
private String name;

assistant/src/main/java/com/ibm/watson/developer_cloud/assistant/v2/model/DialogNodeAction.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ public interface ActionType {
3030
String CLIENT = "client";
3131
/** server. */
3232
String SERVER = "server";
33+
/** web-action. */
34+
String WEB_ACTION = "web-action";
35+
/** cloud-function. */
36+
String CLOUD_FUNCTION = "cloud-function";
3337
}
3438

3539
private String name;

assistant/src/test/java/com/ibm/watson/developer_cloud/assistant/v2/AssistantServiceIT.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.ibm.watson.developer_cloud.assistant.v2.model.SessionResponse;
2424
import com.ibm.watson.developer_cloud.util.RetryRunner;
2525
import org.junit.Before;
26+
import org.junit.Ignore;
2627
import org.junit.Test;
2728
import org.junit.runner.RunWith;
2829

@@ -48,7 +49,11 @@ public void setUp() throws Exception {
4849
this.assistantId = getAssistantId();
4950
}
5051

52+
/**
53+
* Ignoring while I wait to get access to a new instance for Java SDK testing.
54+
*/
5155
@Test
56+
@Ignore
5257
public void testSendMessages() {
5358
// get session ID
5459
CreateSessionOptions createSessionOptions = new CreateSessionOptions.Builder()

config.properties.enc

0 Bytes
Binary file not shown.

conversation/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Conversation will be removed in the next major release. Please migrate to Assist
1010
<dependency>
1111
<groupId>com.ibm.watson.developer_cloud</groupId>
1212
<artifactId>conversation</artifactId>
13-
<version>6.8.0</version>
13+
<version>6.9.0</version>
1414
</dependency>
1515
```
1616

1717
##### Gradle
1818
```gradle
19-
'com.ibm.watson.developer_cloud:conversation:6.8.0'
19+
'com.ibm.watson.developer_cloud:conversation:6.9.0'
2020
```
2121

2222
## Usage

discovery/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>discovery</artifactId>
10-
<version>6.8.0</version>
10+
<version>6.9.0</version>
1111
</dependency>
1212
```
1313

1414
##### Gradle
1515
```gradle
16-
'com.ibm.watson.developer_cloud:discovery:6.8.0'
16+
'com.ibm.watson.developer_cloud:discovery:6.9.0'
1717
```
1818

1919
## Usage

discovery/src/main/java/com/ibm/watson/developer_cloud/discovery/v1/Discovery.java

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.ibm.watson.developer_cloud.discovery.v1.model.CreateEventOptions;
2525
import com.ibm.watson.developer_cloud.discovery.v1.model.CreateEventResponse;
2626
import com.ibm.watson.developer_cloud.discovery.v1.model.CreateExpansionsOptions;
27+
import com.ibm.watson.developer_cloud.discovery.v1.model.CreateTokenizationDictionaryOptions;
2728
import com.ibm.watson.developer_cloud.discovery.v1.model.CreateTrainingExampleOptions;
2829
import com.ibm.watson.developer_cloud.discovery.v1.model.Credentials;
2930
import com.ibm.watson.developer_cloud.discovery.v1.model.CredentialsList;
@@ -34,6 +35,7 @@
3435
import com.ibm.watson.developer_cloud.discovery.v1.model.DeleteDocumentOptions;
3536
import com.ibm.watson.developer_cloud.discovery.v1.model.DeleteEnvironmentOptions;
3637
import com.ibm.watson.developer_cloud.discovery.v1.model.DeleteExpansionsOptions;
38+
import com.ibm.watson.developer_cloud.discovery.v1.model.DeleteTokenizationDictionaryOptions;
3739
import com.ibm.watson.developer_cloud.discovery.v1.model.DeleteTrainingDataOptions;
3840
import com.ibm.watson.developer_cloud.discovery.v1.model.DeleteTrainingExampleOptions;
3941
import com.ibm.watson.developer_cloud.discovery.v1.model.DeleteUserDataOptions;
@@ -53,6 +55,7 @@
5355
import com.ibm.watson.developer_cloud.discovery.v1.model.GetMetricsQueryNoResultsOptions;
5456
import com.ibm.watson.developer_cloud.discovery.v1.model.GetMetricsQueryOptions;
5557
import com.ibm.watson.developer_cloud.discovery.v1.model.GetMetricsQueryTokenEventOptions;
58+
import com.ibm.watson.developer_cloud.discovery.v1.model.GetTokenizationDictionaryStatusOptions;
5659
import com.ibm.watson.developer_cloud.discovery.v1.model.GetTrainingDataOptions;
5760
import com.ibm.watson.developer_cloud.discovery.v1.model.GetTrainingExampleOptions;
5861
import com.ibm.watson.developer_cloud.discovery.v1.model.ListCollectionFieldsOptions;
@@ -82,6 +85,7 @@
8285
import com.ibm.watson.developer_cloud.discovery.v1.model.QueryResponse;
8386
import com.ibm.watson.developer_cloud.discovery.v1.model.TestConfigurationInEnvironmentOptions;
8487
import com.ibm.watson.developer_cloud.discovery.v1.model.TestDocument;
88+
import com.ibm.watson.developer_cloud.discovery.v1.model.TokenDictStatusResponse;
8589
import com.ibm.watson.developer_cloud.discovery.v1.model.TrainingDataSet;
8690
import com.ibm.watson.developer_cloud.discovery.v1.model.TrainingExample;
8791
import com.ibm.watson.developer_cloud.discovery.v1.model.TrainingExampleList;
@@ -656,6 +660,33 @@ public ServiceCall<Expansions> createExpansions(CreateExpansionsOptions createEx
656660
return createServiceCall(builder.build(), ResponseConverterUtils.getObject(Expansions.class));
657661
}
658662

663+
/**
664+
* Create tokenization dictionary.
665+
*
666+
* Upload a custom tokenization dictionary to use with the specified collection.
667+
*
668+
* @param createTokenizationDictionaryOptions the {@link CreateTokenizationDictionaryOptions} containing the options
669+
* for the call
670+
* @return a {@link ServiceCall} with a response type of {@link TokenDictStatusResponse}
671+
*/
672+
public ServiceCall<TokenDictStatusResponse> createTokenizationDictionary(
673+
CreateTokenizationDictionaryOptions createTokenizationDictionaryOptions) {
674+
Validator.notNull(createTokenizationDictionaryOptions, "createTokenizationDictionaryOptions cannot be null");
675+
String[] pathSegments = { "v1/environments", "collections", "word_lists/tokenization_dictionary" };
676+
String[] pathParameters = { createTokenizationDictionaryOptions.environmentId(), createTokenizationDictionaryOptions
677+
.collectionId() };
678+
RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments,
679+
pathParameters));
680+
builder.query(VERSION, versionDate);
681+
final JsonObject contentJson = new JsonObject();
682+
if (createTokenizationDictionaryOptions.tokenizationRules() != null) {
683+
contentJson.add("tokenization_rules", GsonSingleton.getGson().toJsonTree(createTokenizationDictionaryOptions
684+
.tokenizationRules()));
685+
}
686+
builder.bodyJson(contentJson);
687+
return createServiceCall(builder.build(), ResponseConverterUtils.getObject(TokenDictStatusResponse.class));
688+
}
689+
659690
/**
660691
* Delete the expansion list.
661692
*
@@ -675,6 +706,48 @@ public ServiceCall<Void> deleteExpansions(DeleteExpansionsOptions deleteExpansio
675706
return createServiceCall(builder.build(), ResponseConverterUtils.getVoid());
676707
}
677708

709+
/**
710+
* Delete tokenization dictionary.
711+
*
712+
* Delete the tokenization dictionary from the collection.
713+
*
714+
* @param deleteTokenizationDictionaryOptions the {@link DeleteTokenizationDictionaryOptions} containing the options
715+
* for the call
716+
* @return a {@link ServiceCall} with a response type of Void
717+
*/
718+
public ServiceCall<Void> deleteTokenizationDictionary(
719+
DeleteTokenizationDictionaryOptions deleteTokenizationDictionaryOptions) {
720+
Validator.notNull(deleteTokenizationDictionaryOptions, "deleteTokenizationDictionaryOptions cannot be null");
721+
String[] pathSegments = { "v1/environments", "collections", "word_lists/tokenization_dictionary" };
722+
String[] pathParameters = { deleteTokenizationDictionaryOptions.environmentId(), deleteTokenizationDictionaryOptions
723+
.collectionId() };
724+
RequestBuilder builder = RequestBuilder.delete(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments,
725+
pathParameters));
726+
builder.query(VERSION, versionDate);
727+
return createServiceCall(builder.build(), ResponseConverterUtils.getVoid());
728+
}
729+
730+
/**
731+
* Get tokenization dictionary status.
732+
*
733+
* Returns the current status of the tokenization dictionary for the specified collection.
734+
*
735+
* @param getTokenizationDictionaryStatusOptions the {@link GetTokenizationDictionaryStatusOptions} containing the
736+
* options for the call
737+
* @return a {@link ServiceCall} with a response type of {@link TokenDictStatusResponse}
738+
*/
739+
public ServiceCall<TokenDictStatusResponse> getTokenizationDictionaryStatus(
740+
GetTokenizationDictionaryStatusOptions getTokenizationDictionaryStatusOptions) {
741+
Validator.notNull(getTokenizationDictionaryStatusOptions, "getTokenizationDictionaryStatusOptions cannot be null");
742+
String[] pathSegments = { "v1/environments", "collections", "word_lists/tokenization_dictionary" };
743+
String[] pathParameters = { getTokenizationDictionaryStatusOptions.environmentId(),
744+
getTokenizationDictionaryStatusOptions.collectionId() };
745+
RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments,
746+
pathParameters));
747+
builder.query(VERSION, versionDate);
748+
return createServiceCall(builder.build(), ResponseConverterUtils.getObject(TokenDictStatusResponse.class));
749+
}
750+
678751
/**
679752
* Get the expansion list.
680753
*

0 commit comments

Comments
 (0)