Class PutScriptRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutScriptRequest.Builder>
co.elastic.clients.elasticsearch.core.PutScriptRequest.Builder
- All Implemented Interfaces:
WithJson<PutScriptRequest.Builder>
,ObjectBuilder<PutScriptRequest>
- Enclosing class:
- PutScriptRequest
public static class PutScriptRequest.Builder
extends RequestBase.AbstractBuilder<PutScriptRequest.Builder>
implements ObjectBuilder<PutScriptRequest>
Builder for
PutScriptRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aPutScriptRequest
.final PutScriptRequest.Builder
The context in which the script or search template should run.final PutScriptRequest.Builder
Required - The identifier for the stored script or search template.final PutScriptRequest.Builder
masterTimeout
(Time value) The period to wait for a connection to the master node.final PutScriptRequest.Builder
The period to wait for a connection to the master node.final PutScriptRequest.Builder
script
(StoredScript value) Required - The script or search template, its parameters, and its language.final PutScriptRequest.Builder
Required - The script or search template, its parameters, and its language.protected PutScriptRequest.Builder
self()
final PutScriptRequest.Builder
The period to wait for a response.final PutScriptRequest.Builder
The period to wait for a response.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
-
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
-
script
public final PutScriptRequest.Builder script(Function<StoredScript.Builder, ObjectBuilder<StoredScript>> fn) 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
-
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
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<PutScriptRequest.Builder>
-
build
Builds aPutScriptRequest
.- Specified by:
build
in interfaceObjectBuilder<PutScriptRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-