Class IndexTemplate

java.lang.Object
org.opensearch.client.opensearch.indices.IndexTemplate
All Implemented Interfaces:
JsonpSerializable, PlainJsonSerializable, ToCopyableBuilder<IndexTemplate.Builder,IndexTemplate>

@JsonpDeserializable @Generated("org.opensearch.client.codegen.CodeGenerator") public class IndexTemplate extends Object implements PlainJsonSerializable, ToCopyableBuilder<IndexTemplate.Builder,IndexTemplate>
The configuration for an index template.
  • Field Details

  • Method Details

    • of

    • allowAutoCreate

      @Nullable public final Boolean allowAutoCreate()
      Whether the template allows automatic index creation.

      API name: allow_auto_create

    • composedOf

      @Nonnull public final List<String> 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_of

    • dataStream

      @Nullable public final IndexTemplateDataStreamConfiguration dataStream()
      API name: data_stream
    • indexPatterns

      @Nonnull public final List<String> indexPatterns()
      Required - API name: index_patterns
    • meta

      @Nonnull public final Map<String,JsonData> meta()
      API name: _meta
    • priority

      @Nullable public final Long 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

      @Nullable public final IndexTemplateSummary template()
      API name: template
    • version

      @Nullable public final Long version()
      API name: version
    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toBuilder

      @Nonnull public IndexTemplate.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Create a new builder ToCopyableBuilder that is initialised with the current state of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<IndexTemplate.Builder,IndexTemplate>
      Returns:
      a new builder instance.
    • builder

      @Nonnull public static IndexTemplate.Builder builder()
    • setupIndexTemplateDeserializer

      protected static void setupIndexTemplateDeserializer(ObjectDeserializer<IndexTemplate.Builder> op)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object