Class TimeRetentionPolicy.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<TimeRetentionPolicy.Builder>
co.elastic.clients.elasticsearch.transform.TimeRetentionPolicy.Builder
- All Implemented Interfaces:
WithJson<TimeRetentionPolicy.Builder>
,ObjectBuilder<TimeRetentionPolicy>
- Enclosing class:
- TimeRetentionPolicy
public static class TimeRetentionPolicy.Builder
extends WithJsonObjectBuilderBase<TimeRetentionPolicy.Builder>
implements ObjectBuilder<TimeRetentionPolicy>
Builder for
TimeRetentionPolicy
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aTimeRetentionPolicy
.Required - The date field that is used to calculate the age of the document.Required - Specifies the maximum age of a document in the destination index.Required - Specifies the maximum age of a document in the destination index.protected TimeRetentionPolicy.Builder
self()
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
field
Required - The date field that is used to calculate the age of the document.API name:
field
-
maxAge
Required - Specifies the maximum age of a document in the destination index. Documents that are older than the configured value are removed from the destination index.API name:
max_age
-
maxAge
Required - Specifies the maximum age of a document in the destination index. Documents that are older than the configured value are removed from the destination index.API name:
max_age
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<TimeRetentionPolicy.Builder>
-
build
Builds aTimeRetentionPolicy
.- Specified by:
build
in interfaceObjectBuilder<TimeRetentionPolicy>
- Throws:
NullPointerException
- if some of the required fields are null.
-