Class StateRequest.Builder

All Implemented Interfaces:
CopyableBuilder<StateRequest.Builder,StateRequest>, MutableBuilder<StateRequest.Builder,StateRequest>, ObjectBuilder<StateRequest>
Enclosing class:
StateRequest

public static class StateRequest.Builder extends RequestBase.AbstractBuilder<StateRequest.Builder> implements CopyableBuilder<StateRequest.Builder,StateRequest>
Builder for StateRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • copy

      @Nonnull public StateRequest.Builder copy()
      Description copied from interface: CopyableBuilder
      Create a new builder CopyableBuilder that is a copy of this one.
      Specified by:
      copy in interface CopyableBuilder<StateRequest.Builder,StateRequest>
      Returns:
      a new builder instance.
    • self

      @Nonnull protected StateRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<StateRequest.Builder>
    • allowNoIndices

      @Nonnull public final StateRequest.Builder allowNoIndices(@Nullable Boolean value)
      Whether to ignore a wildcard index expression that resolves into no concrete indexes. This includes the _all string or when no indexes have been specified.

      API name: allow_no_indices

    • clusterManagerTimeout

      @Nonnull public final StateRequest.Builder clusterManagerTimeout(@Nullable Time value)
      The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see Common parameters.

      API name: cluster_manager_timeout

    • clusterManagerTimeout

      @Nonnull public final StateRequest.Builder clusterManagerTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see Common parameters.

      API name: cluster_manager_timeout

    • expandWildcards

      @Nonnull public final StateRequest.Builder expandWildcards(List<ExpandWildcard> list)
      Specifies the type of index that wildcard expressions can match. Supports comma-separated values.

      API name: expand_wildcards

      Adds all elements of list to expandWildcards.

    • expandWildcards

      @Nonnull public final StateRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)
      Specifies the type of index that wildcard expressions can match. Supports comma-separated values.

      API name: expand_wildcards

      Adds one or more values to expandWildcards.

    • flatSettings

      @Nonnull public final StateRequest.Builder flatSettings(@Nullable Boolean value)
      Whether to return settings in the flat form, which can improve readability, especially for heavily nested settings. For example, the flat form of "cluster": { "max_shards_per_node": 500 } is "cluster.max_shards_per_node": "500".

      API name: flat_settings

    • ignoreUnavailable

      @Nonnull public final StateRequest.Builder ignoreUnavailable(@Nullable Boolean value)
      Whether the specified concrete indexes should be ignored when unavailable (missing or closed).

      API name: ignore_unavailable

    • index

      @Nonnull public final StateRequest.Builder index(List<String> list)
      A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indexes, omit this parameter or use * or _all.

      API name: index

      Adds all elements of list to index.

    • index

      @Nonnull public final StateRequest.Builder index(String value, String... values)
      A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indexes, omit this parameter or use * or _all.

      API name: index

      Adds one or more values to index.

    • local

      @Nonnull public final StateRequest.Builder local(@Nullable Boolean value)
      Whether to return information from the local node only instead of from the cluster manager node.

      API name: local

    • masterTimeout

      @Deprecated @Nonnull public final StateRequest.Builder masterTimeout(@Nullable Time value)
      Deprecated.
      A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts 0 without a unit and -1 to indicate an unspecified value.

      API name: master_timeout

    • masterTimeout

      @Deprecated @Nonnull public final StateRequest.Builder masterTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      Deprecated.
      A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts 0 without a unit and -1 to indicate an unspecified value.

      API name: master_timeout

    • metric

      @Nonnull public final StateRequest.Builder metric(List<ClusterStateMetric> list)
      Limits the information returned to only the specified metric groups.

      API name: metric

      Adds all elements of list to metric.

    • metric

      @Nonnull public final StateRequest.Builder metric(ClusterStateMetric value, ClusterStateMetric... values)
      Limits the information returned to only the specified metric groups.

      API name: metric

      Adds one or more values to metric.

    • waitForMetadataVersion

      @Nonnull public final StateRequest.Builder waitForMetadataVersion(@Nullable Long value)
      Wait for the metadata version to be equal or greater than the specified metadata version.

      API name: wait_for_metadata_version

    • waitForTimeout

      @Nonnull public final StateRequest.Builder waitForTimeout(@Nullable Time value)
      The maximum time to wait for wait_for_metadata_version before timing out.

      API name: wait_for_timeout

    • waitForTimeout

      @Nonnull public final StateRequest.Builder waitForTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      The maximum time to wait for wait_for_metadata_version before timing out.

      API name: wait_for_timeout

    • build

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