Class PutRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutRequest.Builder>
co.elastic.clients.elasticsearch.inference.PutRequest.Builder
- All Implemented Interfaces:
WithJson<PutRequest.Builder>
,ObjectBuilder<PutRequest>
- Enclosing class:
- PutRequest
public static class PutRequest.Builder
extends RequestBase.AbstractBuilder<PutRequest.Builder>
implements ObjectBuilder<PutRequest>
Builder for
PutRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aPutRequest
.final PutRequest.Builder
inferenceConfig
(InferenceEndpoint value) Required - Request body.final PutRequest.Builder
Required - Request body.final PutRequest.Builder
inferenceId
(String value) Required - The inference Idprotected PutRequest.Builder
self()
final PutRequest.Builder
The task type.final PutRequest.Builder
Specifies the amount of time to wait for the inference endpoint to be created.final PutRequest.Builder
Specifies the amount of time to wait for the inference endpoint to be created.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
-
inferenceId
Required - The inference IdAPI name:
inference_id
-
taskType
The task type. Refer to the integration list in the API description for the available task types.API name:
task_type
-
timeout
Specifies the amount of time to wait for the inference endpoint to be created.API name:
timeout
-
timeout
Specifies the amount of time to wait for the inference endpoint to be created.API name:
timeout
-
inferenceConfig
Required - Request body. -
inferenceConfig
public final PutRequest.Builder inferenceConfig(Function<InferenceEndpoint.Builder, ObjectBuilder<InferenceEndpoint>> fn) Required - Request body. -
withJson
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<PutRequest.Builder>
- Overrides:
withJson
in classWithJsonObjectBuilderBase<PutRequest.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<PutRequest.Builder>
-
build
Builds aPutRequest
.- Specified by:
build
in interfaceObjectBuilder<PutRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-