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 forPutScriptRequeststatic final Endpoint<PutScriptRequest,PutScriptResponse, ErrorResponse> Endpoint "put_script". -
Method Summary
Modifier and TypeMethodDescriptionfinal Stringcontext()The context in which the script or search template should run.final Stringid()Required - The identifier for the stored script or search template.final TimeThe period to wait for a connection to the master node.static PutScriptRequestfinal StoredScriptscript()Required - The script or search template, its parameters, and its language.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal Timetimeout()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-1to 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-1to indicate that the request should never timeout.API name:
timeout -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
setupPutScriptRequestDeserializer
protected static void setupPutScriptRequestDeserializer(ObjectDeserializer<PutScriptRequest.Builder> op)
-