Skip to content

Commit fa9a1fd

Browse files
committed
[codegen] update to latest spec
1 parent 7d07842 commit fa9a1fd

File tree

91 files changed

+8964
-1682
lines changed

Some content is hidden

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

91 files changed

+8964
-1682
lines changed
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package co.elastic.clients.elasticsearch._types.analysis;
21+
22+
import co.elastic.clients.json.JsonpDeserializable;
23+
import co.elastic.clients.json.JsonpDeserializer;
24+
import co.elastic.clients.json.JsonpMapper;
25+
import co.elastic.clients.json.ObjectBuilderDeserializer;
26+
import co.elastic.clients.json.ObjectDeserializer;
27+
import co.elastic.clients.util.ObjectBuilder;
28+
import jakarta.json.stream.JsonGenerator;
29+
import java.util.Objects;
30+
import java.util.function.Function;
31+
32+
//----------------------------------------------------------------
33+
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
34+
//----------------------------------------------------------------
35+
//
36+
// This code is generated from the Elasticsearch API specification
37+
// at https://github.com/elastic/elasticsearch-specification
38+
//
39+
// Manual updates to this file will be lost when the code is
40+
// re-generated.
41+
//
42+
// If you find a property that is missing or wrongly typed, please
43+
// open an issue or a PR on the API specification repository.
44+
//
45+
//----------------------------------------------------------------
46+
47+
// typedef: _types.analysis.ApostropheTokenFilter
48+
49+
/**
50+
*
51+
* @see <a href=
52+
* "../../doc-files/api-spec.html#_types.analysis.ApostropheTokenFilter">API
53+
* specification</a>
54+
*/
55+
@JsonpDeserializable
56+
public class ApostropheTokenFilter extends TokenFilterBase implements TokenFilterDefinitionVariant {
57+
// ---------------------------------------------------------------------------------------------
58+
59+
private ApostropheTokenFilter(Builder builder) {
60+
super(builder);
61+
62+
}
63+
64+
public static ApostropheTokenFilter of(Function<Builder, ObjectBuilder<ApostropheTokenFilter>> fn) {
65+
return fn.apply(new Builder()).build();
66+
}
67+
68+
/**
69+
* TokenFilterDefinition variant kind.
70+
*/
71+
@Override
72+
public TokenFilterDefinition.Kind _tokenFilterDefinitionKind() {
73+
return TokenFilterDefinition.Kind.Apostrophe;
74+
}
75+
76+
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
77+
78+
generator.write("type", "apostrophe");
79+
super.serializeInternal(generator, mapper);
80+
81+
}
82+
83+
// ---------------------------------------------------------------------------------------------
84+
85+
/**
86+
* Builder for {@link ApostropheTokenFilter}.
87+
*/
88+
89+
public static class Builder extends TokenFilterBase.AbstractBuilder<Builder>
90+
implements
91+
ObjectBuilder<ApostropheTokenFilter> {
92+
@Override
93+
protected Builder self() {
94+
return this;
95+
}
96+
97+
/**
98+
* Builds a {@link ApostropheTokenFilter}.
99+
*
100+
* @throws NullPointerException
101+
* if some of the required fields are null.
102+
*/
103+
public ApostropheTokenFilter build() {
104+
_checkSingleUse();
105+
106+
return new ApostropheTokenFilter(this);
107+
}
108+
}
109+
110+
// ---------------------------------------------------------------------------------------------
111+
112+
/**
113+
* Json deserializer for {@link ApostropheTokenFilter}
114+
*/
115+
public static final JsonpDeserializer<ApostropheTokenFilter> _DESERIALIZER = ObjectBuilderDeserializer
116+
.lazy(Builder::new, ApostropheTokenFilter::setupApostropheTokenFilterDeserializer);
117+
118+
protected static void setupApostropheTokenFilterDeserializer(ObjectDeserializer<ApostropheTokenFilter.Builder> op) {
119+
TokenFilterBase.setupTokenFilterBaseDeserializer(op);
120+
121+
op.ignore("type");
122+
}
123+
124+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package co.elastic.clients.elasticsearch._types.analysis;
21+
22+
import co.elastic.clients.json.JsonpDeserializable;
23+
import co.elastic.clients.json.JsonpDeserializer;
24+
import co.elastic.clients.json.JsonpMapper;
25+
import co.elastic.clients.json.ObjectBuilderDeserializer;
26+
import co.elastic.clients.json.ObjectDeserializer;
27+
import co.elastic.clients.util.ObjectBuilder;
28+
import jakarta.json.stream.JsonGenerator;
29+
import java.util.Objects;
30+
import java.util.function.Function;
31+
32+
//----------------------------------------------------------------
33+
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
34+
//----------------------------------------------------------------
35+
//
36+
// This code is generated from the Elasticsearch API specification
37+
// at https://github.com/elastic/elasticsearch-specification
38+
//
39+
// Manual updates to this file will be lost when the code is
40+
// re-generated.
41+
//
42+
// If you find a property that is missing or wrongly typed, please
43+
// open an issue or a PR on the API specification repository.
44+
//
45+
//----------------------------------------------------------------
46+
47+
// typedef: _types.analysis.ArabicNormalizationTokenFilter
48+
49+
/**
50+
*
51+
* @see <a href=
52+
* "../../doc-files/api-spec.html#_types.analysis.ArabicNormalizationTokenFilter">API
53+
* specification</a>
54+
*/
55+
@JsonpDeserializable
56+
public class ArabicNormalizationTokenFilter extends TokenFilterBase implements TokenFilterDefinitionVariant {
57+
// ---------------------------------------------------------------------------------------------
58+
59+
private ArabicNormalizationTokenFilter(Builder builder) {
60+
super(builder);
61+
62+
}
63+
64+
public static ArabicNormalizationTokenFilter of(
65+
Function<Builder, ObjectBuilder<ArabicNormalizationTokenFilter>> fn) {
66+
return fn.apply(new Builder()).build();
67+
}
68+
69+
/**
70+
* TokenFilterDefinition variant kind.
71+
*/
72+
@Override
73+
public TokenFilterDefinition.Kind _tokenFilterDefinitionKind() {
74+
return TokenFilterDefinition.Kind.ArabicNormalization;
75+
}
76+
77+
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
78+
79+
generator.write("type", "arabic_normalization");
80+
super.serializeInternal(generator, mapper);
81+
82+
}
83+
84+
// ---------------------------------------------------------------------------------------------
85+
86+
/**
87+
* Builder for {@link ArabicNormalizationTokenFilter}.
88+
*/
89+
90+
public static class Builder extends TokenFilterBase.AbstractBuilder<Builder>
91+
implements
92+
ObjectBuilder<ArabicNormalizationTokenFilter> {
93+
@Override
94+
protected Builder self() {
95+
return this;
96+
}
97+
98+
/**
99+
* Builds a {@link ArabicNormalizationTokenFilter}.
100+
*
101+
* @throws NullPointerException
102+
* if some of the required fields are null.
103+
*/
104+
public ArabicNormalizationTokenFilter build() {
105+
_checkSingleUse();
106+
107+
return new ArabicNormalizationTokenFilter(this);
108+
}
109+
}
110+
111+
// ---------------------------------------------------------------------------------------------
112+
113+
/**
114+
* Json deserializer for {@link ArabicNormalizationTokenFilter}
115+
*/
116+
public static final JsonpDeserializer<ArabicNormalizationTokenFilter> _DESERIALIZER = ObjectBuilderDeserializer
117+
.lazy(Builder::new, ArabicNormalizationTokenFilter::setupArabicNormalizationTokenFilterDeserializer);
118+
119+
protected static void setupArabicNormalizationTokenFilterDeserializer(
120+
ObjectDeserializer<ArabicNormalizationTokenFilter.Builder> op) {
121+
TokenFilterBase.setupTokenFilterBaseDeserializer(op);
122+
123+
op.ignore("type");
124+
}
125+
126+
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public TokenFilterDefinition.Kind _tokenFilterDefinitionKind() {
8181
}
8282

