Class TemplateConfig.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<TemplateConfig.Builder>
co.elastic.clients.elasticsearch.core.msearch_template.TemplateConfig.Builder
- All Implemented Interfaces:
WithJson<TemplateConfig.Builder>
,ObjectBuilder<TemplateConfig>
- Enclosing class:
- TemplateConfig
public static class TemplateConfig.Builder extends WithJsonObjectBuilderBase<TemplateConfig.Builder> implements ObjectBuilder<TemplateConfig>
Builder for
TemplateConfig
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description TemplateConfig
build()
Builds aTemplateConfig
.TemplateConfig.Builder
explain(java.lang.Boolean value)
API name:explain
TemplateConfig.Builder
id(java.lang.String value)
ID of the search template to use.TemplateConfig.Builder
params(java.lang.String key, JsonData value)
API name:params
TemplateConfig.Builder
params(java.util.Map<java.lang.String,JsonData> map)
API name:params
TemplateConfig.Builder
profile(java.lang.Boolean value)
API name:profile
protected TemplateConfig.Builder
self()
TemplateConfig.Builder
source(java.lang.String value)
An inline search template.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
-
explain
API name:explain
-
id
ID of the search template to use. If no source is specified, this parameter is required.API name:
id
-
params
API name:params
Adds all entries of
map
toparams
. -
params
API name:params
Adds an entry to
params
. -
profile
API name:profile
-
source
An inline search template. Supports the same parameters as the search API's request body. Also supports Mustache variables. If no id is specified, this parameter is required.API name:
source
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<TemplateConfig.Builder>
-
build
Builds aTemplateConfig
.- Specified by:
build
in interfaceObjectBuilder<TemplateConfig>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-