Class PostDataRequest.Builder<TData>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PostDataRequest.Builder<TData>>
co.elastic.clients.elasticsearch.ml.PostDataRequest.Builder<TData>
- All Implemented Interfaces:
WithJson<PostDataRequest.Builder<TData>>
,ObjectBuilder<PostDataRequest<TData>>
- Enclosing class:
- PostDataRequest<TData>
public static class PostDataRequest.Builder<TData>
extends RequestBase.AbstractBuilder<PostDataRequest.Builder<TData>>
implements ObjectBuilder<PostDataRequest<TData>>
Builder for
PostDataRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aPostDataRequest
.final PostDataRequest.Builder<TData>
Required - Request body.final PostDataRequest.Builder<TData>
Required - Request body.final PostDataRequest.Builder<TData>
Required - The name of the job receiving the datafinal PostDataRequest.Builder<TData>
Optional parameter to specify the end of the bucket resetting rangefinal PostDataRequest.Builder<TData>
resetStart
(String value) Optional parameter to specify the start of the bucket resetting rangeprotected PostDataRequest.Builder<TData>
self()
final PostDataRequest.Builder<TData>
tDataSerializer
(JsonpSerializer<TData> value) Serializer for TData.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
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
jobId
Required - The name of the job receiving the dataAPI name:
job_id
-
resetEnd
Optional parameter to specify the end of the bucket resetting rangeAPI name:
reset_end
-
resetStart
Optional parameter to specify the start of the bucket resetting rangeAPI name:
reset_start
-
data
Required - Request body.Adds all elements of
list
todata
. -
data
Required - Request body.Adds one or more values to
data
. -
tDataSerializer
Serializer for TData. If not set, an attempt will be made to find a serializer from the JSON context. -
withJson
public PostDataRequest.Builder<TData> 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<TData>
- Overrides:
withJson
in classWithJsonObjectBuilderBase<PostDataRequest.Builder<TData>>
- 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<PostDataRequest.Builder<TData>>
-
build
Builds aPostDataRequest
.- Specified by:
build
in interfaceObjectBuilder<TData>
- Throws:
NullPointerException
- if some of the required fields are null.
-