Skip to content

Commit

Permalink
[codegen] Update to latest API spec
Browse files Browse the repository at this point in the history
  • Loading branch information
swallez committed Aug 11, 2023
1 parent 157b368 commit b2b0e47
Show file tree
Hide file tree
Showing 338 changed files with 19,255 additions and 4,028 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ html_docs

# Local Makefile
Makefile

# Temp files and directories
temp/
*Temp.java
*TempTest.java
4 changes: 4 additions & 0 deletions config/checkstyle/checkstyle_suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@
<suppress files="client[/\\]src[/\\]main[/\\]java[/\\]co[/\\]elastic[/\\]clients[/\\]elasticsearch[^.]*\.java" checks="UnusedImports" />
<suppress files="client[/\\]src[/\\]main[/\\]java[/\\]co[/\\]elastic[/\\]clients[/\\]elasticsearch[/\\]Elasticsearch[^.]*\.java" checks="LineLength" />
<suppress files="client[/\\]src[/\\]main[/\\]java[/\\]co[/\\]elastic[/\\]clients[/\\]elasticsearch[/\\]Elasticsearch[^.]*\.java" checks="UnusedImports" />
<!-- Do not check temp files: 'temp' packages and 'FooTemp.java' files -->
<suppress files="[/\\]temp[/\\]" checks="." />
<suppress files="Temp.java*" checks="." />
<suppress files="TempTest.java*" checks="." />
</suppressions>
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
import co.elastic.clients.elasticsearch.ml.ElasticsearchMlAsyncClient;
import co.elastic.clients.elasticsearch.monitoring.ElasticsearchMonitoringAsyncClient;
import co.elastic.clients.elasticsearch.nodes.ElasticsearchNodesAsyncClient;
import co.elastic.clients.elasticsearch.query_ruleset.ElasticsearchQueryRulesetAsyncClient;
import co.elastic.clients.elasticsearch.rollup.ElasticsearchRollupAsyncClient;
import co.elastic.clients.elasticsearch.search_application.ElasticsearchSearchApplicationAsyncClient;
import co.elastic.clients.elasticsearch.searchable_snapshots.ElasticsearchSearchableSnapshotsAsyncClient;
Expand All @@ -138,6 +139,7 @@
import co.elastic.clients.elasticsearch.snapshot.ElasticsearchSnapshotAsyncClient;
import co.elastic.clients.elasticsearch.sql.ElasticsearchSqlAsyncClient;
import co.elastic.clients.elasticsearch.ssl.ElasticsearchSslAsyncClient;
import co.elastic.clients.elasticsearch.synonyms.ElasticsearchSynonymsAsyncClient;
import co.elastic.clients.elasticsearch.tasks.ElasticsearchTasksAsyncClient;
import co.elastic.clients.elasticsearch.transform.ElasticsearchTransformAsyncClient;
import co.elastic.clients.elasticsearch.watcher.ElasticsearchWatcherAsyncClient;
Expand Down Expand Up @@ -256,6 +258,10 @@ public ElasticsearchNodesAsyncClient nodes() {
return new ElasticsearchNodesAsyncClient(this.transport, this.transportOptions);
}

public ElasticsearchQueryRulesetAsyncClient queryRuleset() {
return new ElasticsearchQueryRulesetAsyncClient(this.transport, this.transportOptions);
}

public ElasticsearchRollupAsyncClient rollup() {
return new ElasticsearchRollupAsyncClient(this.transport, this.transportOptions);
}
Expand Down Expand Up @@ -292,6 +298,10 @@ public ElasticsearchSslAsyncClient ssl() {
return new ElasticsearchSslAsyncClient(this.transport, this.transportOptions);
}

public ElasticsearchSynonymsAsyncClient synonyms() {
return new ElasticsearchSynonymsAsyncClient(this.transport, this.transportOptions);
}