8383
/**
84+
* If <code>true</code>, emit both original tokens and folded tokens. Defaults
85+
* to <code>false</code>.
86+
* <p>
8487
* API name: {@code preserve_original}
8588
*/
8689
@Nullable
@@ -113,6 +116,9 @@ public static class Builder extends TokenFilterBase.AbstractBuilder<Builder>
113116
private Boolean preserveOriginal;
114117

115118
/**
119+
* If <code>true</code>, emit both original tokens and folded tokens. Defaults
120+
* to <code>false</code>.
121+
* <p>
116122
* API name: {@code preserve_original}
117123
*/
118124
public final Builder preserveOriginal(@Nullable Boolean value) {
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
package co.elastic.clients.elasticsearch._types.analysis;
21+
22+
import co.elastic.clients.json.JsonEnum;
23+
import co.elastic.clients.json.JsonpDeserializable;
24+
import co.elastic.clients.json.JsonpDeserializer;
25+
26+
//----------------------------------------------------------------
27+
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
28+
//----------------------------------------------------------------
29+
//
30+
// This code is generated from the Elasticsearch API specification
31+
// at https://github.com/elastic/elasticsearch-specification
32+
//
33+
// Manual updates to this file will be lost when the code is
34+
// re-generated.
35+
//
36+
// If you find a property that is missing or wrongly typed, please
37+
// open an issue or a PR on the API specification repository.
38+
//
39+
//----------------------------------------------------------------
40+
41+
/**
42+
*
43+
* @see <a href=
44+
* "../../doc-files/api-spec.html#_types.analysis.CjkBigramIgnoredScript">API
45+
* specification</a>
46+
*/
47+
@JsonpDeserializable
48+
public enum CjkBigramIgnoredScript implements JsonEnum {
49+
Han("han"),
50+
51+
Hangul("hangul"),
52+
53+
Hiragana("hiragana"),
54+
55+
Katakana("katakana"),
56+
57+
;
58+
59+
private final String jsonValue;
60+
61+
CjkBigramIgnoredScript(String jsonValue) {
62+
this.jsonValue = jsonValue;
63+
}
64+
65+
public String jsonValue() {
66+
return this.jsonValue;
67+
}
68+
69+
public static final JsonEnum.Deserializer<CjkBigramIgnoredScript> _DESERIALIZER = new JsonEnum.Deserializer<>(
70+
CjkBigramIgnoredScript.values());
71+
}

0 commit comments

Comments
 (0)