Skip to content

Commit 99cbfac

Browse files
authored
Merge pull request #1100 from watson-developer-cloud/release-8.2.0
Release 8.2.0
2 parents 08f3359 + 675e651 commit 99cbfac

File tree

752 files changed

+4737
-3985
lines changed

Some content is hidden

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

752 files changed

+4737
-3985
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ model_result.mlmodel
3131
.openapi-generator/
3232
package-lock.json
3333
.pre-commit-config.yaml
34-
.secrets.baseline
34+
.secrets.baseline
35+
*.test-metadata.txt
36+
*.py

.releaserc

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"branch": "master",
3-
"tagFormat": "java-sdk-${version}",
43
"debug": true,
54
"plugins": [
65
"@semantic-release/commit-analyzer",

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[![Build Status](https://travis-ci.org/watson-developer-cloud/java-sdk.svg?branch=master)](https://travis-ci.org/watson-developer-cloud/java-sdk)
55
[![Slack](https://wdc-slack-inviter.mybluemix.net/badge.svg)](https://wdc-slack-inviter.mybluemix.net)
6-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.ibm.watson/java-sdk/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.ibm.watson/java-sdk)
6+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.ibm.watson/ibm-watson/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.ibm.watson/ibm-watson)
77
[![CLA assistant](https://cla-assistant.io/readme/badge/watson-developer-cloud/java-sdk)](https://cla-assistant.io/watson-developer-cloud/java-sdk)
88

99
Java client library to use the [Watson APIs][wdc].

assistant/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ task sourcesJar(type: Jar) {
2727
}
2828

2929
repositories {
30-
maven { url "http://repo.maven.apache.org/maven2" }
30+
maven { url "https://repo.maven.apache.org/maven2" }
3131
maven { url "https://dl.bintray.com/ibm-cloud-sdks/ibm-cloud-sdk-repo" }
3232
}
3333

@@ -60,7 +60,7 @@ checkstyle {
6060
dependencies {
6161
compile project(':common')
6262
testCompile project(':common').sourceSets.test.output
63-
compile 'com.ibm.cloud:sdk-core:7.1.0'
63+
compile 'com.ibm.cloud:sdk-core:8.1.0'
6464
signature 'org.codehaus.mojo.signature:java17:1.0@signature'
6565
}
6666

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

+37-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019.
2+
* (C) Copyright IBM Corp. 2019, 2020.
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
@@ -99,36 +99,61 @@
9999
*/
100100
public class Assistant extends BaseService {
101101

102-
private static final String SERVICE_NAME = "assistant";
103-
private static final String SERVICE_URL = "https://gateway.watsonplatform.net/assistant/api";
102+
private static final String DEFAULT_SERVICE_NAME = "assistant";
103+
104+
private static final String DEFAULT_SERVICE_URL = "https://gateway.watsonplatform.net/assistant/api";
104105

105106
private String versionDate;
106107

107108
/**
108-
* Constructs a new `Assistant` client.
109+
* Constructs a new `Assistant` client using the DEFAULT_SERVICE_NAME.
109110
*
110111
* @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
111112
* calls from failing when the service introduces breaking changes.
112113
*/
113114
public Assistant(String versionDate) {
114-
this(versionDate, ConfigBasedAuthenticatorFactory.getAuthenticator(SERVICE_NAME));
115+
this(versionDate, DEFAULT_SERVICE_NAME, ConfigBasedAuthenticatorFactory.getAuthenticator(DEFAULT_SERVICE_NAME));
115116
}
116117

117118
/**
118-
* Constructs a new `Assistant` client with the specified Authenticator.
119+
* Constructs a new `Assistant` client with the DEFAULT_SERVICE_NAME
120+
* and the specified Authenticator.
119121
*
120122
* @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
121123
* calls from failing when the service introduces breaking changes.
122124
* @param authenticator the Authenticator instance to be configured for this service
123125
*/
124126
public Assistant(String versionDate, Authenticator authenticator) {
125-
super(SERVICE_NAME, authenticator);
126-
if ((getServiceUrl() == null) || getServiceUrl().isEmpty()) {
127-
setServiceUrl(SERVICE_URL);
128-
}
127+
this(versionDate, DEFAULT_SERVICE_NAME, authenticator);
128+
}
129+
130+
/**
131+
* Constructs a new `Assistant` client with the specified serviceName.
132+
*
133+
* @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
134+
* calls from failing when the service introduces breaking changes.
135+
* @param serviceName The name of the service to configure.
136+
*/
137+
public Assistant(String versionDate, String serviceName) {
138+
this(versionDate, serviceName, ConfigBasedAuthenticatorFactory.getAuthenticator(serviceName));
139+
}
140+
141+
/**
142+
* Constructs a new `Assistant` client with the specified Authenticator
143+
* and serviceName.
144+
*
145+
* @param versionDate The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
146+
* calls from failing when the service introduces breaking changes.
147+
* @param serviceName The name of the service to configure.
148+
* @param authenticator the Authenticator instance to be configured for this service
149+
*/
150+
public Assistant(String versionDate, String serviceName, Authenticator authenticator) {
151+
super(serviceName, authenticator);
152+
setServiceUrl(DEFAULT_SERVICE_URL);
129153
com.ibm.cloud.sdk.core.util.Validator.isTrue((versionDate != null) && !versionDate.isEmpty(),
130154
"version cannot be null.");
131155
this.versionDate = versionDate;
156+
this.configureService(serviceName);
132157
}
133158

134159
/**
@@ -2039,6 +2064,8 @@ public ServiceCall<LogCollection> listAllLogs(ListAllLogsOptions listAllLogsOpti
20392064
* For more information about personal data and customer IDs, see [Information
20402065
* security](https://cloud.ibm.com/docs/services/assistant?topic=assistant-information-security#information-security).
20412066
*
2067+
* This operation is limited to 4 requests per minute. For more information, see **Rate limiting**.
2068+
*
20422069
* @param deleteUserDataOptions the {@link DeleteUserDataOptions} containing the options for the call
20432070
* @return a {@link ServiceCall} with a response type of Void
20442071
*/

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019.
2+
* (C) Copyright IBM Corp. 2018, 2020.
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
@@ -22,8 +22,8 @@
2222
*/
2323
public class CaptureGroup extends GenericModel {
2424

25-
private String group;
26-
private List<Long> location;
25+
protected String group;
26+
protected List<Long> location;
2727

2828
/**
2929
* Builder.
@@ -101,7 +101,7 @@ public Builder location(List<Long> location) {
101101
}
102102
}
103103

104-
private CaptureGroup(Builder builder) {
104+
protected CaptureGroup(Builder builder) {
105105
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.group,
106106
"group cannot be null");
107107
group = builder.group;

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

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019.
2+
* (C) Copyright IBM Corp. 2017, 2020.
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
@@ -20,12 +20,13 @@
2020
* State information for the conversation. To maintain state, include the context from the previous response.
2121
*/
2222
public class Context extends DynamicModel<Object> {
23+
2324
@SerializedName("conversation_id")
24-
private String conversationId;
25+
protected String conversationId;
2526
@SerializedName("system")
26-
private SystemResponse system;
27+
protected SystemResponse system;
2728
@SerializedName("metadata")
28-
private MessageContextMetadata metadata;
29+
protected MessageContextMetadata metadata;
2930

3031
public Context() {
3132
super(new TypeToken<Object>() {

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019.
2+
* (C) Copyright IBM Corp. 2017, 2020.
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
@@ -21,9 +21,9 @@
2121
*/
2222
public class Counterexample extends GenericModel {
2323

24-
private String text;
25-
private Date created;
26-
private Date updated;
24+
protected String text;
25+
protected Date created;
26+
protected Date updated;
2727

2828
/**
2929
* Builder.
@@ -97,7 +97,7 @@ public Builder updated(Date updated) {
9797
}
9898
}
9999

100-
private Counterexample(Builder builder) {
100+
protected Counterexample(Builder builder) {
101101
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.text,
102102
"text cannot be null");
103103
text = builder.text;

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019.
2+
* (C) Copyright IBM Corp. 2017, 2020.
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
@@ -21,8 +21,8 @@
2121
*/
2222
public class CounterexampleCollection extends GenericModel {
2323

24-
private List<Counterexample> counterexamples;
25-
private Pagination pagination;
24+
protected List<Counterexample> counterexamples;
25+
protected Pagination pagination;
2626

2727
/**
2828
* Gets the counterexamples.

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019.
2+
* (C) Copyright IBM Corp. 2017, 2020.
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
@@ -19,8 +19,8 @@
1919
*/
2020
public class CreateCounterexampleOptions extends GenericModel {
2121

22-
private String workspaceId;
23-
private String text;
22+
protected String workspaceId;
23+
protected String text;
2424

2525
/**
2626
* Builder.
@@ -94,7 +94,7 @@ public Builder counterexample(Counterexample counterexample) {
9494
}
9595
}
9696

97-
private CreateCounterexampleOptions(Builder builder) {
97+
protected CreateCounterexampleOptions(Builder builder) {
9898
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.workspaceId,
9999
"workspaceId cannot be empty");
100100
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.text,

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

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019.
2+
* (C) Copyright IBM Corp. 2017, 2020.
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
@@ -101,26 +101,26 @@ public interface DigressOutSlots {
101101
String ALLOW_ALL = "allow_all";
102102
}
103103

104-
private String workspaceId;
105-
private String dialogNode;
106-
private String description;
107-
private String conditions;
108-
private String parent;
109-
private String previousSibling;
110-
private DialogNodeOutput output;
111-
private Map<String, Object> context;
112-
private Map<String, Object> metadata;
113-
private DialogNodeNextStep nextStep;
114-
private String title;
115-
private String type;
116-
private String eventName;
117-
private String variable;
118-
private List<DialogNodeAction> actions;
119-
private String digressIn;
120-
private String digressOut;
121-
private String digressOutSlots;
122-
private String userLabel;
123-
private Boolean disambiguationOptOut;
104+
protected String workspaceId;
105+
protected String dialogNode;
106+
protected String description;
107+
protected String conditions;
108+
protected String parent;
109+
protected String previousSibling;
110+
protected DialogNodeOutput output;
111+
protected Map<String, Object> context;
112+
protected Map<String, Object> metadata;
113+
protected DialogNodeNextStep nextStep;
114+
protected String title;
115+
protected String type;
116+
protected String eventName;
117+
protected String variable;
118+
protected List<DialogNodeAction> actions;
119+
protected String digressIn;
120+
protected String digressOut;
121+
protected String digressOutSlots;
122+
protected String userLabel;
123+
protected Boolean disambiguationOptOut;
124124

125125
/**
126126
* Builder.
@@ -463,7 +463,7 @@ public Builder dialogNode(DialogNode dialogNode) {
463463
}
464464
}
465465

466-
private CreateDialogNodeOptions(Builder builder) {
466+
protected CreateDialogNodeOptions(Builder builder) {
467467
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.workspaceId,
468468
"workspaceId cannot be empty");
469469
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.dialogNode,

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

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019.
2+
* (C) Copyright IBM Corp. 2017, 2020.
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
@@ -25,14 +25,14 @@
2525
*/
2626
public class CreateEntity extends GenericModel {
2727

28-
private String entity;
29-
private String description;
30-
private Map<String, Object> metadata;
28+
protected String entity;
29+
protected String description;
30+
protected Map<String, Object> metadata;
3131
@SerializedName("fuzzy_match")
32-
private Boolean fuzzyMatch;
33-
private Date created;
34-
private Date updated;
35-
private List<CreateValue> values;
32+
protected Boolean fuzzyMatch;
33+
protected Date created;
34+
protected Date updated;
35+
protected List<CreateValue> values;
3636

3737
/**
3838
* Builder.
@@ -175,7 +175,7 @@ public Builder values(List<CreateValue> values) {
175175
}
176176
}
177177

178-
private CreateEntity(Builder builder) {
178+
protected CreateEntity(Builder builder) {
179179
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.entity,
180180
"entity cannot be null");
181181
entity = builder.entity;

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019.
2+
* (C) Copyright IBM Corp. 2017, 2020.
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
@@ -23,12 +23,12 @@
2323
*/
2424
public class CreateEntityOptions extends GenericModel {
2525

26-
private String workspaceId;
27-
private String entity;
28-
private String description;
29-
private Map<String, Object> metadata;
30-
private Boolean fuzzyMatch;
31-
private List<CreateValue> values;
26+
protected String workspaceId;
27+
protected String entity;
28+
protected String description;
29+
protected Map<String, Object> metadata;
30+
protected Boolean fuzzyMatch;
31+
protected List<CreateValue> values;
3232

3333
/**
3434
* Builder.
@@ -160,7 +160,7 @@ public Builder values(List<CreateValue> values) {
160160
}
161161
}
162162

163-
private CreateEntityOptions(Builder builder) {
163+
protected CreateEntityOptions(Builder builder) {
164164
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.workspaceId,
165165
"workspaceId cannot be empty");
166166
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.entity,

0 commit comments

Comments
 (0)