Class ContextMethod.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<ContextMethod.Builder>
co.elastic.clients.elasticsearch.core.get_script_context.ContextMethod.Builder
- All Implemented Interfaces:
WithJson<ContextMethod.Builder>
,ObjectBuilder<ContextMethod>
- Enclosing class:
- ContextMethod
public static class ContextMethod.Builder extends WithJsonObjectBuilderBase<ContextMethod.Builder> implements ObjectBuilder<ContextMethod>
Builder for
ContextMethod
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description ContextMethod
build()
Builds aContextMethod
.ContextMethod.Builder
name(java.lang.String value)
Required - API name:name
ContextMethod.Builder
params(ContextMethodParam value, ContextMethodParam... values)
Required - API name:params
ContextMethod.Builder
params(java.util.function.Function<ContextMethodParam.Builder,ObjectBuilder<ContextMethodParam>> fn)
Required - API name:params
ContextMethod.Builder
params(java.util.List<ContextMethodParam> list)
Required - API name:params
ContextMethod.Builder
returnType(java.lang.String value)
Required - API name:return_type
protected ContextMethod.Builder
self()
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Required - API name:name
-
returnType
Required - API name:return_type
-
params
Required - API name:params
Adds all elements of
list
toparams
. -
params
Required - API name:params
Adds one or more values to
params
. -
params
public final ContextMethod.Builder params(java.util.function.Function<ContextMethodParam.Builder,ObjectBuilder<ContextMethodParam>> fn)Required - API name:params
Adds a value to
params
using a builder lambda. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<ContextMethod.Builder>
-
build
Builds aContextMethod
.- Specified by:
build
in interfaceObjectBuilder<ContextMethod>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-