Skip to content

Commit 785a1d4

Browse files
committed
feat(Assistant v1): Add generated code from newest version of service
1 parent b6a410a commit 785a1d4

File tree

91 files changed

+2964
-3082
lines changed

Some content is hidden

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

91 files changed

+2964
-3082
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@ compare-comply/src/test/resources/compare_comply/cloud-object-storage-credential
2626
compare-comply/src/test/resources/compare_comply/cloud-object-storage-credentials-output.json
2727
secrets.tar
2828
package-lock.json
29-
*.mlmodel
29+
*.mlmodel
30+
.openapi-generator-ignore
31+
.openapi-generator/

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

Lines changed: 316 additions & 169 deletions
Large diffs are not rendered by default.

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@
1212
*/
1313
package com.ibm.watson.assistant.v1.model;
1414

15-
import com.ibm.cloud.sdk.core.service.model.GenericModel;
16-
1715
import java.util.List;
1816

19-
17+
import com.ibm.cloud.sdk.core.service.model.GenericModel;
2018

2119
/**
22-
* CaptureGroup.
20+
* A recognized capture group for a pattern-based entity.
2321
*/
2422
public class CaptureGroup extends GenericModel {
2523

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,19 @@
1212
*/
1313
package com.ibm.watson.assistant.v1.model;
1414

15-
import java.lang.reflect.Type;
16-
1715
import com.google.gson.reflect.TypeToken;
18-
1916
import com.ibm.cloud.sdk.core.service.model.DynamicModel;
2017
import com.ibm.cloud.sdk.core.util.GsonSerializationHelper;
2118

2219
/**
2320
* State information for the conversation. To maintain state, include the context from the previous response.
2421
*/
2522
public class Context extends DynamicModel {
26-
private Type conversationIdType = new TypeToken<String>() {
23+
private java.lang.reflect.Type conversationIdType = new TypeToken<String>() {
2724
}.getType();
28-
private Type systemType = new TypeToken<SystemResponse>() {
25+
private java.lang.reflect.Type systemType = new TypeToken<SystemResponse>() {
2926
}.getType();
30-
private Type metadataType = new TypeToken<MessageContextMetadata>() {
27+
private java.lang.reflect.Type metadataType = new TypeToken<MessageContextMetadata>() {
3128
}.getType();
3229

3330
/**

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

Lines changed: 98 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import java.util.Date;
1616

1717
import com.ibm.cloud.sdk.core.service.model.GenericModel;
18+
import com.ibm.cloud.sdk.core.util.Validator;
1819

1920
/**
2021
* Counterexample.
@@ -25,36 +26,127 @@ public class Counterexample extends GenericModel {
2526
private Date created;
2627
private Date updated;
2728

29+
/**
30+
* Builder.
31+
*/
32+
public static class Builder {
33+
private String text;
34+
private Date created;
35+
private Date updated;
36+
37+
private Builder(Counterexample counterexample) {
38+
this.text = counterexample.text;
39+
this.created = counterexample.created;
40+
this.updated = counterexample.updated;
41+
}
42+
43+
/**
44+
* Instantiates a new builder.
45+
*/
46+
public Builder() {
47+
}
48+
49+
/**
50+
* Instantiates a new builder with required properties.
51+
*
52+
* @param text the text
53+
*/
54+
public Builder(String text) {
55+
this.text = text;
56+
}
57+
58+
/**
59+
* Builds a Counterexample.
60+
*
61+
* @return the counterexample
62+
*/
63+
public Counterexample build() {
64+
return new Counterexample(this);
65+
}
66+
67+
/**
68+
* Set the text.
69+
*
70+
* @param text the text
71+
* @return the Counterexample builder
72+
*/
73+
public Builder text(String text) {
74+
this.text = text;
75+
return this;
76+
}
77+
78+
/**
79+
* Set the created.
80+
*
81+
* @param created the created
82+
* @return the Counterexample builder
83+
*/
84+
public Builder created(Date created) {
85+
this.created = created;
86+
return this;
87+
}
88+
89+
/**
90+
* Set the updated.
91+
*
92+
* @param updated the updated
93+
* @return the Counterexample builder
94+
*/
95+
public Builder updated(Date updated) {
96+
this.updated = updated;
97+
return this;
98+
}
99+
}
100+
101+
private Counterexample(Builder builder) {
102+
Validator.notNull(builder.text, "text cannot be null");
103+
text = builder.text;
104+
created = builder.created;
105+
updated = builder.updated;
106+
}
107+
108+
/**
109+
* New builder.
110+
*
111+
* @return a Counterexample builder
112+
*/
113+
public Builder newBuilder() {
114+
return new Builder(this);
115+
}
116+
28117
/**
29118
* Gets the text.
30119
*
31-
* The text of the counterexample.
120+
* The text of a user input marked as irrelevant input. This string must conform to the following restrictions:
121+
* - It cannot contain carriage return, newline, or tab characters
122+
* - It cannot consist of only whitespace characters
123+
* - It must be no longer than 1024 characters.
32124
*
33125
* @return the text
34126
*/
35-
public String getText() {
127+
public String text() {
36128
return text;
37129
}
38130

39131
/**
40132
* Gets the created.
41133
*
42-
* The timestamp for creation of the counterexample.
134+
* The timestamp for creation of the object.
43135
*
44136
* @return the created
45137
*/
46-
public Date getCreated() {
138+
public Date created() {
47139
return created;
48140
}
49141

50142
/**
51143
* Gets the updated.
52144
*
53-
* The timestamp for the last update to the counterexample.
145+
* The timestamp for the most recent update to the object.
54146
*
55147
* @return the updated
56148
*/
57-
public Date getUpdated() {
149+
public Date updated() {
58150
return updated;
59151
}
60152
}

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

Lines changed: 0 additions & 98 deletions
This file was deleted.

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public static class Builder {
3131
private String text;
3232

3333
private Builder(CreateCounterexampleOptions createCounterexampleOptions) {
34-
workspaceId = createCounterexampleOptions.workspaceId;
35-
text = createCounterexampleOptions.text;
34+
this.workspaceId = createCounterexampleOptions.workspaceId;
35+
this.text = createCounterexampleOptions.text;
3636
}
3737

3838
/**
@@ -82,6 +82,17 @@ public Builder text(String text) {
8282
this.text = text;
8383
return this;
8484
}
85+
86+
/**
87+
* Set the counterexample.
88+
*
89+
* @param counterexample the counterexample
90+
* @return the CreateCounterexampleOptions builder
91+
*/
92+
public Builder counterexample(Counterexample counterexample) {
93+
this.text = counterexample.text();
94+
return this;
95+
}
8596
}
8697

8798
private CreateCounterexampleOptions(Builder builder) {

0 commit comments

Comments
 (0)