Class Destination.Builder

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

public static class Destination.Builder extends WithJsonObjectBuilderBase<Destination.Builder> implements ObjectBuilder<Destination>
Builder for Destination.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • index

      public final Destination.Builder index(String value)
      Required - The name of the data stream, index, or index alias you are copying to.

      API name: index

    • opType

      public final Destination.Builder opType(@Nullable OpType value)
      If it is create, the operation will only index documents that do not already exist (also known as "put if absent").

      IMPORTANT: To reindex to a data stream destination, this argument must be create.

      API name: op_type

    • pipeline

      public final Destination.Builder pipeline(@Nullable String value)
      The name of the pipeline to use.

      API name: pipeline

    • routing

      public final Destination.Builder routing(@Nullable String value)
      By default, a document's routing is preserved unless it's changed by the script. If it is keep, the routing on the bulk request sent for each match is set to the routing on the match. If it is discard, the routing on the bulk request sent for each match is set to null. If it is =value, the routing on the bulk request sent for each match is set to all value specified after the equals sign (=).

      API name: routing

    • versionType

      public final Destination.Builder versionType(@Nullable VersionType value)
      The versioning to use for the indexing operation.

      API name: version_type

    • self

      protected Destination.Builder self()
      Specified by:
      self in class WithJsonObjectBuilderBase<Destination.Builder>
    • build

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