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.BuilderContext in which the script or search template should run.final PutScriptRequest.BuilderRequired - Identifier for the stored script or search template.final PutScriptRequest.BuildermasterTimeout(Time value) Period to wait for a connection to the master node.final PutScriptRequest.BuilderPeriod to wait for a connection to the master node.final PutScriptRequest.Builderscript(StoredScript value) Required - Contains the script or search template, its parameters, and its language.final PutScriptRequest.BuilderRequired - Contains the script or search template, its parameters, and its language.protected PutScriptRequest.Builderself()final PutScriptRequest.BuilderPeriod to wait for a response.final PutScriptRequest.BuilderPeriod 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
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 - Identifier for the stored script or search template. Must be unique within the cluster.API name:
id -
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 -
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
Required - Contains 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 - Contains the script or search template, its parameters, and its language.API name:
script -
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 -
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 -
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.
-