Skip to content

Commit 58111ff

Browse files
committed
fix(Natural Language Understanding): Add back model parameter in CategoriesOptions which was mistake
1 parent 016544b commit 58111ff

File tree

1 file changed

+36
-0
lines changed
  • natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/model

1 file changed

+36
-0
lines changed

natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/model/CategoriesOptions.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,22 @@ public class CategoriesOptions extends GenericModel {
2323

2424
protected Boolean explanation;
2525
protected Long limit;
26+
@Deprecated
27+
protected String model;
2628

2729
/**
2830
* Builder.
2931
*/
3032
public static class Builder {
3133
private Boolean explanation;
3234
private Long limit;
35+
@Deprecated
36+
private String model;
3337

3438
private Builder(CategoriesOptions categoriesOptions) {
3539
this.explanation = categoriesOptions.explanation;
3640
this.limit = categoriesOptions.limit;
41+
this.model = categoriesOptions.model;
3742
}
3843

3944
/**
@@ -72,11 +77,25 @@ public Builder limit(long limit) {
7277
this.limit = limit;
7378
return this;
7479
}
80+
81+
/**
82+
* Set the model.
83+
*
84+
* @param model the model
85+
* @return the CategoriesOptions builder
86+
* @deprecated the model parameter is no longer supported by the Natural Language Understanding service and will
87+
* be removed in the next major release
88+
*/
89+
public Builder model(String model) {
90+
this.model = model;
91+
return this;
92+
}
7593
}
7694

7795
protected CategoriesOptions(Builder builder) {
7896
explanation = builder.explanation;
7997
limit = builder.limit;
98+
model = builder.model;
8099
}
81100

82101
/**
@@ -110,4 +129,21 @@ public Boolean explanation() {
110129
public Long limit() {
111130
return limit;
112131
}
132+
133+
/**
134+
* Gets the model.
135+
*
136+
* Enter a [custom
137+
* model]
138+
* (https://cloud.ibm.com/docs/services/natural-language-understanding
139+
* ?topic=natural-language-understanding-customizing)
140+
* ID to override the standard categories model.
141+
*
142+
* @return the model
143+
* @deprecated the model parameter is no longer supported by the Natural Language Understanding service and will
144+
* be removed in the next major release
145+
*/
146+
public String model() {
147+
return model;
148+
}
113149
}

0 commit comments

Comments
 (0)