Class IngestRequest.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • componentTemplateSubstitutions

      public final IngestRequest.Builder componentTemplateSubstitutions(Map<String,ComponentTemplateNode> map)
      A map of component template names to substitute component template definition objects.

      API name: component_template_substitutions

      Adds all entries of map to componentTemplateSubstitutions.

    • componentTemplateSubstitutions

      public final IngestRequest.Builder componentTemplateSubstitutions(String key, ComponentTemplateNode value)
      A map of component template names to substitute component template definition objects.

      API name: component_template_substitutions

      Adds an entry to componentTemplateSubstitutions.

    • componentTemplateSubstitutions

      A map of component template names to substitute component template definition objects.

      API name: component_template_substitutions

      Adds an entry to componentTemplateSubstitutions using a builder lambda.

    • docs

      public final IngestRequest.Builder docs(List<Document> list)
      Required - Sample documents to test in the pipeline.

      API name: docs

      Adds all elements of list to docs.

    • docs

      public final IngestRequest.Builder docs(Document value, Document... values)
      Required - Sample documents to test in the pipeline.

      API name: docs

      Adds one or more values to docs.

    • docs

      Required - Sample documents to test in the pipeline.

      API name: docs

      Adds a value to docs using a builder lambda.

    • index

      public final IngestRequest.Builder index(@Nullable String value)
      The index to simulate ingesting into. This value can be overridden by specifying an index on each document. If you specify this parameter in the request path, it is used for any documents that do not explicitly specify an index argument.

      API name: index

    • indexTemplateSubstitutions

      public final IngestRequest.Builder indexTemplateSubstitutions(Map<String,IndexTemplate> map)
      A map of index template names to substitute index template definition objects.

      API name: index_template_substitutions

      Adds all entries of map to indexTemplateSubstitutions.

    • indexTemplateSubstitutions

      public final IngestRequest.Builder indexTemplateSubstitutions(String key, IndexTemplate value)
      A map of index template names to substitute index template definition objects.

      API name: index_template_substitutions

      Adds an entry to indexTemplateSubstitutions.

    • indexTemplateSubstitutions

      public final IngestRequest.Builder indexTemplateSubstitutions(String key, Function<IndexTemplate.Builder,ObjectBuilder<IndexTemplate>> fn)
      A map of index template names to substitute index template definition objects.

      API name: index_template_substitutions

      Adds an entry to indexTemplateSubstitutions using a builder lambda.

    • mappingAddition

      public final IngestRequest.Builder mappingAddition(@Nullable TypeMapping value)
      API name: mapping_addition
    • mappingAddition

      API name: mapping_addition
    • pipeline

      public final IngestRequest.Builder pipeline(@Nullable String value)
      The pipeline to use as the default pipeline. This value can be used to override the default pipeline of the index.

      API name: pipeline

    • pipelineSubstitutions

      public final IngestRequest.Builder pipelineSubstitutions(Map<String,Pipeline> map)
      Pipelines to test. If you don’t specify the pipeline request path parameter, this parameter is required. If you specify both this and the request path parameter, the API only uses the request path parameter.

      API name: pipeline_substitutions

      Adds all entries of map to pipelineSubstitutions.

    • pipelineSubstitutions

      public final IngestRequest.Builder pipelineSubstitutions(String key, Pipeline value)
      Pipelines to test. If you don’t specify the pipeline request path parameter, this parameter is required. If you specify both this and the request path parameter, the API only uses the request path parameter.

      API name: pipeline_substitutions

      Adds an entry to pipelineSubstitutions.

    • pipelineSubstitutions

      public final IngestRequest.Builder pipelineSubstitutions(String key, Function<Pipeline.Builder,ObjectBuilder<Pipeline>> fn)
      Pipelines to test. If you don’t specify the pipeline request path parameter, this parameter is required. If you specify both this and the request path parameter, the API only uses the request path parameter.

      API name: pipeline_substitutions

      Adds an entry to pipelineSubstitutions using a builder lambda.

    • self

      protected IngestRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<IngestRequest.Builder>
    • build

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