Class PutScriptRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.PutScriptRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class PutScriptRequest extends RequestBase implements JsonpSerializable
Creates or updates a stored script or search template.
See Also:
  • Field Details

  • Method Details

    • of

    • context

      @Nullable public final String 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

      public final String id()
      Required - Identifier for the stored script or search template. Must be unique within the cluster.

      API name: id

    • masterTimeout

      @Nullable public final Time 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

      public final StoredScript script()
      Required - Contains the script or search template, its parameters, and its language.

      API name: script

    • timeout

      @Nullable public final Time 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

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • setupPutScriptRequestDeserializer

      protected static void setupPutScriptRequestDeserializer(ObjectDeserializer<PutScriptRequest.Builder> op)