Skip to content

Commit 7a9cba2

Browse files
committed
[codegen] Update to latest API spec
1 parent bde56eb commit 7a9cba2

File tree

9 files changed

+922
-539
lines changed

9 files changed

+922
-539
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html

Lines changed: 59 additions & 55 deletions
Large diffs are not rendered by default.

java-client/src/main/java/co/elastic/clients/elasticsearch/ml/Datafeed.java

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
public class Datafeed implements JsonpSerializable {
6060
private final Map<String, Aggregation> aggregations;
6161

62+
@Nullable
63+
private final DatafeedAuthorization authorization;
64+
6265
@Nullable
6366
private final ChunkingConfig chunkingConfig;
6467

@@ -98,6 +101,7 @@ public class Datafeed implements JsonpSerializable {
98101
private Datafeed(Builder builder) {
99102

100103
this.aggregations = ApiTypeHelper.unmodifiable(builder.aggregations);
104+
this.authorization = builder.authorization;
101105
this.chunkingConfig = builder.chunkingConfig;
102106
this.datafeedId = ApiTypeHelper.requireNonNull(builder.datafeedId, this, "datafeedId");
103107
this.frequency = builder.frequency;
@@ -127,6 +131,18 @@ public final Map<String, Aggregation> aggregations() {
127131
return this.aggregations;
128132
}
129133

134+
/**
135+
* The security privileges that the datafeed uses to run its queries. If Elastic
136+
* Stack security features were disabled at the time of the most recent update
137+
* to the datafeed, this property is omitted.
138+
* <p>
139+
* API name: {@code authorization}
140+
*/
141+
@Nullable
142+
public final DatafeedAuthorization authorization() {
143+
return this.authorization;
144+
}
145+
130146
/**
131147
* API name: {@code chunking_config}
132148
*/
@@ -252,6 +268,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
252268
}
253269
generator.writeEnd();
254270

271+
}
272+
if (this.authorization != null) {
273+
generator.writeKey("authorization");
274+
this.authorization.serialize(generator, mapper);
275+
255276
}
256277
if (this.chunkingConfig != null) {
257278
generator.writeKey("chunking_config");
@@ -362,6 +383,9 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
362383
@Nullable
363384
private Map<String, Aggregation> aggregations;
364385

386+
@Nullable
387+
private DatafeedAuthorization authorization;
388+
365389
@Nullable
366390
private ChunkingConfig chunkingConfig;
367391

@@ -428,6 +452,30 @@ public final Builder aggregations(String key, Function<Aggregation.Builder, Obje
428452
return aggregations(key, fn.apply(new Aggregation.Builder()).build());
429453
}
430454

455+
/**
456+
* The security privileges that the datafeed uses to run its queries. If Elastic
457+
* Stack security features were disabled at the time of the most recent update
458+
* to the datafeed, this property is omitted.
459+
* <p>
460+
* API name: {@code authorization}
461+
*/
462+
public final Builder authorization(@Nullable DatafeedAuthorization value) {
463+
this.authorization = value;
464+
return this;
465+
}
466+
467+
/**
468+
* The security privileges that the datafeed uses to run its queries. If Elastic
469+
* Stack security features were disabled at the time of the most recent update
470+
* to the datafeed, this property is omitted.
471+
* <p>
472+
* API name: {@code authorization}
473+
*/
474+
public final Builder authorization(
475+
Function<DatafeedAuthorization.Builder, ObjectBuilder<DatafeedAuthorization>> fn) {
476+
return this.authorization(fn.apply(new DatafeedAuthorization.Builder()).build());
477+
}
478+
431479
/**
432480
* API name: {@code chunking_config}
433481
*/
@@ -670,6 +718,7 @@ protected static void setupDatafeedDeserializer(ObjectDeserializer<Datafeed.Buil
670718

671719
op.add(Builder::aggregations, JsonpDeserializer.stringMapDeserializer(Aggregation._DESERIALIZER),
672720
"aggregations", "aggs");
721+
op.add(Builder::authorization, DatafeedAuthorization._DESERIALIZER, "authorization");
673722
op.add(Builder::chunkingConfig, ChunkingConfig._DESERIALIZER, "chunking_config");
674723
op.add(Builder::datafeedId, JsonpDeserializer.stringDeserializer(), "datafeed_id");
675724
op.add(Builder::frequency, Time._DESERIALIZER, "frequency");

0 commit comments

Comments
 (0)