Class IndexTemplateMapping.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<IndexTemplateMapping.Builder>
co.elastic.clients.elasticsearch.indices.put_index_template.IndexTemplateMapping.Builder
- All Implemented Interfaces:
WithJson<IndexTemplateMapping.Builder>
,ObjectBuilder<IndexTemplateMapping>
- Enclosing class:
- IndexTemplateMapping
public static class IndexTemplateMapping.Builder
extends WithJsonObjectBuilderBase<IndexTemplateMapping.Builder>
implements ObjectBuilder<IndexTemplateMapping>
Builder for
IndexTemplateMapping
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAliases to add.aliases
(String key, Function<Alias.Builder, ObjectBuilder<Alias>> fn) Aliases to add.Aliases to add.build()
Builds aIndexTemplateMapping
.lifecycle
(DataStreamLifecycle value) API name:lifecycle
API name:lifecycle
mappings
(TypeMapping value) Mapping for fields in the index.Mapping for fields in the index.protected IndexTemplateMapping.Builder
self()
settings
(IndexSettings value) Configuration options for the index.Configuration options for the index.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
-
aliases
Aliases to add. If the index template includes adata_stream
object, these are data stream aliases. Otherwise, these are index aliases. Data stream aliases ignore theindex_routing
,routing
, andsearch_routing
options.API name:
aliases
Adds all entries of
map
toaliases
. -
aliases
Aliases to add. If the index template includes adata_stream
object, these are data stream aliases. Otherwise, these are index aliases. Data stream aliases ignore theindex_routing
,routing
, andsearch_routing
options.API name:
aliases
Adds an entry to
aliases
. -
aliases
public final IndexTemplateMapping.Builder aliases(String key, Function<Alias.Builder, ObjectBuilder<Alias>> fn) Aliases to add. If the index template includes adata_stream
object, these are data stream aliases. Otherwise, these are index aliases. Data stream aliases ignore theindex_routing
,routing
, andsearch_routing
options.API name:
aliases
Adds an entry to
aliases
using a builder lambda. -
mappings
Mapping for fields in the index. If specified, this mapping can include field names, field data types, and mapping parameters.API name:
mappings
-
mappings
public final IndexTemplateMapping.Builder mappings(Function<TypeMapping.Builder, ObjectBuilder<TypeMapping>> fn) Mapping for fields in the index. If specified, this mapping can include field names, field data types, and mapping parameters.API name:
mappings
-
settings
Configuration options for the index.API name:
settings
-
settings
public final IndexTemplateMapping.Builder settings(Function<IndexSettings.Builder, ObjectBuilder<IndexSettings>> fn) Configuration options for the index.API name:
settings
-
lifecycle
API name:lifecycle
-
lifecycle
public final IndexTemplateMapping.Builder lifecycle(Function<DataStreamLifecycle.Builder, ObjectBuilder<DataStreamLifecycle>> fn) API name:lifecycle
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<IndexTemplateMapping.Builder>
-
build
Builds aIndexTemplateMapping
.- Specified by:
build
in interfaceObjectBuilder<IndexTemplateMapping>
- Throws:
NullPointerException
- if some of the required fields are null.
-