Class RenderSearchTemplateRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<RenderSearchTemplateRequest.Builder>
co.elastic.clients.elasticsearch.core.RenderSearchTemplateRequest.Builder
- All Implemented Interfaces:
WithJson<RenderSearchTemplateRequest.Builder>
,ObjectBuilder<RenderSearchTemplateRequest>
- Enclosing class:
- RenderSearchTemplateRequest
public static class RenderSearchTemplateRequest.Builder
extends RequestBase.AbstractBuilder<RenderSearchTemplateRequest.Builder>
implements ObjectBuilder<RenderSearchTemplateRequest>
Builder for
RenderSearchTemplateRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aRenderSearchTemplateRequest
.API name:file
The ID of the search template to render.Key-value pairs used to replace Mustache variables in the template.Key-value pairs used to replace Mustache variables in the template.protected RenderSearchTemplateRequest.Builder
self()
source
(ScriptSource value) An inline search template.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
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
file
API name:file
-
id
The ID of the search template to render. If nosource
is specified, this or the<template-id>
request path parameter is required. If you specify both this parameter and the<template-id>
parameter, the API uses only<template-id>
.API name:
id
-
params
Key-value pairs used to replace Mustache variables in the template. The key is the variable name. The value is the variable value.API name:
params
Adds all entries of
map
toparams
. -
params
Key-value pairs used to replace Mustache variables in the template. The key is the variable name. The value is the variable value.API name:
params
Adds an entry to
params
. -
source
An inline search template. It supports the same parameters as the search API's request body. These parameters also support Mustache variables. If noid
or<templated-id>
is specified, this parameter is required.API name:
source
-
source
public final RenderSearchTemplateRequest.Builder source(Function<ScriptSource.Builder, ObjectBuilder<ScriptSource>> fn) An inline search template. It supports the same parameters as the search API's request body. These parameters also support Mustache variables. If noid
or<templated-id>
is specified, this parameter is required.API name:
source
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<RenderSearchTemplateRequest.Builder>
-
build
Builds aRenderSearchTemplateRequest
.- Specified by:
build
in interfaceObjectBuilder<RenderSearchTemplateRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-