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 31, 2023
1 parent b6cf6b8 commit 405e1d4
Show file tree
Hide file tree
Showing 130 changed files with 2,951 additions and 1,387 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@
*/
@JsonpDeserializable
public enum GeoDistanceType implements JsonEnum {
/**
* The <code>arc</code> calculation is the most accurate.
*/
Arc("arc"),

/**
* The <code>plane</code> calculation is faster but less accurate.
*/
Plane("plane"),

;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,18 @@ public static LatLonGeoLocation of(Function<Builder, ObjectBuilder<LatLonGeoLoca
}

/**
* Required - API name: {@code lat}
* Required - Latitude
* <p>
* API name: {@code lat}
*/
public final double lat() {
return this.lat;
}

/**
* Required - API name: {@code lon}
* Required - Longitude
* <p>
* API name: {@code lon}
*/
public final double lon() {
return this.lon;
Expand Down Expand Up @@ -114,15 +118,19 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
private Double lon;

/**
* Required - API name: {@code lat}
* Required - Latitude
* <p>
* API name: {@code lat}
*/
public final Builder lat(double value) {
this.lat = value;
return this;
}

/**
* Required - API name: {@code lon}
* Required - Longitude
* <p>
* API name: {@code lon}
*/
public final Builder lon(double value) {
this.lon = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public static AggregationRange of(Function<Builder, ObjectBuilder<AggregationRan
}

/**
* Start of the range (inclusive).
* <p>
* API name: {@code from}
*/
@Nullable
Expand All @@ -80,6 +82,8 @@ public final String from() {
}

/**
* Custom key to return the range with.
* <p>
* API name: {@code key}
*/
@Nullable
Expand All @@ -88,6 +92,8 @@ public final String key() {
}

/**
* End of the range (exclusive).
* <p>
* API name: {@code to}
*/
@Nullable
Expand Down Expand Up @@ -146,6 +152,8 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
private String to;

/**
* Start of the range (inclusive).
* <p>
* API name: {@code from}
*/
public final Builder from(@Nullable String value) {
Expand All @@ -154,6 +162,8 @@ public final Builder from(@Nullable String value) {
}

/**
* Custom key to return the range with.
* <p>
* API name: {@code key}
*/
public final Builder key(@Nullable String value) {
Expand All @@ -162,6 +172,8 @@ public final Builder key(@Nullable String value) {
}

/**
* End of the range (exclusive).
* <p>
* API name: {@code to}
*/
public final Builder to(@Nullable String value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public Aggregation.Kind _aggregationKind() {
}

/**
* Controls memory usage and approximation error by limiting the maximum number
* of nodes used by the underlying TDigest algorithm to
* <code>20 * compression</code>.
* Limits the maximum number of nodes used by the underlying TDigest algorithm
* to <code>20 * compression</code>, enabling control of memory usage and
* approximation error.
* <p>
* API name: {@code compression}
*/
Expand Down Expand Up @@ -105,9 +105,9 @@ public static class Builder extends MetricAggregationBase.AbstractBuilder<Builde
private Double compression;

/**
* Controls memory usage and approximation error by limiting the maximum number
* of nodes used by the underlying TDigest algorithm to
* <code>20 * compression</code>.
* Limits the maximum number of nodes used by the underlying TDigest algorithm
* to <code>20 * compression</code>, enabling control of memory usage and
* approximation error.
* <p>
* API name: {@code compression}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@
@JsonpDeserializable
public enum CardinalityExecutionMode implements JsonEnum {
/**
* Run aggregation by using global ordinals of the field and resolving those
* Run the aggregation by using global ordinals of the field and resolving those
* values after finishing a shard.
*/
GlobalOrdinals("global_ordinals"),

/**
* Run aggregation by using segment ordinal values and resolving those values
* after each segment.
* Run the aggregation by using segment ordinal values and resolving those
* values after each segment.
*/
SegmentOrdinals("segment_ordinals"),

/**
* Run aggregation by using field values directly.
* Run the aggregation by using field values directly.
*/
Direct("direct"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public final Integer size() {
}

/**
* The minimum number of documents for a bucket to be returned to the results.
* The minimum number of documents in a bucket to be returned to the results.
* <p>
* API name: {@code min_doc_count}
*/
Expand All @@ -224,7 +224,7 @@ public final Integer minDocCount() {
}

/**
* The minimum number of documents for a bucket to be returned from the shard
* The minimum number of documents in a bucket to be returned from the shard
* before merging.
* <p>
* API name: {@code shard_min_doc_count}
Expand Down Expand Up @@ -475,7 +475,7 @@ public final Builder size(@Nullable Integer value) {
}

/**
* The minimum number of documents for a bucket to be returned to the results.
* The minimum number of documents in a bucket to be returned to the results.
* <p>
* API name: {@code min_doc_count}
*/
Expand All @@ -485,7 +485,7 @@ public final Builder minDocCount(@Nullable Integer value) {
}

/**
* The minimum number of documents for a bucket to be returned from the shard
* The minimum number of documents in a bucket to be returned from the shard
* before merging.
* <p>
* API name: {@code shard_min_doc_count}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,21 @@ public static ChiSquareHeuristic of(Function<Builder, ObjectBuilder<ChiSquareHeu
}

/**
* Required - API name: {@code background_is_superset}
* Required - Set to <code>false</code> if you defined a custom background
* filter that represents a different set of documents that you want to compare
* to.
* <p>
* API name: {@code background_is_superset}
*/
public final boolean backgroundIsSuperset() {
return this.backgroundIsSuperset;
}

/**
* Required - API name: {@code include_negatives}
* Required - Set to <code>false</code> to filter out the terms that appear less
* often in the subset than in documents outside the subset.
* <p>
* API name: {@code include_negatives}
*/
public final boolean includeNegatives() {
return this.includeNegatives;
Expand Down Expand Up @@ -118,15 +125,22 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder>
private Boolean includeNegatives;

/**
* Required - API name: {@code background_is_superset}
* Required - Set to <code>false</code> if you defined a custom background
* filter that represents a different set of documents that you want to compare
* to.
* <p>
* API name: {@code background_is_superset}
*/
public final Builder backgroundIsSuperset(boolean value) {
this.backgroundIsSuperset = value;
return this;
}

/**
* Required - API name: {@code include_negatives}
* Required - Set to <code>false</code> to filter out the terms that appear less
* often in the subset than in documents outside the subset.
* <p>
* API name: {@code include_negatives}
*/
public final Builder includeNegatives(boolean value) {
this.includeNegatives = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public final Time offset() {
}

/**
* The order of the returned buckets.
* The sort order of the returned buckets.
* <p>
* API name: {@code order}
*/
Expand Down Expand Up @@ -291,7 +291,7 @@ public final String timeZone() {

/**
* Set to <code>true</code> to associate a unique string key with each bucket
* and returns the ranges as a hash rather than an array.
* and return the ranges as a hash rather than an array.
* <p>
* API name: {@code keyed}
*/
Expand Down Expand Up @@ -609,7 +609,7 @@ public final Builder offset(Function<Time.Builder, ObjectBuilder<Time>> fn) {
}

/**
* The order of the returned buckets.
* The sort order of the returned buckets.
* <p>
* API name: {@code order}
* <p>
Expand All @@ -621,7 +621,7 @@ public final Builder order(List<NamedValue<SortOrder>> list) {
}

/**
* The order of the returned buckets.
* The sort order of the returned buckets.
* <p>
* API name: {@code order}
* <p>
Expand Down Expand Up @@ -680,7 +680,7 @@ public final Builder timeZone(@Nullable String value) {

/**
* Set to <code>true</code> to associate a unique string key with each bucket
* and returns the ranges as a hash rather than an array.
* and return the ranges as a hash rather than an array.
* <p>
* API name: {@code keyed}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static DateRangeExpression of(Function<Builder, ObjectBuilder<DateRangeEx
}

/**
* Start of the range.
* Start of the range (inclusive).
* <p>
* API name: {@code from}
*/
Expand All @@ -92,7 +92,7 @@ public final String key() {
}

/**
* End of the range.
* End of the range (exclusive).
* <p>
* API name: {@code to}
*/
Expand Down Expand Up @@ -154,7 +154,7 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder>
private FieldDateMath to;

/**
* Start of the range.
* Start of the range (inclusive).
* <p>
* API name: {@code from}
*/
Expand All @@ -164,7 +164,7 @@ public final Builder from(@Nullable FieldDateMath value) {
}

/**
* Start of the range.
* Start of the range (inclusive).
* <p>
* API name: {@code from}
*/
Expand All @@ -183,7 +183,7 @@ public final Builder key(@Nullable String value) {
}

/**
* End of the range.
* End of the range (exclusive).
* <p>
* API name: {@code to}
*/
Expand All @@ -193,7 +193,7 @@ public final Builder to(@Nullable FieldDateMath value) {
}

/**
* End of the range.
* End of the range (exclusive).
* <p>
* API name: {@code to}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,18 @@ public static <T> ExtendedBounds<T> of(Function<Builder<T>, ObjectBuilder<Extend
}

/**
* Required - API name: {@code max}
* Required - Maximum value for the bound.
* <p>
* API name: {@code max}
*/
public final T max() {
return this.max;
}

/**
* Required - API name: {@code min}
* Required - Minimum value for the bound.
* <p>
* API name: {@code min}
*/
public final T min() {
return this.min;
Expand Down Expand Up @@ -127,15 +131,19 @@ public static class Builder<T> extends WithJsonObjectBuilderBase<Builder<T>>
private JsonpSerializer<T> tSerializer;

/**
* Required - API name: {@code max}
* Required - Maximum value for the bound.
* <p>
* API name: {@code max}
*/
public final Builder<T> max(T value) {
this.max = value;
return this;
}

/**
* Required - API name: {@code min}
* Required - Minimum value for the bound.
* <p>
* API name: {@code min}
*/
public final Builder<T> min(T value) {
this.min = value;
Expand Down
Loading

0 comments on commit 405e1d4

Please sign in to comment.