Skip to content

Commit 9f82d1d

Browse files
Merge pull request #1107 from watson-developer-cloud/codegen/feat
SDK Generation v8.3.0 release
2 parents 5d53739 + 201e1f9 commit 9f82d1d

File tree

134 files changed

+4159
-517
lines changed

Some content is hidden

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

134 files changed

+4159
-517
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: java
2-
sudo: required
32
dist: trusty
3+
os: linux
44
jdk:
55
- openjdk7
66
- oraclejdk8

assistant/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Installation
44

55
##### Maven
6+
67
```xml
78
<dependency>
89
<groupId>com.ibm.watson</groupId>
@@ -12,14 +13,17 @@
1213
```
1314

1415
##### Gradle
16+
1517
```gradle
1618
'com.ibm.watson:assistant:8.2.1'
1719
```
1820

1921
## Usage
22+
2023
Use the [Assistant][assistant] service to identify intents, entities, and conduct conversations.
2124

2225
### Using Assistant v1
26+
2327
```java
2428
// make sure to use the Assistant v1 import!
2529
import com.ibm.watson.assistant.v1.Assistant;
@@ -37,6 +41,7 @@ System.out.println(response);
3741
```
3842

3943
Maintaining context across messages:
44+
4045
```java
4146
// make sure to use the Assistant v1 import!
4247
import com.ibm.watson.assistant.v1.Assistant;
@@ -71,6 +76,7 @@ System.out.println(response);
7176
---
7277

7378
### Using Assistant v2
79+
7480
```java
7581
// make sure to use the Assistant v2 import!
7682
import com.ibm.watson.assistant.v2.Assistant;
@@ -92,6 +98,7 @@ System.out.println(messageResponse);
9298
```
9399

94100
Maintaining context across messages:
101+
95102
```java
96103
// make sure to use the Assistant v2 import!
97104
import com.ibm.watson.assistant.v2.Assistant;
@@ -127,4 +134,5 @@ messageResponse = service.message(messageOptions).execute().getResult();
127134

