
com.atlan.model.search.AggregationBucketResult Maven / Gradle / Ivy
// Generated by delombok at Thu Oct 10 18:56:33 UTC 2024
/* SPDX-License-Identifier: Apache-2.0
Copyright 2022 Atlan Pte. Ltd. */
package com.atlan.model.search;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/**
* Captures the results from a bucket aggregation.
*/
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = AggregationBucketResult.AggregationBucketResultBuilder.class)
public class AggregationBucketResult extends AggregationResult {
private static final long serialVersionUID = 2L;
/**
* Maximum number of missing documents when a bucket's count is very large and
* may exceed the shard size of Elasticsearch. The larger this number, the more approximate
* the values of the counts in the buckets.
*/
@JsonProperty("doc_count_error_upper_bound")
Long docCountErrorUpperBound;
/**
* When there are many unique terms, only the top terms are returned. This gives the sum
* of all document counts across all buckets that are NOT part of the response.
*/
@JsonProperty("sum_other_doc_count")
Long sumOtherDocCount;
/**
* List of the top buckets that resulted from the aggregation.
*/
List buckets;
@java.lang.SuppressWarnings("all")
@lombok.Generated
AggregationBucketResult(final Long docCountErrorUpperBound, final Long sumOtherDocCount, final List buckets) {
this.docCountErrorUpperBound = docCountErrorUpperBound;
this.sumOtherDocCount = sumOtherDocCount;
this.buckets = buckets;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
@com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "", buildMethodName = "build")
public static class AggregationBucketResultBuilder {
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Long docCountErrorUpperBound;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private Long sumOtherDocCount;
@java.lang.SuppressWarnings("all")
@lombok.Generated
private List buckets;
@java.lang.SuppressWarnings("all")
@lombok.Generated
AggregationBucketResultBuilder() {
}
/**
* Maximum number of missing documents when a bucket's count is very large and
* may exceed the shard size of Elasticsearch. The larger this number, the more approximate
* the values of the counts in the buckets.
* @return {@code this}.
*/
@JsonProperty("doc_count_error_upper_bound")
@java.lang.SuppressWarnings("all")
@lombok.Generated
public AggregationBucketResult.AggregationBucketResultBuilder docCountErrorUpperBound(final Long docCountErrorUpperBound) {
this.docCountErrorUpperBound = docCountErrorUpperBound;
return this;
}
/**
* When there are many unique terms, only the top terms are returned. This gives the sum
* of all document counts across all buckets that are NOT part of the response.
* @return {@code this}.
*/
@JsonProperty("sum_other_doc_count")
@java.lang.SuppressWarnings("all")
@lombok.Generated
public AggregationBucketResult.AggregationBucketResultBuilder sumOtherDocCount(final Long sumOtherDocCount) {
this.sumOtherDocCount = sumOtherDocCount;
return this;
}
/**
* List of the top buckets that resulted from the aggregation.
* @return {@code this}.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public AggregationBucketResult.AggregationBucketResultBuilder buckets(final List buckets) {
this.buckets = buckets;
return this;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public AggregationBucketResult build() {
return new AggregationBucketResult(this.docCountErrorUpperBound, this.sumOtherDocCount, this.buckets);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public java.lang.String toString() {
return "AggregationBucketResult.AggregationBucketResultBuilder(docCountErrorUpperBound=" + this.docCountErrorUpperBound + ", sumOtherDocCount=" + this.sumOtherDocCount + ", buckets=" + this.buckets + ")";
}
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public static AggregationBucketResult.AggregationBucketResultBuilder builder() {
return new AggregationBucketResult.AggregationBucketResultBuilder();
}
/**
* Maximum number of missing documents when a bucket's count is very large and
* may exceed the shard size of Elasticsearch. The larger this number, the more approximate
* the values of the counts in the buckets.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getDocCountErrorUpperBound() {
return this.docCountErrorUpperBound;
}
/**
* When there are many unique terms, only the top terms are returned. This gives the sum
* of all document counts across all buckets that are NOT part of the response.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getSumOtherDocCount() {
return this.sumOtherDocCount;
}
/**
* List of the top buckets that resulted from the aggregation.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public List getBuckets() {
return this.buckets;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof AggregationBucketResult)) return false;
final AggregationBucketResult other = (AggregationBucketResult) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$docCountErrorUpperBound = this.getDocCountErrorUpperBound();
final java.lang.Object other$docCountErrorUpperBound = other.getDocCountErrorUpperBound();
if (this$docCountErrorUpperBound == null ? other$docCountErrorUpperBound != null : !this$docCountErrorUpperBound.equals(other$docCountErrorUpperBound)) return false;
final java.lang.Object this$sumOtherDocCount = this.getSumOtherDocCount();
final java.lang.Object other$sumOtherDocCount = other.getSumOtherDocCount();
if (this$sumOtherDocCount == null ? other$sumOtherDocCount != null : !this$sumOtherDocCount.equals(other$sumOtherDocCount)) return false;
final java.lang.Object this$buckets = this.getBuckets();
final java.lang.Object other$buckets = other.getBuckets();
if (this$buckets == null ? other$buckets != null : !this$buckets.equals(other$buckets)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof AggregationBucketResult;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $docCountErrorUpperBound = this.getDocCountErrorUpperBound();
result = result * PRIME + ($docCountErrorUpperBound == null ? 43 : $docCountErrorUpperBound.hashCode());
final java.lang.Object $sumOtherDocCount = this.getSumOtherDocCount();
result = result * PRIME + ($sumOtherDocCount == null ? 43 : $sumOtherDocCount.hashCode());
final java.lang.Object $buckets = this.getBuckets();
result = result * PRIME + ($buckets == null ? 43 : $buckets.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public java.lang.String toString() {
return "AggregationBucketResult(super=" + super.toString() + ", docCountErrorUpperBound=" + this.getDocCountErrorUpperBound() + ", sumOtherDocCount=" + this.getSumOtherDocCount() + ", buckets=" + this.getBuckets() + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy