Class IndexTemplate.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch.indices.IndexTemplate.Builder
- All Implemented Interfaces:
CopyableBuilder<IndexTemplate.Builder,,IndexTemplate> MutableBuilder<IndexTemplate.Builder,,IndexTemplate> ObjectBuilder<IndexTemplate>
- Enclosing class:
IndexTemplate
public static class IndexTemplate.Builder
extends ObjectBuilderBase
implements CopyableBuilder<IndexTemplate.Builder,IndexTemplate>
Builder for
IndexTemplate.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal IndexTemplate.BuilderallowAutoCreate(Boolean value) Whether the template allows automatic index creation.build()Builds aIndexTemplate.final IndexTemplate.BuildercomposedOf(String value, String... values) An ordered list of component template names.final IndexTemplate.BuildercomposedOf(List<String> list) An ordered list of component template names.copy()Create a new builderCopyableBuilderthat is a copy of this one.final IndexTemplate.BuilderdataStream(Function<IndexTemplateDataStreamConfiguration.Builder, ObjectBuilder<IndexTemplateDataStreamConfiguration>> fn) API name:data_streamfinal IndexTemplate.BuilderAPI name:data_streamfinal IndexTemplate.BuilderindexPatterns(String value, String... values) Required - API name:index_patternsfinal IndexTemplate.BuilderindexPatterns(List<String> list) Required - API name:index_patternsfinal IndexTemplate.BuilderAPI name:_metafinal IndexTemplate.BuilderAPI name:_metafinal IndexTemplate.BuilderThe priority to determine index template precedence when a new data stream or index is created.final IndexTemplate.BuilderAPI name:templatefinal IndexTemplate.Buildertemplate(IndexTemplateSummary value) API name:templatefinal IndexTemplate.BuilderAPI name:versionMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<IndexTemplate.Builder,IndexTemplate> - Returns:
- a new builder instance.
-
allowAutoCreate
Whether the template allows automatic index creation.API name:
allow_auto_create -
composedOf
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_ofAdds all elements of
listtocomposedOf. -
composedOf
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_ofAdds one or more values to
composedOf. -
dataStream
@Nonnull public final IndexTemplate.Builder dataStream(@Nullable IndexTemplateDataStreamConfiguration value) API name:data_stream -
dataStream
@Nonnull public final IndexTemplate.Builder dataStream(Function<IndexTemplateDataStreamConfiguration.Builder, ObjectBuilder<IndexTemplateDataStreamConfiguration>> fn) API name:data_stream -
indexPatterns
Required - API name:index_patternsAdds all elements of
listtoindexPatterns. -
indexPatterns
Required - API name:index_patternsAdds one or more values to
indexPatterns. -
meta
API name:_metaAdds all elements of
maptometa. -
meta
API name:_metaAdds an entry to
meta. -
priority
The 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 OpenSearch.API name:
priority -
template
API name:template -
template
@Nonnull public final IndexTemplate.Builder template(Function<IndexTemplateSummary.Builder, ObjectBuilder<IndexTemplateSummary>> fn) API name:template -
version
API name:version -
build
Builds aIndexTemplate.- Specified by:
buildin interfaceObjectBuilder<IndexTemplate>- Throws:
NullPointerException- if some of the required fields are null.
-