128135
System.out.println(messageResponse);
129136
```
130-
[assistant]: https://cloud.ibm.com/docs/services/assistant?topic=assistant-index
137+
138+
[assistant]: https://cloud.ibm.com/docs/assistant?topic=assistant-index

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

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
* The Assistant v1 API provides authoring methods your application can use to create or update a workspace.
9696
*
9797
* @version v1
98-
* @see <a href="https://cloud.ibm.com/docs/services/assistant/">Assistant</a>
98+
* @see <a href="https://cloud.ibm.com/docs/assistant/">Assistant</a>
9999
*/
100100
public class Assistant extends BaseService {
101101

@@ -163,7 +163,7 @@ public Assistant(String versionDate, String serviceName, Authenticator authentic
163163
*
164164
* **Important:** This method has been superseded by the new v2 runtime API. The v2 API offers significant advantages,
165165
* including ease of deployment, automatic state management, versioning, and search capabilities. For more
166-
* information, see the [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-api-overview).
166+
* information, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-api-overview).
167167
*
168168
* There is no rate limit for this operation.
169169
*
@@ -289,6 +289,9 @@ public ServiceCall<Workspace> createWorkspace(CreateWorkspaceOptions createWorks
289289
}
290290
builder.header("Accept", "application/json");
291291
if (createWorkspaceOptions != null) {
292+
if (createWorkspaceOptions.includeAudit() != null) {
293+
builder.query("include_audit", String.valueOf(createWorkspaceOptions.includeAudit()));
294+
}
292295
final JsonObject contentJson = new JsonObject();
293296
if (createWorkspaceOptions.name() != null) {
294297
contentJson.addProperty("name", createWorkspaceOptions.name());
@@ -418,6 +421,9 @@ public ServiceCall<Workspace> updateWorkspace(UpdateWorkspaceOptions updateWorks
418421
if (updateWorkspaceOptions.append() != null) {
419422
builder.query("append", String.valueOf(updateWorkspaceOptions.append()));
420423
}
424+
if (updateWorkspaceOptions.includeAudit() != null) {
425+
builder.query("include_audit", String.valueOf(updateWorkspaceOptions.includeAudit()));
426+
}
421427
final JsonObject contentJson = new JsonObject();
422428
if (updateWorkspaceOptions.name() != null) {
423429
contentJson.addProperty("name", updateWorkspaceOptions.name());
@@ -565,6 +571,9 @@ public ServiceCall<Intent> createIntent(CreateIntentOptions createIntentOptions)
565571
builder.header(header.getKey(), header.getValue());
566572
}
567573
builder.header("Accept", "application/json");
574+
if (createIntentOptions.includeAudit() != null) {
575+
builder.query("include_audit", String.valueOf(createIntentOptions.includeAudit()));
576+
}
568577
final JsonObject contentJson = new JsonObject();
569578
contentJson.addProperty("intent", createIntentOptions.intent());
570579
if (createIntentOptions.description() != null) {
@@ -644,6 +653,12 @@ public ServiceCall<Intent> updateIntent(UpdateIntentOptions updateIntentOptions)
644653
builder.header(header.getKey(), header.getValue());
645654
}
646655
builder.header("Accept", "application/json");
656+
if (updateIntentOptions.append() != null) {
657+
builder.query("append", String.valueOf(updateIntentOptions.append()));
658+
}
659+
if (updateIntentOptions.includeAudit() != null) {
660+
builder.query("include_audit", String.valueOf(updateIntentOptions.includeAudit()));
661+
}
647662
final JsonObject contentJson = new JsonObject();
648663
if (updateIntentOptions.newIntent() != null) {
649664
contentJson.addProperty("intent", updateIntentOptions.newIntent());
@@ -757,6 +772,9 @@ public ServiceCall<Example> createExample(CreateExampleOptions createExampleOpti
757772
builder.header(header.getKey(), header.getValue());
758773
}
759774
builder.header("Accept", "application/json");
775+
if (createExampleOptions.includeAudit() != null) {
776+
builder.query("include_audit", String.valueOf(createExampleOptions.includeAudit()));
777+
}
760778
final JsonObject contentJson = new JsonObject();
761779
contentJson.addProperty("text", createExampleOptions.text());
762780
if (createExampleOptions.mentions() != null) {
@@ -829,6 +847,9 @@ public ServiceCall<Example> updateExample(UpdateExampleOptions updateExampleOpti
829847
builder.header(header.getKey(), header.getValue());
830848
}
831849
builder.header("Accept", "application/json");
850+
if (updateExampleOptions.includeAudit() != null) {
851+
builder.query("include_audit", String.valueOf(updateExampleOptions.includeAudit()));
852+
}
832853
final JsonObject contentJson = new JsonObject();
833854
if (updateExampleOptions.newText() != null) {
834855
contentJson.addProperty("text", updateExampleOptions.newText());
@@ -941,6 +962,9 @@ public ServiceCall<Counterexample> createCounterexample(CreateCounterexampleOpti
941962
builder.header(header.getKey(), header.getValue());
942963
}
943964
builder.header("Accept", "application/json");
965+
if (createCounterexampleOptions.includeAudit() != null) {
966+
builder.query("include_audit", String.valueOf(createCounterexampleOptions.includeAudit()));
967+
}
944968
final JsonObject contentJson = new JsonObject();
945969
contentJson.addProperty("text", createCounterexampleOptions.text());
946970
builder.bodyJson(contentJson);
@@ -1008,6 +1032,9 @@ public ServiceCall<Counterexample> updateCounterexample(UpdateCounterexampleOpti
10081032
builder.header(header.getKey(), header.getValue());
10091033
}
10101034
builder.header("Accept", "application/json");
1035+
if (updateCounterexampleOptions.includeAudit() != null) {
1036+
builder.query("include_audit", String.valueOf(updateCounterexampleOptions.includeAudit()));
1037+
}
10111038
final JsonObject contentJson = new JsonObject();
10121039
if (updateCounterexampleOptions.newText() != null) {
10131040
contentJson.addProperty("text", updateCounterexampleOptions.newText());
@@ -1118,6 +1145,9 @@ public ServiceCall<Entity> createEntity(CreateEntityOptions createEntityOptions)
11181145
builder.header(header.getKey(), header.getValue());
11191146
}
11201147
builder.header("Accept", "application/json");
1148+
if (createEntityOptions.includeAudit() != null) {
1149+
builder.query("include_audit", String.valueOf(createEntityOptions.includeAudit()));
1150+
}
11211151
final JsonObject contentJson = new JsonObject();
11221152
contentJson.addProperty("entity", createEntityOptions.entity());
11231153
if (createEntityOptions.description() != null) {
@@ -1204,6 +1234,12 @@ public ServiceCall<Entity> updateEntity(UpdateEntityOptions updateEntityOptions)
12041234
builder.header(header.getKey(), header.getValue());
12051235
}
12061236
builder.header("Accept", "application/json");
1237+
if (updateEntityOptions.append() != null) {
1238+
builder.query("append", String.valueOf(updateEntityOptions.append()));
1239+
}
1240+
if (updateEntityOptions.includeAudit() != null) {
1241+
builder.query("include_audit", String.valueOf(updateEntityOptions.includeAudit()));
1242+
}
12071243
final JsonObject contentJson = new JsonObject();
12081244
if (updateEntityOptions.newEntity() != null) {
12091245
contentJson.addProperty("entity", updateEntityOptions.newEntity());
@@ -1363,6 +1399,9 @@ public ServiceCall<Value> createValue(CreateValueOptions createValueOptions) {
13631399
builder.header(header.getKey(), header.getValue());
13641400
}
13651401
builder.header("Accept", "application/json");
1402+
if (createValueOptions.includeAudit() != null) {
1403+
builder.query("include_audit", String.valueOf(createValueOptions.includeAudit()));
1404+
}
13661405
final JsonObject contentJson = new JsonObject();
13671406
contentJson.addProperty("value", createValueOptions.value());
13681407
if (createValueOptions.metadata() != null) {
@@ -1450,6 +1489,12 @@ public ServiceCall<Value> updateValue(UpdateValueOptions updateValueOptions) {
14501489
builder.header(header.getKey(), header.getValue());
14511490
}
14521491
builder.header("Accept", "application/json");
1492+
if (updateValueOptions.append() != null) {
1493+
builder.query("append", String.valueOf(updateValueOptions.append()));
1494+
}
1495+
if (updateValueOptions.includeAudit() != null) {
1496+
builder.query("include_audit", String.valueOf(updateValueOptions.includeAudit()));
1497+
}
14531498
final JsonObject contentJson = new JsonObject();
14541499
if (updateValueOptions.newValue() != null) {
14551500
contentJson.addProperty("value", updateValueOptions.newValue());
@@ -1574,6 +1619,9 @@ public ServiceCall<Synonym> createSynonym(CreateSynonymOptions createSynonymOpti
15741619
builder.header(header.getKey(), header.getValue());
15751620
}
15761621
builder.header("Accept", "application/json");
1622+
if (createSynonymOptions.includeAudit() != null) {
1623+
builder.query("include_audit", String.valueOf(createSynonymOptions.includeAudit()));
1624+
}
15771625
final JsonObject contentJson = new JsonObject();
15781626
contentJson.addProperty("synonym", createSynonymOptions.synonym());
15791627
builder.bodyJson(contentJson);
@@ -1643,6 +1691,9 @@ public ServiceCall<Synonym> updateSynonym(UpdateSynonymOptions updateSynonymOpti
16431691
builder.header(header.getKey(), header.getValue());
16441692
}
16451693
builder.header("Accept", "application/json");
1694+
if (updateSynonymOptions.includeAudit() != null) {
1695+
builder.query("include_audit", String.valueOf(updateSynonymOptions.includeAudit()));
1696+
}
16461697
final JsonObject contentJson = new JsonObject();
16471698
if (updateSynonymOptions.newSynonym() != null) {
16481699
contentJson.addProperty("synonym", updateSynonymOptions.newSynonym());
@@ -1750,6 +1801,9 @@ public ServiceCall<DialogNode> createDialogNode(CreateDialogNodeOptions createDi
17501801
builder.header(header.getKey(), header.getValue());
17511802
}
17521803
builder.header("Accept", "application/json");
1804+
if (createDialogNodeOptions.includeAudit() != null) {
1805+
builder.query("include_audit", String.valueOf(createDialogNodeOptions.includeAudit()));
1806+
}
17531807
final JsonObject contentJson = new JsonObject();
17541808
contentJson.addProperty("dialog_node", createDialogNodeOptions.dialogNode());
17551809
if (createDialogNodeOptions.description() != null) {
@@ -1876,6 +1930,9 @@ public ServiceCall<DialogNode> updateDialogNode(UpdateDialogNodeOptions updateDi
18761930
builder.header(header.getKey(), header.getValue());
18771931
}
18781932
builder.header("Accept", "application/json");
1933+
if (updateDialogNodeOptions.includeAudit() != null) {
1934+
builder.query("include_audit", String.valueOf(updateDialogNodeOptions.includeAudit()));
1935+
}
18791936
final JsonObject contentJson = new JsonObject();
18801937
if (updateDialogNodeOptions.newDialogNode() != null) {
18811938
contentJson.addProperty("dialog_node", updateDialogNodeOptions.newDialogNode());
@@ -2062,7 +2119,7 @@ public ServiceCall<LogCollection> listAllLogs(ListAllLogsOptions listAllLogsOpti
20622119
*
20632120
* You associate a customer ID with data by passing the `X-Watson-Metadata` header with a request that passes data.
20642121
* For more information about personal data and customer IDs, see [Information
2065-
* security](https://cloud.ibm.com/docs/services/assistant?topic=assistant-information-security#information-security).
2122+
* security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-security#information-security).
20662123
*
20672124
* This operation is limited to 4 requests per minute. For more information, see **Rate limiting**.
20682125
*

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,20 @@ public class CreateCounterexampleOptions extends GenericModel {
2121

2222
protected String workspaceId;
2323
protected String text;
24+
protected Boolean includeAudit;
2425

2526
/**
2627
* Builder.
2728
*/
2829
public static class Builder {
2930
private String workspaceId;
3031
private String text;
32+
private Boolean includeAudit;
3133

3234
private Builder(CreateCounterexampleOptions createCounterexampleOptions) {
3335
this.workspaceId = createCounterexampleOptions.workspaceId;
3436
this.text = createCounterexampleOptions.text;
37+
this.includeAudit = createCounterexampleOptions.includeAudit;
3538
}
3639

3740
/**
@@ -82,6 +85,17 @@ public Builder text(String text) {
8285
return this;
8386
}
8487

88+
/**
89+
* Set the includeAudit.
90+
*
91+
* @param includeAudit the includeAudit
92+
* @return the CreateCounterexampleOptions builder
93+
*/
94+
public Builder includeAudit(Boolean includeAudit) {
95+
this.includeAudit = includeAudit;
96+
return this;
97+
}
98+
8599
/**
86100
* Set the counterexample.
87101
*
@@ -101,6 +115,7 @@ protected CreateCounterexampleOptions(Builder builder) {
101115
"text cannot be null");
102116
workspaceId = builder.workspaceId;
103117
text = builder.text;
118+
includeAudit = builder.includeAudit;
104119
}
105120

106121
/**
@@ -135,4 +150,15 @@ public String workspaceId() {
135150
public String text() {
136151
return text;
137152
}
153+
154+
/**
155+
* Gets the includeAudit.
156+
*
157+
* Whether to include the audit properties (`created` and `updated` timestamps) in the response.
158+
*
159+
* @return the includeAudit
160+
*/
161+
public Boolean includeAudit() {
162+
return includeAudit;
163+
}
138164
}

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

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ public interface DigressOutSlots {
121121
protected String digressOutSlots;
122122
protected String userLabel;
123123
protected Boolean disambiguationOptOut;
124+
protected Boolean includeAudit;
124125

125126
/**
126127
* Builder.
@@ -146,6 +147,7 @@ public static class Builder {
146147
private String digressOutSlots;
147148
private String userLabel;
148149
private Boolean disambiguationOptOut;
150+
private Boolean includeAudit;
149151

150152
private Builder(CreateDialogNodeOptions createDialogNodeOptions) {
151153
this.workspaceId = createDialogNodeOptions.workspaceId;
@@ -168,6 +170,7 @@ private Builder(CreateDialogNodeOptions createDialogNodeOptions) {
168170
this.digressOutSlots = createDialogNodeOptions.digressOutSlots;
169171
this.userLabel = createDialogNodeOptions.userLabel;
170172
this.disambiguationOptOut = createDialogNodeOptions.disambiguationOptOut;
173+
this.includeAudit = createDialogNodeOptions.includeAudit;
171174
}
172175

173176
/**
@@ -433,6 +436,17 @@ public Builder disambiguationOptOut(Boolean disambiguationOptOut) {
433436
return this;
434437
}
435438

439+
/**
440+
* Set the includeAudit.
441+
*
442+
* @param includeAudit the includeAudit
443+
* @return the CreateDialogNodeOptions builder
444+
*/
445+
public Builder includeAudit(Boolean includeAudit) {
446+
this.includeAudit = includeAudit;
447+
return this;
448+
}
449+
436450
/**
437451
* Set the dialogNode.
438452
*
@@ -488,6 +502,7 @@ protected CreateDialogNodeOptions(Builder builder) {
488502
digressOutSlots = builder.digressOutSlots;
489503
userLabel = builder.userLabel;
490504
disambiguationOptOut = builder.disambiguationOptOut;
505+
includeAudit = builder.includeAudit;
491506
}
492507

493508
/**
@@ -571,8 +586,7 @@ public String previousSibling() {
571586
* Gets the output.
572587
*
573588
* The output of the dialog node. For more information about how to specify dialog node output, see the
574-
* [documentation]
575-
* (https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
589+
* [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
576590
*
577591
* @return the output
578592
*/
@@ -723,4 +737,15 @@ public String userLabel() {
723737
public Boolean disambiguationOptOut() {
724738
return disambiguationOptOut;
725739
}
740+
741+
/**
742+
* Gets the includeAudit.
743+
*
744+
* Whether to include the audit properties (`created` and `updated` timestamps) in the response.
745+
*
746+
* @return the includeAudit
747+
*/
748+
public Boolean includeAudit() {
749+
return includeAudit;
750+
}
726751
}

0 commit comments

Comments
 (0)