Class PutComponentTemplateRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutComponentTemplateRequest.Builder>
co.elastic.clients.elasticsearch.cluster.PutComponentTemplateRequest.Builder
- All Implemented Interfaces:
WithJson<PutComponentTemplateRequest.Builder>
,ObjectBuilder<PutComponentTemplateRequest>
- Enclosing class:
- PutComponentTemplateRequest
public static class PutComponentTemplateRequest.Builder
extends RequestBase.AbstractBuilder<PutComponentTemplateRequest.Builder>
implements ObjectBuilder<PutComponentTemplateRequest>
Builder for
PutComponentTemplateRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowAutoCreate
(Boolean value) This setting overrides the value of theaction.auto_create_index
cluster setting.build()
Builds aPutComponentTemplateRequest
.Whether the index template should only be added if new or can also replace an existing onemasterTimeout
(Time value) Specify timeout for connection to masterSpecify timeout for connection to masterOptional user metadata about the component template.Optional user metadata about the component template.Required - The name of the templateprotected PutComponentTemplateRequest.Builder
self()
template
(IndexState value) Required - The template to be applied which includes mappings, settings, or aliases configuration.Required - The template to be applied which includes mappings, settings, or aliases configuration.Version number used to manage component templates externally.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
-
meta
Optional user metadata about the component template. May have any contents. This map is not automatically generated by Elasticsearch.API name:
_meta
Adds all entries of
map
tometa
. -
meta
Optional user metadata about the component template. May have any contents. This map is not automatically generated by Elasticsearch.API name:
_meta
Adds an entry to
meta
. -
allowAutoCreate
This setting overrides the value of theaction.auto_create_index
cluster setting. If set totrue
in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled viaactions.auto_create_index
. If set tofalse
then data streams matching the template must always be explicitly created.API name:
allow_auto_create
-
create
Whether the index template should only be added if new or can also replace an existing oneAPI name:
create
-
masterTimeout
Specify timeout for connection to masterAPI name:
master_timeout
-
masterTimeout
public final PutComponentTemplateRequest.Builder masterTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) Specify timeout for connection to masterAPI name:
master_timeout
-
name
Required - The name of the templateAPI name:
name
-
template
Required - The template to be applied which includes mappings, settings, or aliases configuration.API name:
template
-
template
public final PutComponentTemplateRequest.Builder template(Function<IndexState.Builder, ObjectBuilder<IndexState>> fn) Required - The template to be applied which includes mappings, settings, or aliases configuration.API name:
template
-
version
Version number used to manage component templates externally. This number isn't automatically generated or incremented by Elasticsearch.API name:
version
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<PutComponentTemplateRequest.Builder>
-
build
Builds aPutComponentTemplateRequest
.- Specified by:
build
in interfaceObjectBuilder<PutComponentTemplateRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-