Class IpPrefixAggregation.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder<BuilderT>
co.elastic.clients.elasticsearch._types.aggregations.BucketAggregationBase.AbstractBuilder<IpPrefixAggregation.Builder>
co.elastic.clients.elasticsearch._types.aggregations.IpPrefixAggregation.Builder
- All Implemented Interfaces:
WithJson<IpPrefixAggregation.Builder>
,ObjectBuilder<IpPrefixAggregation>
- Enclosing class:
- IpPrefixAggregation
public static class IpPrefixAggregation.Builder extends BucketAggregationBase.AbstractBuilder<IpPrefixAggregation.Builder> implements ObjectBuilder<IpPrefixAggregation>
Builder for
IpPrefixAggregation
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description IpPrefixAggregation.Builder
appendPrefixLength(java.lang.Boolean value)
Defines whether the prefix length is appended to IP address keys in the response.IpPrefixAggregation
build()
Builds aIpPrefixAggregation
.IpPrefixAggregation.Builder
field(java.lang.String value)
Required - The document IP address field to aggregation on.IpPrefixAggregation.Builder
isIpv6(java.lang.Boolean value)
Defines whether the prefix applies to IPv6 addresses.IpPrefixAggregation.Builder
keyed(java.lang.Boolean value)
Defines whether buckets are returned as a hash rather than an array in the response.IpPrefixAggregation.Builder
minDocCount(java.lang.Long value)
Minimum number of documents for buckets to be included in the response.IpPrefixAggregation.Builder
prefixLength(int value)
Required - Length of the network prefix.protected IpPrefixAggregation.Builder
self()
Methods inherited from class co.elastic.clients.elasticsearch._types.aggregations.AggregationBase.AbstractBuilder
meta, meta, name
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
field
Required - The document IP address field to aggregation on. The field mapping type must beip
API name:
field
-
prefixLength
Required - Length of the network prefix. For IPv4 addresses the accepted range is [0, 32]. For IPv6 addresses the accepted range is [0, 128].API name:
prefix_length
-
isIpv6
Defines whether the prefix applies to IPv6 addresses.API name:
is_ipv6
-
appendPrefixLength
Defines whether the prefix length is appended to IP address keys in the response.API name:
append_prefix_length
-
keyed
Defines whether buckets are returned as a hash rather than an array in the response.API name:
keyed
-
minDocCount
Minimum number of documents for buckets to be included in the response.API name:
min_doc_count
-
self
- Specified by:
self
in classAggregationBase.AbstractBuilder<IpPrefixAggregation.Builder>
-
build
Builds aIpPrefixAggregation
.- Specified by:
build
in interfaceObjectBuilder<IpPrefixAggregation>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-