Class DownsampleRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<DownsampleRequest.Builder>
co.elastic.clients.elasticsearch.indices.DownsampleRequest.Builder
- All Implemented Interfaces:
WithJson<DownsampleRequest.Builder>
,ObjectBuilder<DownsampleRequest>
- Enclosing class:
- DownsampleRequest
public static class DownsampleRequest.Builder extends RequestBase.AbstractBuilder<DownsampleRequest.Builder> implements ObjectBuilder<DownsampleRequest>
Builder for
DownsampleRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description DownsampleRequest
build()
Builds aDownsampleRequest
.DownsampleRequest.Builder
config(DownsampleConfig value)
Required - Request body.DownsampleRequest.Builder
config(java.util.function.Function<DownsampleConfig.Builder,ObjectBuilder<DownsampleConfig>> fn)
Required - Request body.DownsampleRequest.Builder
index(java.lang.String value)
Required - The index to downsampleprotected DownsampleRequest.Builder
self()
DownsampleRequest.Builder
targetIndex(java.lang.String value)
Required - The name of the target index to store downsampled dataDownsampleRequest.Builder
withJson(jakarta.json.stream.JsonParser parser, JsonpMapper mapper)
Sets additional properties values on this object by reading from a JSON input.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
-
index
Required - The index to downsampleAPI name:
index
-
targetIndex
Required - The name of the target index to store downsampled dataAPI name:
target_index
-
config
Required - Request body. -
config
public final DownsampleRequest.Builder config(java.util.function.Function<DownsampleConfig.Builder,ObjectBuilder<DownsampleConfig>> fn)Required - Request body. -
withJson
public DownsampleRequest.Builder withJson(jakarta.json.stream.JsonParser parser, JsonpMapper mapper)Description copied from interface:WithJson
Sets additional properties values on this object by reading from a JSON input.This is a "partial deserialization": properties that were already set keep their value if they're not present in the JSON input, and properties can also be set after having called this method, including overriding those read from the JSON input.
This low level variant of
withJson
gives full control on the json parser and object mapper. Most of the time usingWithJson.withJson(Reader)
andWithJson.withJson(InputStream)
will be more convenient.- Specified by:
withJson
in interfaceWithJson<DownsampleRequest.Builder>
- Overrides:
withJson
in classWithJsonObjectBuilderBase<DownsampleRequest.Builder>
- Parameters:
parser
- the JSONP parsermapper
- the JSONP mapper used to deserialize values and nested objects- Returns:
- this object
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<DownsampleRequest.Builder>
-
build
Builds aDownsampleRequest
.- Specified by:
build
in interfaceObjectBuilder<DownsampleRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-