Class PostDataRequest.Builder<TData>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<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 WithJsonObjectBuilderBase<PostDataRequest.Builder<TData>> implements ObjectBuilder<PostDataRequest<TData>>
Builder for
PostDataRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description PostDataRequest<TData>
build()
Builds aPostDataRequest
.PostDataRequest.Builder<TData>
data(java.util.List<TData> list)
Required - Request body.PostDataRequest.Builder<TData>
data(TData value, TData... values)
Required - Request body.PostDataRequest.Builder<TData>
jobId(java.lang.String value)
Required - The name of the job receiving the dataPostDataRequest.Builder<TData>
resetEnd(java.lang.String value)
Optional parameter to specify the end of the bucket resetting rangePostDataRequest.Builder<TData>
resetStart(java.lang.String value)
Optional parameter to specify the start of the bucket resetting rangeprotected PostDataRequest.Builder<TData>
self()
PostDataRequest.Builder<TData>
tDataSerializer(JsonpSerializer<TData> value)
Serializer for TData.PostDataRequest.Builder<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
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
-
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.API name:
_value_body
Adds all elements of
list
todata
. -
data
Required - Request body.API name:
_value_body
Adds one or more values to
data
. -
tDataSerializer
public final PostDataRequest.Builder<TData> tDataSerializer(@Nullable JsonpSerializer<TData> value)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 classWithJsonObjectBuilderBase<PostDataRequest.Builder<TData>>
-
build
Builds aPostDataRequest
.- Specified by:
build
in interfaceObjectBuilder<TData>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-