Skip to content

Commit 8644906

Browse files
committed
[codegen] Update to latest 7.17 API spec
1 parent 6c542d4 commit 8644906

38 files changed

+5551
-102
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
public enum WaitForActiveShardOptions implements JsonEnum {
3838
All("all"),
3939

40+
IndexSetting("index-setting"),
41+
4042
;
4143

4244
private final String jsonValue;

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

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,22 @@
4646
*/
4747
@JsonpDeserializable
4848
public class PatternReplaceCharFilter extends CharFilterBase implements CharFilterDefinitionVariant {
49+
@Nullable
4950
private final String flags;
5051

5152
private final String pattern;
5253

54+
@Nullable
5355
private final String replacement;
5456

5557
// ---------------------------------------------------------------------------------------------
5658

5759
private PatternReplaceCharFilter(Builder builder) {
5860
super(builder);
5961

60-
this.flags = ApiTypeHelper.requireNonNull(builder.flags, this, "flags");
62+
this.flags = builder.flags;
6163
this.pattern = ApiTypeHelper.requireNonNull(builder.pattern, this, "pattern");
62-
this.replacement = ApiTypeHelper.requireNonNull(builder.replacement, this, "replacement");
64+
this.replacement = builder.replacement;
6365

6466
}
6567

@@ -76,8 +78,9 @@ public CharFilterDefinition.Kind _charFilterDefinitionKind() {
7678
}
7779

7880
/**
79-
* Required - API name: {@code flags}
81+
* API name: {@code flags}
8082
*/
83+
@Nullable
8184
public final String flags() {
8285
return this.flags;
8386
}
@@ -90,8 +93,9 @@ public final String pattern() {
9093
}
9194

9295
/**
93-
* Required - API name: {@code replacement}
96+
* API name: {@code replacement}
9497
*/
98+
@Nullable
9599
public final String replacement() {
96100
return this.replacement;
97101
}
@@ -100,14 +104,19 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
100104

101105
generator.write("type", "pattern_replace");
102106
super.serializeInternal(generator, mapper);
103-
generator.writeKey("flags");
104-
generator.write(this.flags);
107+
if (this.flags != null) {
108+
generator.writeKey("flags");
109+
generator.write(this.flags);
105110

111+
}
106112
generator.writeKey("pattern");
107113
generator.write(this.pattern);
108114

109-
generator.writeKey("replacement");
110-
generator.write(this.replacement);
115+
if (this.replacement != null) {
116+
generator.writeKey("replacement");
117+
generator.write(this.replacement);
118+
119+
}
111120

112121
}
113122

@@ -120,16 +129,18 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
120129
public static class Builder extends CharFilterBase.AbstractBuilder<Builder>
121130
implements
122131
ObjectBuilder<PatternReplaceCharFilter> {
132+
@Nullable
123133
private String flags;
124134

125135
private String pattern;
126136

137+
@Nullable
127138
private String replacement;
128139

129140
/**
130-
* Required - API name: {@code flags}
141+
* API name: {@code flags}
131142
*/
132-
public final Builder flags(String value) {
143+
public final Builder flags(@Nullable String value) {
133144
this.flags = value;
134145
return this;
135146
}
@@ -143,9 +154,9 @@ public final Builder pattern(String value) {
143154
}
144155

145156
/**
146-
* Required - API name: {@code replacement}
157+
* API name: {@code replacement}
147158
*/
148-
public final Builder replacement(String value) {
159+
public final Builder replacement(@Nullable String value) {
149160
this.replacement = value;
150161
return this;
151162
}
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
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+
//----------------------------------------------------
21+
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
22+
//----------------------------------------------------
23+
24+
package co.elastic.clients.elasticsearch.cat;
25+
26+
import co.elastic.clients.json.JsonEnum;
27+
import co.elastic.clients.json.JsonpDeserializable;
28+
import co.elastic.clients.json.JsonpDeserializer;
29+
30+
/**
31+
*
32+
* @see <a href="../doc-files/api-spec.html#cat._types.CatDfaColumn">API
33+
* specification</a>
34+
*/
35+
@JsonpDeserializable
36+
public enum CatDfaColumn implements JsonEnum {
37+
/**
38+
* Contains messages relating to the selection of a node.
39+
*/
40+
AssignmentExplanation("assignment_explanation", "ae"),
41+
42+
/**
43+
* The time when the data frame analytics job was created.
44+
*/
45+
CreateTime("create_time", "ct", "createTime"),
46+
47+
/**
48+
* A description of a job.
49+
*/
50+
Description("description", "d"),
51+
52+
/**
53+
* Name of the destination index.
54+
*/
55+
DestIndex("dest_index", "di", "destIndex"),
56+
57+
/**
58+
* Contains messages about the reason why a data frame analytics job failed.
59+
*/
60+
FailureReason("failure_reason", "fr", "failureReason"),
61+
62+
/**
63+
* Identifier for the data frame analytics job.
64+
*/
65+
Id("id"),
66+
67+
/**
68+
* The approximate maximum amount of memory resources that are permitted for the
69+
* data frame analytics job.
70+
*/
71+
ModelMemoryLimit("model_memory_limit", "mml", "modelMemoryLimit"),
72+
73+
/**
74+
* The network address of the node that the data frame analytics job is assigned
75+
* to.
76+
*/
77+
NodeAddress("node.address", "na", "nodeAddress"),
78+
79+
/**
80+
* The ephemeral ID of the node that the data frame analytics job is assigned
81+
* to.
82+
*/
83+
NodeEphemeralId("node.ephemeral_id", "ne", "nodeEphemeralId"),
84+
85+
/**
86+
* The unique identifier of the node that the data frame analytics job is
87+
* assigned to.
88+
*/
89+
NodeId("node.id", "ni", "nodeId"),
90+
91+
/**
92+
* The name of the node that the data frame analytics job is assigned to.
93+
*/
94+
NodeName("node.name", "nn", "nodeName"),
95+
96+
/**
97+
* The progress report of the data frame analytics job by phase.
98+
*/
99+
Progress("progress", "p"),
100+
101+
/**
102+
* Name of the source index.
103+
*/
104+
SourceIndex("source_index", "si", "sourceIndex"),
105+
106+
/**
107+
* Current state of the data frame analytics job.
108+
*/
109+
State("state", "s"),
110+
111+
/**
112+
* The type of analysis that the data frame analytics job performs.
113+
*/
114+
Type("type", "t"),
115+
116+
/**
117+
* The Elasticsearch version number in which the data frame analytics job was
118+
* created.
119+
*/
120+
Version("version", "v"),
121+
122+
;
123+
124+
private final String jsonValue;
125+
private final String[] aliases;
126+
127+
CatDfaColumn(String jsonValue, String... aliases) {
128+
this.jsonValue = jsonValue;
129+
this.aliases = aliases;
130+
}
131+
132+
public String jsonValue() {
133+
return this.jsonValue;
134+
}
135+
136+
public String[] aliases() {
137+
return this.aliases;
138+
}
139+
140+
public static final JsonEnum.Deserializer<CatDfaColumn> _DESERIALIZER = new JsonEnum.Deserializer<>(
141+
CatDfaColumn.values());
142+
}

0 commit comments

Comments
 (0)