Class SimulateTemplateRequest.Builder

All Implemented Interfaces:
WithJson<SimulateTemplateRequest.Builder>, ObjectBuilder<SimulateTemplateRequest>
Enclosing class:
SimulateTemplateRequest

public static class SimulateTemplateRequest.Builder extends RequestBase.AbstractBuilder<SimulateTemplateRequest.Builder> implements ObjectBuilder<SimulateTemplateRequest>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • 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 to meta.

    • meta

      public final SimulateTemplateRequest.Builder meta(String key, JsonData value)
      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

      public final SimulateTemplateRequest.Builder allowAutoCreate(@Nullable Boolean value)
      This setting overrides the value of the action.auto_create_index cluster setting. If set to true in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via actions.auto_create_index. If set to false, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.

      API name: allow_auto_create

    • cause

      public final SimulateTemplateRequest.Builder cause(@Nullable String value)
      User defined reason for dry-run creating the new template for simulation purposes

      API name: cause

    • composedOf

      public final SimulateTemplateRequest.Builder composedOf(List<String> list)
      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 to composedOf.

    • composedOf

      public final SimulateTemplateRequest.Builder composedOf(String value, String... values)
      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.

    • create

      public final SimulateTemplateRequest.Builder create(@Nullable Boolean value)
      If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation.

      API name: create

    • dataStream

      public final SimulateTemplateRequest.Builder dataStream(@Nullable DataStreamVisibility value)
      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 a data_stream object.

      API name: data_stream

    • 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 a data_stream object.

      API name: data_stream

    • deprecated

      public final SimulateTemplateRequest.Builder deprecated(@Nullable Boolean value)
      Marks this index template as deprecated. When creating or updating a non-deprecated index template that uses deprecated components, Elasticsearch will emit a deprecation warning.

      API name: deprecated

    • ignoreMissingComponentTemplates

      public final SimulateTemplateRequest.Builder ignoreMissingComponentTemplates(List<String> list)
      The configuration option ignore_missing_component_templates can be used when an index template references a component template that might not exist

      API name: ignore_missing_component_templates

      Adds all elements of list to ignoreMissingComponentTemplates.

    • ignoreMissingComponentTemplates

      public final SimulateTemplateRequest.Builder ignoreMissingComponentTemplates(String value, String... values)
      The configuration option ignore_missing_component_templates can be used when an index template references a component template that might not exist

      API name: ignore_missing_component_templates

      Adds one or more values to ignoreMissingComponentTemplates.

    • includeDefaults

      public final SimulateTemplateRequest.Builder includeDefaults(@Nullable Boolean value)
      If true, returns all relevant default configurations for the index template.

      API name: include_defaults

    • indexPatterns

      public final SimulateTemplateRequest.Builder indexPatterns(List<String> list)
      Array of wildcard (*) expressions used to match the names of data streams and indices during creation.

      API name: index_patterns

      Adds all elements of list to indexPatterns.

    • indexPatterns

      public final SimulateTemplateRequest.Builder indexPatterns(String value, String... values)
      Array of wildcard (*) expressions used to match the names of data streams and indices during creation.

      API name: index_patterns

      Adds one or more values to indexPatterns.

    • masterTimeout

      public final SimulateTemplateRequest.Builder masterTimeout(@Nullable Time value)
      Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

      API name: master_timeout

    • masterTimeout

      Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

      API name: master_timeout

    • name

      public final SimulateTemplateRequest.Builder name(@Nullable String value)
      Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit this parameter and specify the template configuration in the request body.

      API name: name

    • priority

      public final SimulateTemplateRequest.Builder priority(@Nullable Long value)
      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

    • template

      public final SimulateTemplateRequest.Builder template(@Nullable IndexTemplateMapping value)
      Template to be applied. It may optionally include an aliases, mappings, or settings configuration.

      API name: template

    • template

      Template to be applied. It may optionally include an aliases, mappings, or settings configuration.

      API name: template

    • version

      public final SimulateTemplateRequest.Builder version(@Nullable Long value)
      Version number used to manage index templates externally. This number is not automatically generated by Elasticsearch.

      API name: version

    • self

      Specified by:
      self in class RequestBase.AbstractBuilder<SimulateTemplateRequest.Builder>
    • build

      public SimulateTemplateRequest build()
      Specified by:
      build in interface ObjectBuilder<SimulateTemplateRequest>
      Throws:
      NullPointerException - if some of the required fields are null.