public ElasticsearchTasksAsyncClient tasks() {
return new ElasticsearchTasksAsyncClient(this.transport, this.transportOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
import co.elastic.clients.elasticsearch.ml.ElasticsearchMlClient;
import co.elastic.clients.elasticsearch.monitoring.ElasticsearchMonitoringClient;
import co.elastic.clients.elasticsearch.nodes.ElasticsearchNodesClient;
import co.elastic.clients.elasticsearch.query_ruleset.ElasticsearchQueryRulesetClient;
import co.elastic.clients.elasticsearch.rollup.ElasticsearchRollupClient;
import co.elastic.clients.elasticsearch.search_application.ElasticsearchSearchApplicationClient;
import co.elastic.clients.elasticsearch.searchable_snapshots.ElasticsearchSearchableSnapshotsClient;
Expand All @@ -139,6 +140,7 @@
import co.elastic.clients.elasticsearch.snapshot.ElasticsearchSnapshotClient;
import co.elastic.clients.elasticsearch.sql.ElasticsearchSqlClient;
import co.elastic.clients.elasticsearch.ssl.ElasticsearchSslClient;
import co.elastic.clients.elasticsearch.synonyms.ElasticsearchSynonymsClient;
import co.elastic.clients.elasticsearch.tasks.ElasticsearchTasksClient;
import co.elastic.clients.elasticsearch.transform.ElasticsearchTransformClient;
import co.elastic.clients.elasticsearch.watcher.ElasticsearchWatcherClient;
Expand Down Expand Up @@ -257,6 +259,10 @@ public ElasticsearchNodesClient nodes() {
return new ElasticsearchNodesClient(this.transport, this.transportOptions);
}

public ElasticsearchQueryRulesetClient queryRuleset() {
return new ElasticsearchQueryRulesetClient(this.transport, this.transportOptions);
}

public ElasticsearchRollupClient rollup() {
return new ElasticsearchRollupClient(this.transport, this.transportOptions);
}
Expand Down Expand Up @@ -293,6 +299,10 @@ public ElasticsearchSslClient ssl() {
return new ElasticsearchSslClient(this.transport, this.transportOptions);
}

public ElasticsearchSynonymsClient synonyms() {
return new ElasticsearchSynonymsClient(this.transport, this.transportOptions);
}

public ElasticsearchTasksClient tasks() {
return new ElasticsearchTasksClient(this.transport, this.transportOptions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,19 @@ public static CompletionStats of(Function<Builder, ObjectBuilder<CompletionStats
}

/**
* Required - API name: {@code size_in_bytes}
* Required - Total amount, in bytes, of memory used for completion across all
* shards assigned to selected nodes.
* <p>
* API name: {@code size_in_bytes}
*/
public final long sizeInBytes() {
return this.sizeInBytes;
}

/**
* Total amount of memory used for completion across all shards assigned to
* selected nodes.
* <p>
* API name: {@code size}
*/
@Nullable
Expand Down Expand Up @@ -147,14 +153,20 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
private Map<String, FieldSizeUsage> fields;

/**
* Required - API name: {@code size_in_bytes}
* Required - Total amount, in bytes, of memory used for completion across all
* shards assigned to selected nodes.
* <p>
* API name: {@code size_in_bytes}
*/
public final Builder sizeInBytes(long value) {
this.sizeInBytes = value;
return this;
}

/**
* Total amount of memory used for completion across all shards assigned to
* selected nodes.
* <p>
* API name: {@code size}
*/
public final Builder size(@Nullable String value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,22 @@ public static DocStats of(Function<Builder, ObjectBuilder<DocStats>> fn) {
}

/**
* Required - API name: {@code count}
* Required - Total number of non-deleted documents across all primary shards
* assigned to selected nodes. This number is based on documents in Lucene
* segments and may include documents from nested fields.
* <p>
* API name: {@code count}
*/
public final long count() {
return this.count;
}

/**
* Total number of deleted documents across all primary shards assigned to
* selected nodes. This number is based on documents in Lucene segments.
* Elasticsearch reclaims the disk space of deleted Lucene documents when a
* segment is merged.
* <p>
* API name: {@code deleted}
*/
@Nullable
Expand Down Expand Up @@ -121,14 +130,23 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
private Long deleted;

/**
* Required - API name: {@code count}
* Required - Total number of non-deleted documents across all primary shards
* assigned to selected nodes. This number is based on documents in Lucene
* segments and may include documents from nested fields.
* <p>
* API name: {@code count}
*/
public final Builder count(long value) {
this.count = value;
return this;
}

/**
* Total number of deleted documents across all primary shards assigned to
* selected nodes. This number is based on documents in Lucene segments.
* Elasticsearch reclaims the disk space of deleted Lucene documents when a
* segment is merged.
* <p>
* API name: {@code deleted}
*/
public final Builder deleted(@Nullable Long value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,28 @@
*/
@JsonpDeserializable
public enum GeoShapeRelation implements JsonEnum {
/**
* Return all documents whose <code>geo_shape</code> or <code>geo_point</code>
* field intersects the query geometry.
*/
Intersects("intersects"),

/**
* Return all documents whose <code>geo_shape</code> or <code>geo_point</code>
* field has nothing in common with the query geometry.
*/
Disjoint("disjoint"),

/**
* Return all documents whose <code>geo_shape</code> or <code>geo_point</code>
* field is within the query geometry. Line geometries are not supported.
*/
Within("within"),

/**
* Return all documents whose <code>geo_shape</code> or <code>geo_point</code>
* field contains the query geometry.
*/
Contains("contains"),

;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public static InlineScript of(Function<Builder, ObjectBuilder<InlineScript>> fn)
}

/**
* Specifies the language the script is written in.
* <p>
* API name: {@code lang}
*/
@Nullable
Expand All @@ -84,7 +86,9 @@ public final Map<String, String> options() {
}

/**
* Required - API name: {@code source}
* Required - The script source.
* <p>
* API name: {@code source}
*/
public final String source() {
return this.source;
Expand Down Expand Up @@ -130,6 +134,8 @@ public static class Builder extends ScriptBase.AbstractBuilder<Builder> implemen
private String source;

/**
* Specifies the language the script is written in.
* <p>
* API name: {@code lang}
*/
public final Builder lang(@Nullable String value) {
Expand All @@ -138,6 +144,8 @@ public final Builder lang(@Nullable String value) {
}

/**
* Specifies the language the script is written in.
* <p>
* API name: {@code lang}
*/
public final Builder lang(@Nullable ScriptLanguage value) {
Expand Down Expand Up @@ -166,7 +174,9 @@ public final Builder options(String key, String value) {
}

/**
* Required - API name: {@code source}
* Required - The script source.
* <p>
* API name: {@code source}
*/
public final Builder source(String value) {
this.source = value;
Expand Down
Loading

0 comments on commit b2b0e47

Please sign in to comment.