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
l-trotta committed Apr 5, 2024
1 parent 7eb733f commit 5f277ee
Show file tree
Hide file tree
Showing 60 changed files with 4,513 additions and 156 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package co.elastic.clients.elasticsearch._types.aggregations;

import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregate;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregateVariant;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
Expand Down Expand Up @@ -55,7 +57,7 @@
* specification</a>
*/
@JsonpDeserializable
public class CardinalityAggregate extends AggregateBase implements AggregateVariant {
public class CardinalityAggregate extends AggregateBase implements AggregateVariant, ApiKeyAggregateVariant {
private final long value;

// ---------------------------------------------------------------------------------------------
Expand All @@ -79,6 +81,14 @@ public Aggregate.Kind _aggregateKind() {
return Aggregate.Kind.Cardinality;
}

/**
* ApiKeyAggregate variant kind.
*/
@Override
public ApiKeyAggregate.Kind _apiKeyAggregateKind() {
return ApiKeyAggregate.Kind.Cardinality;
}

/**
* Required - API name: {@code value}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package co.elastic.clients.elasticsearch._types.aggregations;

import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregation;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregationVariant;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
Expand Down Expand Up @@ -56,7 +58,10 @@
* specification</a>
*/
@JsonpDeserializable
public class CardinalityAggregation extends MetricAggregationBase implements AggregationVariant {
public class CardinalityAggregation extends MetricAggregationBase
implements
AggregationVariant,
ApiKeyAggregationVariant {
@Nullable
private final Integer precisionThreshold;

Expand Down Expand Up @@ -89,6 +94,14 @@ public Aggregation.Kind _aggregationKind() {
return Aggregation.Kind.Cardinality;
}

/**
* ApiKeyAggregation variant kind.
*/
@Override
public ApiKeyAggregation.Kind _apiKeyAggregationKind() {
return ApiKeyAggregation.Kind.Cardinality;
}

/**
* A unique count below which counts are expected to be close to accurate. This
* allows to trade memory for accuracy.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
package co.elastic.clients.elasticsearch._types.aggregations;

import co.elastic.clients.elasticsearch._types.FieldValue;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregate;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregateVariant;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
Expand Down Expand Up @@ -58,7 +60,10 @@
* specification</a>
*/
@JsonpDeserializable
public class CompositeAggregate extends MultiBucketAggregateBase<CompositeBucket> implements AggregateVariant {
public class CompositeAggregate extends MultiBucketAggregateBase<CompositeBucket>
implements
AggregateVariant,
ApiKeyAggregateVariant {
private final Map<String, FieldValue> afterKey;

// ---------------------------------------------------------------------------------------------
Expand All @@ -82,6 +87,14 @@ public Aggregate.Kind _aggregateKind() {
return Aggregate.Kind.Composite;
}

/**
* ApiKeyAggregate variant kind.
*/
@Override
public ApiKeyAggregate.Kind _apiKeyAggregateKind() {
return ApiKeyAggregate.Kind.Composite;
}

/**
* API name: {@code after_key}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
package co.elastic.clients.elasticsearch._types.aggregations;

import co.elastic.clients.elasticsearch._types.FieldValue;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregation;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregationVariant;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
Expand Down Expand Up @@ -60,7 +62,10 @@
* specification</a>
*/
@JsonpDeserializable
public class CompositeAggregation extends BucketAggregationBase implements AggregationVariant {
public class CompositeAggregation extends BucketAggregationBase
implements
AggregationVariant,
ApiKeyAggregationVariant {
private final Map<String, FieldValue> after;

@Nullable
Expand Down Expand Up @@ -91,6 +96,14 @@ public Aggregation.Kind _aggregationKind() {
return Aggregation.Kind.Composite;
}

/**
* ApiKeyAggregation variant kind.
*/
@Override
public ApiKeyAggregation.Kind _apiKeyAggregationKind() {
return ApiKeyAggregation.Kind.Composite;
}

/**
* When paginating, use the <code>after_key</code> value returned in the
* previous response to retrieve the next page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package co.elastic.clients.elasticsearch._types.aggregations;

import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregate;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregateVariant;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.ObjectBuilderDeserializer;
Expand Down Expand Up @@ -56,7 +58,7 @@
* specification</a>
*/
@JsonpDeserializable
public class DateRangeAggregate extends RangeAggregate implements AggregateVariant {
public class DateRangeAggregate extends RangeAggregate implements AggregateVariant, ApiKeyAggregateVariant {
// ---------------------------------------------------------------------------------------------

private DateRangeAggregate(Builder builder) {
Expand All @@ -76,6 +78,14 @@ public Aggregate.Kind _aggregateKind() {
return Aggregate.Kind.DateRange;
}

/**
* ApiKeyAggregate variant kind.
*/
@Override
public ApiKeyAggregate.Kind _apiKeyAggregateKind() {
return ApiKeyAggregate.Kind.DateRange;
}

// ---------------------------------------------------------------------------------------------

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
package co.elastic.clients.elasticsearch._types.aggregations;

import co.elastic.clients.elasticsearch._types.FieldValue;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregation;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregationVariant;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
Expand Down Expand Up @@ -59,7 +61,10 @@
* specification</a>
*/
@JsonpDeserializable
public class DateRangeAggregation extends BucketAggregationBase implements AggregationVariant {
public class DateRangeAggregation extends BucketAggregationBase
implements
AggregationVariant,
ApiKeyAggregationVariant {
@Nullable
private final String field;

Expand Down Expand Up @@ -103,6 +108,14 @@ public Aggregation.Kind _aggregationKind() {
return Aggregation.Kind.DateRange;
}

/**
* ApiKeyAggregation variant kind.
*/
@Override
public ApiKeyAggregation.Kind _apiKeyAggregationKind() {
return ApiKeyAggregation.Kind.DateRange;
}

/**
* The date field whose values are use to build ranges.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package co.elastic.clients.elasticsearch._types.aggregations;

import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregate;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregateVariant;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.ObjectBuilderDeserializer;
Expand Down Expand Up @@ -54,7 +56,10 @@
* specification</a>
*/
@JsonpDeserializable
public class DoubleTermsAggregate extends TermsAggregateBase<DoubleTermsBucket> implements AggregateVariant {
public class DoubleTermsAggregate extends TermsAggregateBase<DoubleTermsBucket>
implements
AggregateVariant,
ApiKeyAggregateVariant {
// ---------------------------------------------------------------------------------------------

private DoubleTermsAggregate(Builder builder) {
Expand All @@ -74,6 +79,14 @@ public Aggregate.Kind _aggregateKind() {
return Aggregate.Kind.Dterms;
}

/**
* ApiKeyAggregate variant kind.
*/
@Override
public ApiKeyAggregate.Kind _apiKeyAggregateKind() {
return ApiKeyAggregate.Kind.Dterms;
}

// ---------------------------------------------------------------------------------------------

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package co.elastic.clients.elasticsearch._types.aggregations;

import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregate;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregateVariant;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.ObjectBuilderDeserializer;
Expand Down Expand Up @@ -52,7 +54,7 @@
* specification</a>
*/
@JsonpDeserializable
public class FilterAggregate extends SingleBucketAggregateBase implements AggregateVariant {
public class FilterAggregate extends SingleBucketAggregateBase implements AggregateVariant, ApiKeyAggregateVariant {
// ---------------------------------------------------------------------------------------------

private FilterAggregate(Builder builder) {
Expand All @@ -72,6 +74,14 @@ public Aggregate.Kind _aggregateKind() {
return Aggregate.Kind.Filter;
}

/**
* ApiKeyAggregate variant kind.
*/
@Override
public ApiKeyAggregate.Kind _apiKeyAggregateKind() {
return ApiKeyAggregate.Kind.Filter;
}

// ---------------------------------------------------------------------------------------------

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package co.elastic.clients.elasticsearch._types.aggregations;

import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregate;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregateVariant;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.ObjectBuilderDeserializer;
Expand Down Expand Up @@ -52,7 +54,10 @@
* specification</a>
*/
@JsonpDeserializable
public class FiltersAggregate extends MultiBucketAggregateBase<FiltersBucket> implements AggregateVariant {
public class FiltersAggregate extends MultiBucketAggregateBase<FiltersBucket>
implements
AggregateVariant,
ApiKeyAggregateVariant {
// ---------------------------------------------------------------------------------------------

private FiltersAggregate(Builder builder) {
Expand All @@ -72,6 +77,14 @@ public Aggregate.Kind _aggregateKind() {
return Aggregate.Kind.Filters;
}

/**
* ApiKeyAggregate variant kind.
*/
@Override
public ApiKeyAggregate.Kind _apiKeyAggregateKind() {
return ApiKeyAggregate.Kind.Filters;
}

// ---------------------------------------------------------------------------------------------

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package co.elastic.clients.elasticsearch._types.aggregations;

import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregate;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregateVariant;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.ObjectBuilderDeserializer;
Expand Down Expand Up @@ -54,7 +56,10 @@
* specification</a>
*/
@JsonpDeserializable
public class LongTermsAggregate extends TermsAggregateBase<LongTermsBucket> implements AggregateVariant {
public class LongTermsAggregate extends TermsAggregateBase<LongTermsBucket>
implements
AggregateVariant,
ApiKeyAggregateVariant {
// ---------------------------------------------------------------------------------------------

private LongTermsAggregate(Builder builder) {
Expand All @@ -74,6 +79,14 @@ public Aggregate.Kind _aggregateKind() {
return Aggregate.Kind.Lterms;
}

/**
* ApiKeyAggregate variant kind.
*/
@Override
public ApiKeyAggregate.Kind _apiKeyAggregateKind() {
return ApiKeyAggregate.Kind.Lterms;
}

// ---------------------------------------------------------------------------------------------

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package co.elastic.clients.elasticsearch._types.aggregations;

import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregate;
import co.elastic.clients.elasticsearch.security.query_api_keys.ApiKeyAggregateVariant;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.ObjectBuilderDeserializer;
Expand Down Expand Up @@ -52,7 +54,7 @@
* specification</a>
*/
@JsonpDeserializable
public class MissingAggregate extends SingleBucketAggregateBase implements AggregateVariant {
public class MissingAggregate extends SingleBucketAggregateBase implements AggregateVariant, ApiKeyAggregateVariant {
// ---------------------------------------------------------------------------------------------

private MissingAggregate(Builder builder) {
Expand All @@ -72,6 +74,14 @@ public Aggregate.Kind _aggregateKind() {
return Aggregate.Kind.Missing;
}

/**
* ApiKeyAggregate variant kind.
*/
@Override
public ApiKeyAggregate.Kind _apiKeyAggregateKind() {
return ApiKeyAggregate.Kind.Missing;
}

// ---------------------------------------------------------------------------------------------

/**
Expand Down
Loading

0 comments on commit 5f277ee

Please sign in to comment.