Class TimeRetentionPolicy.Builder
java.lang.Object
co.elastic.clients.elasticsearch.transform.TimeRetentionPolicy.Builder
- All Implemented Interfaces:
ObjectBuilder<TimeRetentionPolicy>
- Enclosing class:
- TimeRetentionPolicy
public static class TimeRetentionPolicy.Builder extends java.lang.Object implements ObjectBuilder<TimeRetentionPolicy>
Builder for
TimeRetentionPolicy
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description TimeRetentionPolicy
build()
Builds aTimeRetentionPolicy
.TimeRetentionPolicy.Builder
field(java.lang.String value)
The date field that is used to calculate the age of the document.TimeRetentionPolicy.Builder
maxAge(java.lang.String value)
Specifies the maximum age of a document in the destination index.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
The date field that is used to calculate the age of the document.API name:
field
-
maxAge
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
-
build
Builds aTimeRetentionPolicy
.- Specified by:
build
in interfaceObjectBuilder<TimeRetentionPolicy>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-