Class IndexTemplate.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<IndexTemplate.Builder>
co.elastic.clients.elasticsearch.indices.IndexTemplate.Builder
- All Implemented Interfaces:
WithJson<IndexTemplate.Builder>
,ObjectBuilder<IndexTemplate>
- Enclosing class:
- IndexTemplate
public static class IndexTemplate.Builder
extends WithJsonObjectBuilderBase<IndexTemplate.Builder>
implements ObjectBuilder<IndexTemplate>
Builder for
IndexTemplate
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal IndexTemplate.Builder
allowAutoCreate
(Boolean value) API name:allow_auto_create
build()
Builds aIndexTemplate
.final IndexTemplate.Builder
composedOf
(String value, String... values) Required - An ordered list of component template names.final IndexTemplate.Builder
composedOf
(List<String> list) Required - An ordered list of component template names.final IndexTemplate.Builder
If this object is included, the template is used to create data streams and their backing indices.final IndexTemplate.Builder
dataStream
(Function<IndexTemplateDataStreamConfiguration.Builder, ObjectBuilder<IndexTemplateDataStreamConfiguration>> fn) If this object is included, the template is used to create data streams and their backing indices.final IndexTemplate.Builder
indexPatterns
(String value, String... values) Required - Name of the index template.final IndexTemplate.Builder
indexPatterns
(List<String> list) Required - Name of the index template.final IndexTemplate.Builder
Optional user metadata about the index template.final IndexTemplate.Builder
Optional user metadata about the index template.final IndexTemplate.Builder
Priority to determine index template precedence when a new data stream or index is created.protected IndexTemplate.Builder
self()
final IndexTemplate.Builder
template
(IndexTemplateSummary value) Template to be applied.final IndexTemplate.Builder
Template to be applied.final IndexTemplate.Builder
Version number used to manage index 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
-
indexPatterns
Required - Name of the index template.API name:
index_patterns
Adds all elements of
list
toindexPatterns
. -
indexPatterns
Required - Name of the index template.API name:
index_patterns
Adds one or more values to
indexPatterns
. -
composedOf
Required - An ordered list of component template names. Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.API name:
composed_of
Adds all elements of
list
tocomposedOf
. -
composedOf
Required - An ordered list of component template names. Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.API name:
composed_of
Adds one or more values to
composedOf
. -
template
Template to be applied. It may optionally include analiases
,mappings
, orsettings
configuration.API name:
template
-
template
public final IndexTemplate.Builder template(Function<IndexTemplateSummary.Builder, ObjectBuilder<IndexTemplateSummary>> fn) Template to be applied. It may optionally include analiases
,mappings
, orsettings
configuration.API name:
template
-
version
Version number used to manage index templates externally. This number is not automatically generated by Elasticsearch.API name:
version
-
priority
Priority to determine index template precedence when a new data stream or index is created. The index template with the highest priority is chosen. If no priority is specified the template is treated as though it is of priority 0 (lowest priority). This number is not automatically generated by Elasticsearch.API name:
priority
-
meta
Optional user metadata about the index 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 index template. May have any contents. This map is not automatically generated by Elasticsearch.API name:
_meta
Adds an entry to
meta
. -
allowAutoCreate
API name:allow_auto_create
-
dataStream
If this object is included, the template is used to create data streams and their backing indices. Supports an empty object. Data streams require a matching index template with adata_stream
object.API name:
data_stream
-
dataStream
public final IndexTemplate.Builder dataStream(Function<IndexTemplateDataStreamConfiguration.Builder, ObjectBuilder<IndexTemplateDataStreamConfiguration>> fn) If this object is included, the template is used to create data streams and their backing indices. Supports an empty object. Data streams require a matching index template with adata_stream
object.API name:
data_stream
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<IndexTemplate.Builder>
-
build
Builds aIndexTemplate
.- Specified by:
build
in interfaceObjectBuilder<IndexTemplate>
- Throws:
NullPointerException
- if some of the required fields are null.
-