Class RolloverRequest.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • alias

      public final RolloverRequest.Builder alias(String value)
      Required - Name of the data stream or index alias to roll over.

      API name: alias

    • aliases

      public final RolloverRequest.Builder aliases(Map<String,Alias> map)
      Aliases for the target index. Data streams do not support this parameter.

      API name: aliases

      Adds all entries of map to aliases.

    • aliases

      public final RolloverRequest.Builder aliases(String key, Alias value)
      Aliases for the target index. Data streams do not support this parameter.

      API name: aliases

      Adds an entry to aliases.

    • aliases

      Aliases for the target index. Data streams do not support this parameter.

      API name: aliases

      Adds an entry to aliases using a builder lambda.

    • conditions

      public final RolloverRequest.Builder conditions(@Nullable RolloverConditions value)
      Conditions for the rollover. If specified, Elasticsearch only performs the rollover if the current index satisfies these conditions. If this parameter is not specified, Elasticsearch performs the rollover unconditionally. If conditions are specified, at least one of them must be a max_* condition. The index will rollover if any max_* condition is satisfied and all min_* conditions are satisfied.

      API name: conditions

    • conditions

      Conditions for the rollover. If specified, Elasticsearch only performs the rollover if the current index satisfies these conditions. If this parameter is not specified, Elasticsearch performs the rollover unconditionally. If conditions are specified, at least one of them must be a max_* condition. The index will rollover if any max_* condition is satisfied and all min_* conditions are satisfied.

      API name: conditions

    • dryRun

      public final RolloverRequest.Builder dryRun(@Nullable Boolean value)
      If true, checks whether the current index satisfies the specified conditions but does not perform a rollover.

      API name: dry_run

    • mappings

      public final RolloverRequest.Builder mappings(@Nullable TypeMapping value)
      Mapping for fields in the index. If specified, this mapping can include field names, field data types, and mapping paramaters.

      API name: mappings

    • mappings

      Mapping for fields in the index. If specified, this mapping can include field names, field data types, and mapping paramaters.

      API name: mappings

    • masterTimeout

      public final RolloverRequest.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

      public final RolloverRequest.Builder masterTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      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

    • newIndex

      public final RolloverRequest.Builder newIndex(@Nullable String value)
      Name of the index to create. Supports date math. Data streams do not support this parameter.

      API name: new_index

    • settings

      public final RolloverRequest.Builder settings(Map<String,JsonData> map)
      Configuration options for the index. Data streams do not support this parameter.

      API name: settings

      Adds all entries of map to settings.

    • settings

      public final RolloverRequest.Builder settings(String key, JsonData value)
      Configuration options for the index. Data streams do not support this parameter.

      API name: settings

      Adds an entry to settings.

    • timeout

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

      API name: timeout

    • timeout

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

      API name: timeout

    • waitForActiveShards

      public final RolloverRequest.Builder waitForActiveShards(@Nullable WaitForActiveShards value)
      The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).

      API name: wait_for_active_shards

    • waitForActiveShards

      The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1).

      API name: wait_for_active_shards

    • self

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

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