Skip to content

Commit fe8397a

Browse files
committed
refactor(Assustant v1): Move around webhook logic after regeneration
1 parent 1a6128c commit fe8397a

File tree

6 files changed

+98
-95
lines changed

6 files changed

+98
-95
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,8 @@ public String previousSibling() {
571571
* Gets the output.
572572
*
573573
* The output of the dialog node. For more information about how to specify dialog node output, see the
574-
* [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
574+
* [documentation]
575+
* (https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
575576
*
576577
* @return the output
577578
*/

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

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public class CreateWorkspaceOptions extends GenericModel {
2929
private Map<String, Object> metadata;
3030
private Boolean learningOptOut;
3131
private WorkspaceSystemSettings systemSettings;
32-
private List<Webhook> webhooks;
3332
private List<CreateIntent> intents;
3433
private List<CreateEntity> entities;
3534
private List<DialogNode> dialogNodes;
3635
private List<Counterexample> counterexamples;
36+
private List<Webhook> webhooks;
3737

3838
/**
3939
* Builder.
@@ -45,11 +45,11 @@ public static class Builder {
4545
private Map<String, Object> metadata;
4646
private Boolean learningOptOut;
4747
private WorkspaceSystemSettings systemSettings;
48-
private List<Webhook> webhooks;
4948
private List<CreateIntent> intents;
5049
private List<CreateEntity> entities;
5150
private List<DialogNode> dialogNodes;
5251
private List<Counterexample> counterexamples;
52+
private List<Webhook> webhooks;
5353

5454
private Builder(CreateWorkspaceOptions createWorkspaceOptions) {
5555
this.name = createWorkspaceOptions.name;
@@ -58,11 +58,11 @@ private Builder(CreateWorkspaceOptions createWorkspaceOptions) {
5858
this.metadata = createWorkspaceOptions.metadata;
5959
this.learningOptOut = createWorkspaceOptions.learningOptOut;
6060
this.systemSettings = createWorkspaceOptions.systemSettings;
61-
this.webhooks = createWorkspaceOptions.webhooks;
6261
this.intents = createWorkspaceOptions.intents;
6362
this.entities = createWorkspaceOptions.entities;
6463
this.dialogNodes = createWorkspaceOptions.dialogNodes;
6564
this.counterexamples = createWorkspaceOptions.counterexamples;
65+
this.webhooks = createWorkspaceOptions.webhooks;
6666
}
6767

6868
/**
@@ -80,22 +80,6 @@ public CreateWorkspaceOptions build() {
8080
return new CreateWorkspaceOptions(this);
8181
}
8282

83-
/**
84-
* Adds an webhooks to webhooks.
85-
*
86-
* @param webhooks the new webhooks
87-
* @return the CreateWorkspaceOptions builder
88-
*/
89-
public Builder addWebhooks(Webhook webhooks) {
90-
com.ibm.cloud.sdk.core.util.Validator.notNull(webhooks,
91-
"webhooks cannot be null");
92-
if (this.webhooks == null) {
93-
this.webhooks = new ArrayList<Webhook>();
94-
}
95-
this.webhooks.add(webhooks);
96-
return this;
97-
}
98-
9983
/**
10084
* Adds an intent to intents.
10185
*
@@ -160,6 +144,22 @@ public Builder addCounterexample(Counterexample counterexample) {
160144
return this;
161145
}
162146

147+
/**
148+
* Adds an webhooks to webhooks.
149+
*
150+
* @param webhooks the new webhooks
151+
* @return the CreateWorkspaceOptions builder
152+
*/
153+
public Builder addWebhooks(Webhook webhooks) {
154+
com.ibm.cloud.sdk.core.util.Validator.notNull(webhooks,
155+
"webhooks cannot be null");
156+
if (this.webhooks == null) {
157+
this.webhooks = new ArrayList<Webhook>();
158+
}
159+
this.webhooks.add(webhooks);
160+
return this;
161+
}
162+
163163
/**
164164
* Set the name.
165165
*
@@ -226,18 +226,6 @@ public Builder systemSettings(WorkspaceSystemSettings systemSettings) {
226226
return this;
227227
}
228228

229-
/**
230-
* Set the webhooks.
231-
* Existing webhooks will be replaced.
232-
*
233-
* @param webhooks the webhooks
234-
* @return the CreateWorkspaceOptions builder
235-
*/
236-
public Builder webhooks(List<Webhook> webhooks) {
237-
this.webhooks = webhooks;
238-
return this;
239-
}
240-
241229
/**
242230
* Set the intents.
243231
* Existing intents will be replaced.
@@ -285,6 +273,18 @@ public Builder counterexamples(List<Counterexample> counterexamples) {
285273
this.counterexamples = counterexamples;
286274
return this;
287275
}
276+
277+
/**
278+
* Set the webhooks.
279+
* Existing webhooks will be replaced.
280+
*
281+
* @param webhooks the webhooks
282+
* @return the CreateWorkspaceOptions builder
283+
*/
284+
public Builder webhooks(List<Webhook> webhooks) {
285+
this.webhooks = webhooks;
286+
return this;
287+
}
288288
}
289289

290290
private CreateWorkspaceOptions(Builder builder) {
@@ -294,11 +294,11 @@ private CreateWorkspaceOptions(Builder builder) {
294294
metadata = builder.metadata;
295295
learningOptOut = builder.learningOptOut;
296296
systemSettings = builder.systemSettings;
297-
webhooks = builder.webhooks;
298297
intents = builder.intents;
299298
entities = builder.entities;
300299
dialogNodes = builder.dialogNodes;
301300
counterexamples = builder.counterexamples;
301+
webhooks = builder.webhooks;
302302
}
303303

304304
/**
@@ -377,15 +377,6 @@ public WorkspaceSystemSettings systemSettings() {
377377
return systemSettings;
378378
}
379379

380-
/**
381-
* Gets the webhooks.
382-
*
383-
* @return the webhooks
384-
*/
385-
public List<Webhook> webhooks() {
386-
return webhooks;
387-
}
388-
389380
/**
390381
* Gets the intents.
391382
*
@@ -429,4 +420,13 @@ public List<DialogNode> dialogNodes() {
429420
public List<Counterexample> counterexamples() {
430421
return counterexamples;
431422
}
423+
424+
/**
425+
* Gets the webhooks.
426+
*
427+
* @return the webhooks
428+
*/
429+
public List<Webhook> webhooks() {
430+
return webhooks;
431+
}
432432
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,8 @@ public String previousSibling() {
568568
* Gets the output.
569569
*
570570
* The output of the dialog node. For more information about how to specify dialog node output, see the
571-
* [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
571+
* [documentation]
572+
* (https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
572573
*
573574
* @return the output
574575
*/

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,8 @@ public String newPreviousSibling() {
568568
* Gets the newOutput.
569569
*
570570
* The output of the dialog node. For more information about how to specify dialog node output, see the
571-
* [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
571+
* [documentation]
572+
* (https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
572573
*
573574
* @return the newOutput
574575
*/

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

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ public class UpdateWorkspaceOptions extends GenericModel {
3030
private Map<String, Object> metadata;
3131
private Boolean learningOptOut;
3232
private WorkspaceSystemSettings systemSettings;
33-
private List<Webhook> webhooks;
3433
private List<CreateIntent> intents;
3534
private List<CreateEntity> entities;
3635
private List<DialogNode> dialogNodes;
3736
private List<Counterexample> counterexamples;
37+
private List<Webhook> webhooks;
3838
private Boolean append;
3939

4040
/**
@@ -48,11 +48,11 @@ public static class Builder {
4848
private Map<String, Object> metadata;
4949
private Boolean learningOptOut;
5050
private WorkspaceSystemSettings systemSettings;
51-
private List<Webhook> webhooks;
5251
private List<CreateIntent> intents;
5352
private List<CreateEntity> entities;
5453
private List<DialogNode> dialogNodes;
5554
private List<Counterexample> counterexamples;
55+
private List<Webhook> webhooks;
5656
private Boolean append;
5757

5858
private Builder(UpdateWorkspaceOptions updateWorkspaceOptions) {
@@ -63,11 +63,11 @@ private Builder(UpdateWorkspaceOptions updateWorkspaceOptions) {
6363
this.metadata = updateWorkspaceOptions.metadata;
6464
this.learningOptOut = updateWorkspaceOptions.learningOptOut;
6565
this.systemSettings = updateWorkspaceOptions.systemSettings;
66-
this.webhooks = updateWorkspaceOptions.webhooks;
6766
this.intents = updateWorkspaceOptions.intents;
6867
this.entities = updateWorkspaceOptions.entities;
6968
this.dialogNodes = updateWorkspaceOptions.dialogNodes;
7069
this.counterexamples = updateWorkspaceOptions.counterexamples;
70+
this.webhooks = updateWorkspaceOptions.webhooks;
7171
this.append = updateWorkspaceOptions.append;
7272
}
7373

@@ -95,22 +95,6 @@ public UpdateWorkspaceOptions build() {
9595
return new UpdateWorkspaceOptions(this);
9696
}
9797

98-
/**
99-
* Adds an webhooks to webhooks.
100-
*
101-
* @param webhooks the new webhooks
102-
* @return the UpdateWorkspaceOptions builder
103-
*/
104-
public Builder addWebhooks(Webhook webhooks) {
105-
com.ibm.cloud.sdk.core.util.Validator.notNull(webhooks,
106-
"webhooks cannot be null");
107-
if (this.webhooks == null) {
108-
this.webhooks = new ArrayList<Webhook>();
109-
}
110-
this.webhooks.add(webhooks);
111-
return this;
112-
}
113-
11498
/**
11599
* Adds an intent to intents.
116100
*
@@ -175,6 +159,22 @@ public Builder addCounterexample(Counterexample counterexample) {
175159
return this;
176160
}
177161

162+
/**
163+
* Adds an webhooks to webhooks.
164+
*
165+
* @param webhooks the new webhooks
166+
* @return the UpdateWorkspaceOptions builder
167+
*/
168+
public Builder addWebhooks(Webhook webhooks) {
169+
com.ibm.cloud.sdk.core.util.Validator.notNull(webhooks,
170+
"webhooks cannot be null");
171+
if (this.webhooks == null) {
172+
this.webhooks = new ArrayList<Webhook>();
173+
}
174+
this.webhooks.add(webhooks);
175+
return this;
176+
}
177+
178178
/**
179179
* Set the workspaceId.
180180
*
@@ -252,18 +252,6 @@ public Builder systemSettings(WorkspaceSystemSettings systemSettings) {
252252
return this;
253253
}
254254

255-
/**
256-
* Set the webhooks.
257-
* Existing webhooks will be replaced.
258-
*
259-
* @param webhooks the webhooks
260-
* @return the UpdateWorkspaceOptions builder
261-
*/
262-
public Builder webhooks(List<Webhook> webhooks) {
263-
this.webhooks = webhooks;
264-
return this;
265-
}
266-
267255
/**
268256
* Set the intents.
269257
* Existing intents will be replaced.
@@ -312,6 +300,18 @@ public Builder counterexamples(List<Counterexample> counterexamples) {
312300
return this;
313301
}
314302

303+
/**
304+
* Set the webhooks.
305+
* Existing webhooks will be replaced.
306+
*
307+
* @param webhooks the webhooks
308+
* @return the UpdateWorkspaceOptions builder
309+
*/
310+
public Builder webhooks(List<Webhook> webhooks) {
311+
this.webhooks = webhooks;
312+
return this;
313+
}
314+
315315
/**
316316
* Set the append.
317317
*
@@ -334,11 +334,11 @@ private UpdateWorkspaceOptions(Builder builder) {
334334
metadata = builder.metadata;
335335
learningOptOut = builder.learningOptOut;
336336
systemSettings = builder.systemSettings;
337-
webhooks = builder.webhooks;
338337
intents = builder.intents;
339338
entities = builder.entities;
340339
dialogNodes = builder.dialogNodes;
341340
counterexamples = builder.counterexamples;
341+
webhooks = builder.webhooks;
342342
append = builder.append;
343343
}
344344

@@ -429,15 +429,6 @@ public WorkspaceSystemSettings systemSettings() {
429429
return systemSettings;
430430
}
431431

432-
/**
433-
* Gets the webhooks.
434-
*
435-
* @return the webhooks
436-
*/
437-
public List<Webhook> webhooks() {
438-
return webhooks;
439-
}
440-
441432
/**
442433
* Gets the intents.
443434
*
@@ -482,6 +473,15 @@ public List<Counterexample> counterexamples() {
482473
return counterexamples;
483474
}
484475

476+
/**
477+
* Gets the webhooks.
478+
*
479+
* @return the webhooks
480+
*/
481+
public List<Webhook> webhooks() {
482+
return webhooks;
483+
}
484+
485485
/**
486486
* Gets the append.
487487
*

0 commit comments

Comments
 (0)