Class PutScriptRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.PutScriptRequest
- All Implemented Interfaces:
JsonpSerializable
Creates or updates a stored script or search template.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<PutScriptRequest>
Json deserializer forPutScriptRequest
static final Endpoint<PutScriptRequest,
PutScriptResponse, ErrorResponse> Endpoint "put_script
". -
Method Summary
Modifier and TypeMethodDescriptionfinal String
context()
Context in which the script or search template should run.final String
id()
Required - Identifier for the stored script or search template.final Time
Period to wait for a connection to the master node.static PutScriptRequest
final StoredScript
script()
Required - Contains the script or search template, its parameters, and its language.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final Time
timeout()
Period to wait for a response.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forPutScriptRequest
-
_ENDPOINT
Endpoint "put_script
".
-
-
Method Details
-
of
public static PutScriptRequest of(Function<PutScriptRequest.Builder, ObjectBuilder<PutScriptRequest>> fn) -
context
Context in which the script or search template should run. To prevent errors, the API immediately compiles the script or template in this context.API name:
context
-
id
Required - Identifier for the stored script or search template. Must be unique within the cluster.API name:
id
-
masterTimeout
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout
-
script
Required - Contains the script or search template, its parameters, and its language.API name:
script
-
timeout
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name:
timeout
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupPutScriptRequestDeserializer
protected static void setupPutScriptRequestDeserializer(ObjectDeserializer<PutScriptRequest.Builder> op)
-