Class ContextMethod.Builder
java.lang.Object
co.elastic.clients.elasticsearch._core.get_script_context.ContextMethod.Builder
- All Implemented Interfaces:
ObjectBuilder<ContextMethod>
- Enclosing class:
- ContextMethod
public static class ContextMethod.Builder extends java.lang.Object implements ObjectBuilder<ContextMethod>
Builder for
ContextMethod
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description ContextMethod.Builder
addParams(ContextMethodParam value)
Add a value toparams(List)
, creating the list if needed.ContextMethod.Builder
addParams(java.util.function.Function<ContextMethodParam.Builder,ObjectBuilder<ContextMethodParam>> fn)
Add a value toparams(List)
, creating the list if needed.ContextMethod
build()
Builds aContextMethod
.ContextMethod.Builder
name(java.lang.String value)
Required - API name:name
ContextMethod.Builder
params(ContextMethodParam... value)
Required - API name:params
ContextMethod.Builder
params(java.util.function.Function<ContextMethodParam.Builder,ObjectBuilder<ContextMethodParam>> fn)
Setparams(List)
to a singleton list.ContextMethod.Builder
params(java.util.List<ContextMethodParam> value)
Required - API name:params
ContextMethod.Builder
returnType(java.lang.String value)
Required - API name:return_type
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
-
params
Required - API name:params
-
addParams
Add a value toparams(List)
, creating the list if needed. -
params
public ContextMethod.Builder params(java.util.function.Function<ContextMethodParam.Builder,ObjectBuilder<ContextMethodParam>> fn)Setparams(List)
to a singleton list. -
addParams
public ContextMethod.Builder addParams(java.util.function.Function<ContextMethodParam.Builder,ObjectBuilder<ContextMethodParam>> fn)Add a value toparams(List)
, creating the list if needed. -
build
Builds aContextMethod
.- Specified by:
build
in interfaceObjectBuilder<ContextMethod>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-