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.BuilderThe context in which the script or search template should run.final PutScriptRequest.BuilderRequired - The identifier for the stored script or search template.final PutScriptRequest.BuildermasterTimeout(Time value) The period to wait for a connection to the master node.final PutScriptRequest.BuilderThe period to wait for a connection to the master node.final PutScriptRequest.Builderscript(StoredScript value) Required - The script or search template, its parameters, and its language.final PutScriptRequest.BuilderRequired - The script or search template, its parameters, and its language.protected PutScriptRequest.Builderself()final PutScriptRequest.BuilderThe period to wait for a response.final PutScriptRequest.BuilderThe period to wait for a response.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods 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-1to 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-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 -
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-1to 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-1to indicate that the request should never timeout.API name:
timeout -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<PutScriptRequest.Builder>
-
build
Builds aPutScriptRequest.- Specified by:
buildin interfaceObjectBuilder<PutScriptRequest>- Throws:
NullPointerException- if some of the required fields are null.
-