Skip to content

Commit ccbd5da

Browse files
committed
feat(Assistant v1): Regenerate service
1 parent c44118e commit ccbd5da

File tree

102 files changed

+4023
-1898
lines changed

Some content is hidden

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

102 files changed

+4023
-1898
lines changed

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

Lines changed: 184 additions & 163 deletions
Large diffs are not rendered by default.
Lines changed: 96 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2019.
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
@@ -12,6 +12,7 @@
1212
*/
1313
package com.ibm.watson.assistant.v1.model;
1414

15+
import java.util.ArrayList;
1516
import java.util.List;
1617

1718
import com.ibm.cloud.sdk.core.service.model.GenericModel;
@@ -24,14 +25,106 @@ public class CaptureGroup extends GenericModel {
2425
private String group;
2526
private List<Long> location;
2627

28+
/**
29+
* Builder.
30+
*/
31+
public static class Builder {
32+
private String group;
33+
private List<Long> location;
34+
35+
private Builder(CaptureGroup captureGroup) {
36+
this.group = captureGroup.group;
37+
this.location = captureGroup.location;
38+
}
39+
40+
/**
41+
* Instantiates a new builder.
42+
*/
43+
public Builder() {
44+
}
45+
46+
/**
47+
* Instantiates a new builder with required properties.
48+
*
49+
* @param group the group
50+
*/
51+
public Builder(String group) {
52+
this.group = group;
53+
}
54+
55+
/**
56+
* Builds a CaptureGroup.
57+
*
58+
* @return the captureGroup
59+
*/
60+
public CaptureGroup build() {
61+
return new CaptureGroup(this);
62+
}
63+
64+
/**
65+
* Adds an location to location.
66+
*
67+
* @param location the new location
68+
* @return the CaptureGroup builder
69+
*/
70+
public Builder addLocation(Long location) {
71+
com.ibm.cloud.sdk.core.util.Validator.notNull(location,
72+
"location cannot be null");
73+
if (this.location == null) {
74+
this.location = new ArrayList<Long>();
75+
}
76+
this.location.add(location);
77+
return this;
78+
}
79+
80+
/**
81+
* Set the group.
82+
*
83+
* @param group the group
84+
* @return the CaptureGroup builder
85+
*/
86+
public Builder group(String group) {
87+
this.group = group;
88+
return this;
89+
}
90+
91+
/**
92+
* Set the location.
93+
* Existing location will be replaced.
94+
*
95+
* @param location the location
96+
* @return the CaptureGroup builder
97+
*/
98+
public Builder location(List<Long> location) {
99+
this.location = location;
100+
return this;
101+
}
102+
}
103+
104+
private CaptureGroup(Builder builder) {
105+
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.group,
106+
"group cannot be null");
107+
group = builder.group;
108+
location = builder.location;
109+
}
110+
111+
/**
112+
* New builder.
113+
*
114+
* @return a CaptureGroup builder
115+
*/
116+
public Builder newBuilder() {
117+
return new Builder(this);
118+
}
119+
27120
/**
28121
* Gets the group.
29122
*
30123
* A recognized capture group for the entity.
31124
*
32125
* @return the group
33126
*/
34-
public String getGroup() {
127+
public String group() {
35128
return group;
36129
}
37130

@@ -42,25 +135,7 @@ public String getGroup() {
42135
*
43136
* @return the location
44137
*/
45-
public List<Long> getLocation() {
138+
public List<Long> location() {
46139
return location;
47140
}
48-
49-
/**
50-
* Sets the group.
51-
*
52-
* @param group the new group
53-
*/
54-
public void setGroup(final String group) {
55-
this.group = group;
56-
}
57-
58-
/**
59-
* Sets the location.
60-
*
61-
* @param location the new location
62-
*/
63-
public void setLocation(final List<Long> location) {
64-
this.location = location;
65-
}
66141
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2019.
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

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2019.
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
@@ -15,7 +15,6 @@
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;
1918

2019
/**
2120
* Counterexample.
@@ -99,7 +98,8 @@ public Builder updated(Date updated) {
9998
}
10099

101100
private Counterexample(Builder builder) {
102-
Validator.notNull(builder.text, "text cannot be null");
101+
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.text,
102+
"text cannot be null");
103103
text = builder.text;
104104
created = builder.created;
105105
updated = builder.updated;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2019.
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

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2019.
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
@@ -13,7 +13,6 @@
1313
package com.ibm.watson.assistant.v1.model;
1414

1515
import com.ibm.cloud.sdk.core.service.model.GenericModel;
16-
import com.ibm.cloud.sdk.core.util.Validator;
1716

1817
/**
1918
* The createCounterexample options.
@@ -96,8 +95,10 @@ public Builder counterexample(Counterexample counterexample) {
9695
}
9796

9897
private CreateCounterexampleOptions(Builder builder) {
99-
Validator.notEmpty(builder.workspaceId, "workspaceId cannot be empty");
100-
Validator.notNull(builder.text, "text cannot be null");
98+
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.workspaceId,
99+
"workspaceId cannot be empty");
100+
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.text,
101+
"text cannot be null");
101102
workspaceId = builder.workspaceId;
102103
text = builder.text;
103104
}

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

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018 IBM Corp. All Rights Reserved.
2+
* (C) Copyright IBM Corp. 2019.
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
@@ -17,7 +17,6 @@
1717
import java.util.Map;
1818

1919
import com.ibm.cloud.sdk.core.service.model.GenericModel;
20-
import com.ibm.cloud.sdk.core.util.Validator;
2120

2221
/**
2322
* The createDialogNode options.
@@ -27,7 +26,7 @@ public class CreateDialogNodeOptions extends GenericModel {
2726
/**
2827
* How the dialog node is processed.
2928
*/
30-
public interface NodeType {
29+
public interface Type {
3130
/** standard. */
3231
String STANDARD = "standard";
3332
/** event_handler. */
@@ -113,7 +112,7 @@ public interface DigressOutSlots {
113112
private Map<String, Object> metadata;
114113
private DialogNodeNextStep nextStep;
115114
private String title;
116-
private String nodeType;
115+
private String type;
117116
private String eventName;
118117
private String variable;
119118
private List<DialogNodeAction> actions;
@@ -137,7 +136,7 @@ public static class Builder {
137136
private Map<String, Object> metadata;
138137
private DialogNodeNextStep nextStep;
139138
private String title;
140-
private String nodeType;
139+
private String type;
141140
private String eventName;
142141
private String variable;
143142
private List<DialogNodeAction> actions;
@@ -158,7 +157,7 @@ private Builder(CreateDialogNodeOptions createDialogNodeOptions) {
158157
this.metadata = createDialogNodeOptions.metadata;
159158
this.nextStep = createDialogNodeOptions.nextStep;
160159
this.title = createDialogNodeOptions.title;
161-
this.nodeType = createDialogNodeOptions.nodeType;
160+
this.type = createDialogNodeOptions.type;
162161
this.eventName = createDialogNodeOptions.eventName;
163162
this.variable = createDialogNodeOptions.variable;
164163
this.actions = createDialogNodeOptions.actions;
@@ -201,7 +200,8 @@ public CreateDialogNodeOptions build() {
201200
* @return the CreateDialogNodeOptions builder
202201
*/
203202
public Builder addActions(DialogNodeAction actions) {
204-
Validator.notNull(actions, "actions cannot be null");
203+
com.ibm.cloud.sdk.core.util.Validator.notNull(actions,
204+
"actions cannot be null");
205205
if (this.actions == null) {
206206
this.actions = new ArrayList<DialogNodeAction>();
207207
}
@@ -331,13 +331,13 @@ public Builder title(String title) {
331331
}
332332

333333
/**
334-
* Set the nodeType.
334+
* Set the type.
335335
*
336-
* @param nodeType the nodeType
336+
* @param type the type
337337
* @return the CreateDialogNodeOptions builder
338338
*/
339-
public Builder nodeType(String nodeType) {
340-
this.nodeType = nodeType;
339+
public Builder type(String type) {
340+
this.type = type;
341341
return this;
342342
}
343343

@@ -436,7 +436,7 @@ public Builder dialogNode(DialogNode dialogNode) {
436436
this.metadata = dialogNode.metadata();
437437
this.nextStep = dialogNode.nextStep();
438438
this.title = dialogNode.title();
439-
this.nodeType = dialogNode.nodeType();
439+
this.type = dialogNode.type();
440440
this.eventName = dialogNode.eventName();
441441
this.variable = dialogNode.variable();
442442
this.actions = dialogNode.actions();
@@ -449,8 +449,10 @@ public Builder dialogNode(DialogNode dialogNode) {
449449
}
450450

451451
private CreateDialogNodeOptions(Builder builder) {
452-
Validator.notEmpty(builder.workspaceId, "workspaceId cannot be empty");
453-
Validator.notNull(builder.dialogNode, "dialogNode cannot be null");
452+
com.ibm.cloud.sdk.core.util.Validator.notEmpty(builder.workspaceId,
453+
"workspaceId cannot be empty");
454+
com.ibm.cloud.sdk.core.util.Validator.notNull(builder.dialogNode,
455+
"dialogNode cannot be null");
454456
workspaceId = builder.workspaceId;
455457
dialogNode = builder.dialogNode;
456458
description = builder.description;
@@ -462,7 +464,7 @@ private CreateDialogNodeOptions(Builder builder) {
462464
metadata = builder.metadata;
463465
nextStep = builder.nextStep;
464466
title = builder.title;
465-
nodeType = builder.nodeType;
467+
type = builder.type;
466468
eventName = builder.eventName;
467469
variable = builder.variable;
468470
actions = builder.actions;
@@ -553,8 +555,7 @@ public String previousSibling() {
553555
* Gets the output.
554556
*
555557
* The output of the dialog node. For more information about how to specify dialog node output, see the
556-
* [documentation]
557-
* (https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
558+
* [documentation](https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-overview#dialog-overview-responses).
558559
*
559560
* @return the output
560561
*/
@@ -608,14 +609,14 @@ public String title() {
608609
}
609610

610611
/**
611-
* Gets the nodeType.
612+
* Gets the type.
612613
*
613614
* How the dialog node is processed.
614615
*
615-
* @return the nodeType
616+
* @return the type
616617
*/
617-
public String nodeType() {
618-
return nodeType;
618+
public String type() {
619+
return type;
619620
}
620621

621622
/**

0 commit comments

Comments
 (0)