Package org.opensearch.cluster.metadata
Class Template
- All Implemented Interfaces:
Diffable<Template>
,org.opensearch.core.common.io.stream.Writeable
,org.opensearch.core.xcontent.ToXContent
,org.opensearch.core.xcontent.ToXContentObject
@PublicApi(since="1.0.0")
public class Template
extends AbstractDiffable<Template>
implements org.opensearch.core.xcontent.ToXContentObject
A template consists of optional settings, mappings, or alias configuration for an index, however,
it is entirely independent from an index. It's a building block forming part of a regular index
template and a
ComponentTemplate
.- Opensearch.api:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionFields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionTemplate
(Settings settings, CompressedXContent mappings, Map<String, AliasMetadata> aliases) Template
(org.opensearch.core.common.io.stream.StreamInput in) -
Method Summary
Modifier and TypeMethodDescriptionaliases()
boolean
int
hashCode()
mappings()
settings()
toString()
org.opensearch.core.xcontent.XContentBuilder
toXContent
(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) void
writeTo
(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class org.opensearch.cluster.AbstractDiffable
diff, readDiffFrom
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opensearch.core.xcontent.ToXContentObject
isFragment
-
Field Details
-
PARSER
-
-
Constructor Details
-
Template
public Template(@Nullable Settings settings, @Nullable CompressedXContent mappings, @Nullable Map<String, AliasMetadata> aliases) -
Template
- Throws:
IOException
-
-
Method Details
-
settings
-
mappings
-
aliases
-
writeTo
- Specified by:
writeTo
in interfaceorg.opensearch.core.common.io.stream.Writeable
- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-
toXContent
public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.opensearch.core.xcontent.ToXContent
- Throws:
IOException
-