Skip to content

Commit 015f42c

Browse files
Merge pull request watson-developer-cloud#706 from watson-developer-cloud/develop
Adds onTranscriptionComplete() to the Speech to Text WebSocket interface
2 parents 0d7fb59 + 529ef82 commit 015f42c

58 files changed

Lines changed: 6469 additions & 389 deletions

File tree

Some content is hidden

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

‎conversation/src/main/java/com/ibm/watson/developer_cloud/conversation/v1/ConversationService.java‎

Lines changed: 474 additions & 56 deletions
Large diffs are not rendered by default.

‎conversation/src/main/java/com/ibm/watson/developer_cloud/conversation/v1/model/CreateDialogNode.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ private Builder(CreateDialogNode createDialogNode) {
3838
/**
3939
* Instantiates a new builder.
4040
*/
41-
public Builder() { }
41+
public Builder() {
42+
}
4243

4344
/**
4445
* Builds the CreateDialogNode.

‎conversation/src/main/java/com/ibm/watson/developer_cloud/conversation/v1/model/CreateEntity.java‎

Lines changed: 75 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
import java.util.ArrayList;
1616
import java.util.List;
17+
import java.util.Map;
1718

19+
import com.google.gson.annotations.SerializedName;
1820
import com.ibm.watson.developer_cloud.service.model.GenericModel;
1921
import com.ibm.watson.developer_cloud.util.Validator;
2022

@@ -27,30 +29,49 @@ public class CreateEntity extends GenericModel {
2729
private String entity;
2830
/** The description of the entity. */
2931
private String description;
32+
/** Any metadata related to the value. */
33+
private Map<String, Object> metadata;
3034
/** An array of entity values. */
3135
private List<CreateValue> values;
36+
/** Whether to use fuzzy matching for the entity. */
37+
@SerializedName("fuzzy_match")
38+
private Boolean fuzzyMatch;
3239

3340
/**
3441
* Builder.
3542
*/
3643
public static class Builder {
3744
private String entity;
3845
private String description;
46+
private Map<String, Object> metadata;
3947
private List<CreateValue> values;
48+
private Boolean fuzzyMatch;
4049

4150
private Builder(CreateEntity createEntity) {
4251
entity = createEntity.entity;
4352
description = createEntity.description;
53+
metadata = createEntity.metadata;
4454
values = createEntity.values;
55+
fuzzyMatch = createEntity.fuzzyMatch;
4556
}
4657

4758
/**
4859
* Instantiates a new builder.
4960
*/
50-
public Builder() { }
61+
public Builder() {
62+
}
63+
64+
/**
65+
* Instantiates a new builder with required properties.
66+
*
67+
* @param entity the entity
68+
*/
69+
public Builder(String entity) {
70+
this.entity = entity;
71+
}
5172

5273
/**
53-
* Builds the CreateEntity.
74+
* Builds a CreateEntity.
5475
*
5576
* @return the createEntity
5677
*/
@@ -59,24 +80,25 @@ public CreateEntity build() {
5980
}
6081

6182
/**
62-
* Adds an values to values.
83+
* Adds an value to values.
6384
*
64-
* @param values the new values
65-
* @return the builder
85+
* @param value the new value
86+
* @return the CreateEntity builder
6687
*/
67-
public Builder values(CreateValue values) {
88+
public Builder values(CreateValue value) {
89+
Validator.notNull(value, "value cannot be null");
6890
if (this.values == null) {
6991
this.values = new ArrayList<CreateValue>();
7092
}
71-
this.values.add(values);
93+
this.values.add(value);
7294
return this;
7395
}
7496

7597
/**
7698
* Set the entity.
7799
*
78100
* @param entity the entity
79-
* @return a CreateEntity Builder
101+
* @return the CreateEntity builder
80102
*/
81103
public Builder entity(String entity) {
82104
this.entity = entity;
@@ -87,37 +109,61 @@ public Builder entity(String entity) {
87109
* Set the description.
88110
*
89111
* @param description the description
90-
* @return a CreateEntity Builder
112+
* @return the CreateEntity builder
91113
*/
92114
public Builder description(String description) {
93115
this.description = description;
94116
return this;
95117
}
96118

119+
/**
120+
* Set the metadata.
121+
*
122+
* @param metadata the metadata
123+
* @return the CreateEntity builder
124+
*/
125+
public Builder metadata(Map<String, Object> metadata) {
126+
this.metadata = metadata;
127+
return this;
128+
}
129+
97130
/**
98131
* Set the values.
99132
* Existing values will be replaced.
100133
*
101134
* @param values the values
102-
* @return a CreateEntity Builder
135+
* @return the CreateEntity builder
103136
*/
104137
public Builder values(List<CreateValue> values) {
105138
this.values = values;
106139
return this;
107140
}
141+
142+
/**
143+
* Set the fuzzyMatch.
144+
*
145+
* @param fuzzyMatch the fuzzyMatch
146+
* @return the CreateEntity builder
147+
*/
148+
public Builder fuzzyMatch(Boolean fuzzyMatch) {
149+
this.fuzzyMatch = fuzzyMatch;
150+
return this;
151+
}
108152
}
109153

110154
private CreateEntity(Builder builder) {
111155
Validator.notNull(builder.entity, "entity cannot be null");
112156
entity = builder.entity;
113157
description = builder.description;
158+
metadata = builder.metadata;
114159
values = builder.values;
160+
fuzzyMatch = builder.fuzzyMatch;
115161
}
116162

117163
/**
118164
* New builder.
119165
*
120-
* @return the builder
166+
* @return a CreateEntity builder
121167
*/
122168
public Builder newBuilder() {
123169
return new Builder(this);
@@ -141,6 +187,15 @@ public String description() {
141187
return description;
142188
}
143189

190+
/**
191+
* Gets the metadata.
192+
*
193+
* @return the metadata
194+
*/
195+
public Map<String, Object> metadata() {
196+
return metadata;
197+
}
198+
144199
/**
145200
* Gets the values.
146201
*
@@ -149,4 +204,13 @@ public String description() {
149204
public List<CreateValue> values() {
150205
return values;
151206
}
207+
208+
/**
209+
* Gets the fuzzyMatch.
210+
*
211+
* @return the fuzzyMatch
212+
*/
213+
public Boolean fuzzyMatch() {
214+
return fuzzyMatch;
215+
}
152216
}

0 commit comments

Comments
 (0)