java.lang.Object
co.elastic.clients.elasticsearch._types.aggregations.Aggregation
All Implemented Interfaces:
JsonpSerializable, TaggedUnion<java.lang.Object>

@JsonpDeserializable
public class Aggregation
extends java.lang.Object
implements TaggedUnion<java.lang.Object>, JsonpSerializable
  • Field Details

  • Constructor Details

  • Method Details

    • _type

      public java.lang.String _type()
      Description copied from interface: TaggedUnion
      Get the of the type of the variant held by this union object.
      Specified by:
      _type in interface TaggedUnion<java.lang.Object>
      Returns:
      the variant type
    • _get

      public java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<java.lang.Object>
    • aggs

      @Nullable public java.util.Map<java.lang.String,​Aggregation> aggs()
      API name: aggs
    • meta

      @Nullable public java.util.Map<java.lang.String,​JsonData> meta()
      API name: meta
    • adjacencyMatrix

      public AdjacencyMatrixAggregation adjacencyMatrix()
      Get the adjacency_matrix variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the adjacency_matrix kind.
    • autoDateHistogram

      public AutoDateHistogramAggregation autoDateHistogram()
      Get the auto_date_histogram variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the auto_date_histogram kind.
    • avg

      public AverageAggregation avg()
      Get the avg variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the avg kind.
    • avgBucket

      public AverageBucketAggregation avgBucket()
      Get the avg_bucket variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the avg_bucket kind.
    • boxplot

      public BoxplotAggregation boxplot()
      Get the boxplot variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the boxplot kind.
    • bucketScript

      public BucketScriptAggregation bucketScript()
      Get the bucket_script variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the bucket_script kind.
    • bucketSelector

      public BucketSelectorAggregation bucketSelector()
      Get the bucket_selector variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the bucket_selector kind.
    • bucketSort

      public BucketSortAggregation bucketSort()
      Get the bucket_sort variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the bucket_sort kind.
    • cardinality

      public CardinalityAggregation cardinality()
      Get the cardinality variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the cardinality kind.
    • children

      public ChildrenAggregation children()
      Get the children variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the children kind.
    • composite

      public CompositeAggregation composite()
      Get the composite variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the composite kind.
    • cumulativeCardinality

      public CumulativeCardinalityAggregation cumulativeCardinality()
      Get the cumulative_cardinality variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the cumulative_cardinality kind.
    • cumulativeSum

      public CumulativeSumAggregation cumulativeSum()
      Get the cumulative_sum variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the cumulative_sum kind.
    • dateHistogram

      public DateHistogramAggregation dateHistogram()
      Get the date_histogram variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the date_histogram kind.
    • dateRange

      public DateRangeAggregation dateRange()
      Get the date_range variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the date_range kind.
    • derivative

      public DerivativeAggregation derivative()
      Get the derivative variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the derivative kind.
    • diversifiedSampler

      public DiversifiedSamplerAggregation diversifiedSampler()
      Get the diversified_sampler variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the diversified_sampler kind.
    • extendedStats

      public ExtendedStatsAggregation extendedStats()
      Get the extended_stats variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the extended_stats kind.
    • extendedStatsBucket

      public ExtendedStatsBucketAggregation extendedStatsBucket()
      Get the extended_stats_bucket variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the extended_stats_bucket kind.
    • filter

      public Query filter()
      Get the filter variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the filter kind.
    • filters

      public FiltersAggregation filters()
      Get the filters variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the filters kind.
    • geoBounds

      public GeoBoundsAggregation geoBounds()
      Get the geo_bounds variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the geo_bounds kind.
    • geoCentroid

      public GeoCentroidAggregation geoCentroid()
      Get the geo_centroid variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the geo_centroid kind.
    • geoDistance

      public GeoDistanceAggregation geoDistance()
      Get the geo_distance variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the geo_distance kind.
    • geohashGrid

      public GeoHashGridAggregation geohashGrid()
      Get the geohash_grid variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the geohash_grid kind.
    • geoLine

      public GeoLineAggregation geoLine()
      Get the geo_line variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the geo_line kind.
    • geotileGrid

      public GeoTileGridAggregation geotileGrid()
      Get the geotile_grid variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the geotile_grid kind.
    • global

      public GlobalAggregation global()
      Get the global variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the global kind.
    • histogram

      public HistogramAggregation histogram()
      Get the histogram variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the histogram kind.
    • ipRange

      public IpRangeAggregation ipRange()
      Get the ip_range variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the ip_range kind.
    • inference

      public InferenceAggregation inference()
      Get the inference variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the inference kind.
    • matrixStats

      public MatrixStatsAggregation matrixStats()
      Get the matrix_stats variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the matrix_stats kind.
    • max

      public MaxAggregation max()
      Get the max variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the max kind.
    • maxBucket

      public MaxBucketAggregation maxBucket()
      Get the max_bucket variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the max_bucket kind.
    • medianAbsoluteDeviation

      public MedianAbsoluteDeviationAggregation medianAbsoluteDeviation()
      Get the median_absolute_deviation variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the median_absolute_deviation kind.
    • min

      public MinAggregation min()
      Get the min variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the min kind.
    • minBucket

      public MinBucketAggregation minBucket()
      Get the min_bucket variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the min_bucket kind.
    • missing

      public MissingAggregation missing()
      Get the missing variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the missing kind.
    • movingAvg

      public MovingAverageAggregation movingAvg()
      Get the moving_avg variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the moving_avg kind.
    • movingPercentiles

      public MovingPercentilesAggregation movingPercentiles()
      Get the moving_percentiles variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the moving_percentiles kind.
    • movingFn

      public MovingFunctionAggregation movingFn()
      Get the moving_fn variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the moving_fn kind.
    • multiTerms

      public MultiTermsAggregation multiTerms()
      Get the multi_terms variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the multi_terms kind.
    • nested

      public NestedAggregation nested()
      Get the nested variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the nested kind.
    • normalize

      public NormalizeAggregation normalize()
      Get the normalize variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the normalize kind.
    • parent

      public ParentAggregation parent()
      Get the parent variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the parent kind.
    • percentileRanks

      public PercentileRanksAggregation percentileRanks()
      Get the percentile_ranks variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the percentile_ranks kind.
    • percentiles

      public PercentilesAggregation percentiles()
      Get the percentiles variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the percentiles kind.
    • percentilesBucket

      public PercentilesBucketAggregation percentilesBucket()
      Get the percentiles_bucket variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the percentiles_bucket kind.
    • range

      public RangeAggregation range()
      Get the range variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the range kind.
    • rareTerms

      public RareTermsAggregation rareTerms()
      Get the rare_terms variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the rare_terms kind.
    • rate

      public RateAggregation rate()
      Get the rate variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the rate kind.
    • reverseNested

      public ReverseNestedAggregation reverseNested()
      Get the reverse_nested variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the reverse_nested kind.
    • sampler

      public SamplerAggregation sampler()
      Get the sampler variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the sampler kind.
    • scriptedMetric

      public ScriptedMetricAggregation scriptedMetric()
      Get the scripted_metric variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the scripted_metric kind.
    • serialDiff

      public SerialDifferencingAggregation serialDiff()
      Get the serial_diff variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the serial_diff kind.
    • significantTerms

      public SignificantTermsAggregation significantTerms()
      Get the significant_terms variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the significant_terms kind.
    • significantText

      public SignificantTextAggregation significantText()
      Get the significant_text variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the significant_text kind.
    • stats

      public StatsAggregation stats()
      Get the stats variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the stats kind.
    • statsBucket

      public StatsBucketAggregation statsBucket()
      Get the stats_bucket variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the stats_bucket kind.
    • stringStats

      public StringStatsAggregation stringStats()
      Get the string_stats variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the string_stats kind.
    • sum

      public SumAggregation sum()
      Get the sum variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the sum kind.
    • sumBucket

      public SumBucketAggregation sumBucket()
      Get the sum_bucket variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the sum_bucket kind.
    • terms

      public TermsAggregation terms()
      Get the terms variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the terms kind.
    • topHits

      public TopHitsAggregation topHits()
      Get the top_hits variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the top_hits kind.
    • tTest

      public TTestAggregation tTest()
      Get the t_test variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the t_test kind.
    • topMetrics

      public TopMetricsAggregation topMetrics()
      Get the top_metrics variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the top_metrics kind.
    • valueCount

      public ValueCountAggregation valueCount()
      Get the value_count variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the value_count kind.
    • weightedAvg

      public WeightedAverageAggregation weightedAvg()
      Get the weighted_avg variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the weighted_avg kind.
    • variableWidthHistogram

      public VariableWidthHistogramAggregation variableWidthHistogram()
      Get the variable_width_histogram variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the variable_width_histogram kind.
    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Specified by:
      serialize in interface JsonpSerializable
    • setupAggregationDeserializer

      protected static void setupAggregationDeserializer​(DelegatingDeserializer<Aggregation.Builder> op)