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

Lines changed: 3 additions & 1 deletion
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 37 additions & 10 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 5 additions & 4 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 4 additions & 4 deletions
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,

0 commit comments

Comments
 (0)