Skip to content

Commit b72d004

Browse files
committed
[codegen] update to latest spec
1 parent dbccc95 commit b72d004

File tree

90 files changed

+4459
-870
lines changed

Some content is hidden

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

90 files changed

+4459
-870
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/FingerprintAnalyzer.java

Lines changed: 53 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import co.elastic.clients.util.ObjectBuilder;
3131
import co.elastic.clients.util.WithJsonObjectBuilderBase;
3232
import jakarta.json.stream.JsonGenerator;
33-
import java.lang.Boolean;
3433
import java.lang.Integer;
3534
import java.lang.String;
3635
import java.util.List;
@@ -66,10 +65,10 @@ public class FingerprintAnalyzer implements AnalyzerVariant, JsonpSerializable {
6665
@Nullable
6766
private final String version;
6867

69-
private final int maxOutputSize;
70-
71-
private final boolean preserveOriginal;
68+
@Nullable
69+
private final Integer maxOutputSize;
7270

71+
@Nullable
7372
private final String separator;
7473

7574
private final List<String> stopwords;
@@ -82,9 +81,8 @@ public class FingerprintAnalyzer implements AnalyzerVariant, JsonpSerializable {
8281
private FingerprintAnalyzer(Builder builder) {
8382

8483
this.version = builder.version;
85-
this.maxOutputSize = ApiTypeHelper.requireNonNull(builder.maxOutputSize, this, "maxOutputSize");
86-
this.preserveOriginal = ApiTypeHelper.requireNonNull(builder.preserveOriginal, this, "preserveOriginal");
87-
this.separator = ApiTypeHelper.requireNonNull(builder.separator, this, "separator");
84+
this.maxOutputSize = builder.maxOutputSize;
85+
this.separator = builder.separator;
8886
this.stopwords = ApiTypeHelper.unmodifiable(builder.stopwords);
8987
this.stopwordsPath = builder.stopwordsPath;
9088

@@ -104,41 +102,49 @@ public Analyzer.Kind _analyzerKind() {
104102

105103
/**
106104
* API name: {@code version}
105+
*
106+
* @deprecated 7.14.0
107107
*/
108+
@Deprecated
108109
@Nullable
109110
public final String version() {
110111
return this.version;
111112
}
112113

113114
/**
114-
* Required - API name: {@code max_output_size}
115+
* The maximum token size to emit. Tokens larger than this size will be
116+
* discarded. Defaults to <code>255</code>
117+
* <p>
118+
* API name: {@code max_output_size}
115119
*/
116-
public final int maxOutputSize() {
120+
@Nullable
121+
public final Integer maxOutputSize() {
117122
return this.maxOutputSize;
118123
}
119124

120125
/**
121-
* Required - API name: {@code preserve_original}
122-
*/
123-
public final boolean preserveOriginal() {
124-
return this.preserveOriginal;
125-
}
126-
127-
/**
128-
* Required - API name: {@code separator}
126+
* The character to use to concatenate the terms. Defaults to a space.
127+
* <p>
128+
* API name: {@code separator}
129129
*/
130+
@Nullable
130131
public final String separator() {
131132
return this.separator;
132133
}
133134

134135
/**
136+
* A pre-defined stop words list like <code>_english_</code> or an array
137+
* containing a list of stop words. Defaults to <code>_none_</code>.
138+
* <p>
135139
* API name: {@code stopwords}
136140
*/
137141
public final List<String> stopwords() {
138142
return this.stopwords;
139143
}
140144

141145
/**
146+
* The path to a file containing stop words.
147+
* <p>
142148
* API name: {@code stopwords_path}
143149
*/
144150
@Nullable
@@ -164,15 +170,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
164170
generator.write(this.version);
165171

166172
}
167-
generator.writeKey("max_output_size");
168-
generator.write(this.maxOutputSize);
169-
170-
generator.writeKey("preserve_original");
171-
generator.write(this.preserveOriginal);
173+
if (this.maxOutputSize != null) {
174+
generator.writeKey("max_output_size");
175+
generator.write(this.maxOutputSize);
172176

173-
generator.writeKey("separator");
174-
generator.write(this.separator);
177+
}
178+
if (this.separator != null) {
179+
generator.writeKey("separator");
180+
generator.write(this.separator);
175181

182+
}
176183
if (ApiTypeHelper.isDefined(this.stopwords)) {
177184
generator.writeKey("stopwords");
178185
generator.writeStartArray();
@@ -208,10 +215,10 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder>
208215
@Nullable
209216
private String version;
210217

218+
@Nullable
211219
private Integer maxOutputSize;
212220

213-
private Boolean preserveOriginal;
214-
221+
@Nullable
215222
private String separator;
216223

217224
@Nullable
@@ -222,37 +229,40 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder>
222229

223230
/**
224231
* API name: {@code version}
232+
*
233+
* @deprecated 7.14.0
225234
*/
235+
@Deprecated
226236
public final Builder version(@Nullable String value) {
227237
this.version = value;
228238
return this;
229239
}
230240

231241
/**
232-
* Required - API name: {@code max_output_size}
242+
* The maximum token size to emit. Tokens larger than this size will be
243+
* discarded. Defaults to <code>255</code>
244+
* <p>
245+
* API name: {@code max_output_size}
233246
*/
234-
public final Builder maxOutputSize(int value) {
247+
public final Builder maxOutputSize(@Nullable Integer value) {
235248
this.maxOutputSize = value;
236249
return this;
237250
}
238251

239252
/**
240-
* Required - API name: {@code preserve_original}
241-
*/
242-
public final Builder preserveOriginal(boolean value) {
243-
this.preserveOriginal = value;
244-
return this;
245-
}
246-
247-
/**
248-
* Required - API name: {@code separator}
253+
* The character to use to concatenate the terms. Defaults to a space.
254+
* <p>
255+
* API name: {@code separator}
249256
*/
250-
public final Builder separator(String value) {
257+
public final Builder separator(@Nullable String value) {
251258
this.separator = value;
252259
return this;
253260
}
254261

255262
/**
263+
* A pre-defined stop words list like <code>_english_</code> or an array
264+
* containing a list of stop words. Defaults to <code>_none_</code>.
265+
* <p>
256266
* API name: {@code stopwords}
257267
* <p>
258268
* Adds all elements of <code>list</code> to <code>stopwords</code>.
@@ -263,6 +273,9 @@ public final Builder stopwords(List<String> list) {
263273
}
264274

265275
/**
276+
* A pre-defined stop words list like <code>_english_</code> or an array
277+
* containing a list of stop words. Defaults to <code>_none_</code>.
278+
* <p>
266279
* API name: {@code stopwords}
267280
* <p>
268281
* Adds one or more values to <code>stopwords</code>.
@@ -273,6 +286,8 @@ public final Builder stopwords(String value, String... values) {
273286
}
274287

275288
/**
289+
* The path to a file containing stop words.
290+
* <p>
276291
* API name: {@code stopwords_path}
277292
*/
278293
public final Builder stopwordsPath(@Nullable String value) {
@@ -310,7 +325,6 @@ protected static void setupFingerprintAnalyzerDeserializer(ObjectDeserializer<Fi
310325

311326
op.add(Builder::version, JsonpDeserializer.stringDeserializer(), "version");
312327
op.add(Builder::maxOutputSize, JsonpDeserializer.integerDeserializer(), "max_output_size");
313-
op.add(Builder::preserveOriginal, JsonpDeserializer.booleanDeserializer(), "preserve_original");
314328
op.add(Builder::separator, JsonpDeserializer.stringDeserializer(), "separator");
315329
op.add(Builder::stopwords, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()),
316330
"stopwords");

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/KeywordAnalyzer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ public Analyzer.Kind _analyzerKind() {
8484

8585
/**
8686
* API name: {@code version}
87+
*
88+
* @deprecated 7.14.0
8789
*/
90+
@Deprecated
8891
@Nullable
8992
public final String version() {
9093
return this.version;
@@ -128,7 +131,10 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
128131

129132
/**
130133
* API name: {@code version}
134+
*
135+
* @deprecated 7.14.0
131136
*/
137+
@Deprecated
132138
public final Builder version(@Nullable String value) {
133139
this.version = value;
134140
return this;

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/LanguageAnalyzer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ public Analyzer.Kind _analyzerKind() {
9999

100100
/**
101101
* API name: {@code version}
102+
*
103+
* @deprecated 7.14.0
102104
*/
105+
@Deprecated
103106
@Nullable
104107
public final String version() {
105108
return this.version;
@@ -209,7 +212,10 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
209212

210213
/**
211214
* API name: {@code version}
215+
*
216+
* @deprecated 7.14.0
212217
*/
218+
@Deprecated
213219
public final Builder version(@Nullable String value) {
214220
this.version = value;
215221
return this;

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/NoriAnalyzer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ public Analyzer.Kind _analyzerKind() {
9696

9797
/**
9898
* API name: {@code version}
99+
*
100+
* @deprecated 7.14.0
99101
*/
102+
@Deprecated
100103
@Nullable
101104
public final String version() {
102105
return this.version;
@@ -191,7 +194,10 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
191194

192195
/**
193196
* API name: {@code version}
197+
*
198+
* @deprecated 7.14.0
194199
*/
200+
@Deprecated
195201
public final Builder version(@Nullable String value) {
196202
this.version = value;
197203
return this;

0 commit comments

Comments
 (0)