Class PutScriptRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.PutScriptRequest
- All Implemented Interfaces:
JsonpSerializable
Create or update a script or search template. Creates or updates a stored
script or search template.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<PutScriptRequest>
Json deserializer forPutScriptRequest
static final Endpoint<PutScriptRequest,
PutScriptResponse, ErrorResponse> Endpoint "put_script
". -
Method Summary
Modifier and TypeMethodDescriptionfinal String
context()
The context in which the script or search template should run.final String
id()
Required - The identifier for the stored script or search template.final Time
The period to wait for a connection to the master node.static PutScriptRequest
final StoredScript
script()
Required - 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()
The 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
The 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 - The identifier for the stored script or search template. It must be unique within the cluster.API name:
id
-
masterTimeout
The 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. It can also be set to-1
to indicate that the request should never timeout.API name:
master_timeout
-
script
Required - The script or search template, its parameters, and its language.API name:
script
-
timeout
The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. It can also be set to-1
to indicate that the request should never timeout.API name:
timeout
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupPutScriptRequestDeserializer
protected static void setupPutScriptRequestDeserializer(ObjectDeserializer<PutScriptRequest.Builder> op)
-