Class NodeStatistics.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch._types.NodeStatistics.Builder
-
- All Implemented Interfaces:
ObjectBuilder<NodeStatistics>
- Enclosing class:
- NodeStatistics
public static class NodeStatistics.Builder extends ObjectBuilderBase implements ObjectBuilder<NodeStatistics>
Builder forNodeStatistics
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeStatistics
build()
Builds aNodeStatistics
.NodeStatistics.Builder
failed(int value)
Required - Number of nodes that rejected the request or failed to respond.NodeStatistics.Builder
failures(java.util.function.Function<ErrorCause.Builder,ObjectBuilder<ErrorCause>> fn)
API name:failures
NodeStatistics.Builder
failures(java.util.List<ErrorCause> list)
API name:failures
NodeStatistics.Builder
failures(ErrorCause value, ErrorCause... values)
API name:failures
NodeStatistics.Builder
successful(int value)
Required - Number of nodes that responded successfully to the request.NodeStatistics.Builder
total(int value)
Required - Total number of nodes selected by the request.-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAdd, _listAddAll, _listAddAll, _mapPut, _mapPutAll
-
-
-
-
Method Detail
-
failures
public final NodeStatistics.Builder failures(java.util.List<ErrorCause> list)
API name:failures
Adds all elements of
list
tofailures
.
-
failures
public final NodeStatistics.Builder failures(ErrorCause value, ErrorCause... values)
API name:failures
Adds one or more values to
failures
.
-
failures
public final NodeStatistics.Builder failures(java.util.function.Function<ErrorCause.Builder,ObjectBuilder<ErrorCause>> fn)
API name:failures
Adds a value to
failures
using a builder lambda.
-
total
public final NodeStatistics.Builder total(int value)
Required - Total number of nodes selected by the request.API name:
total
-
successful
public final NodeStatistics.Builder successful(int value)
Required - Number of nodes that responded successfully to the request.API name:
successful
-
failed
public final NodeStatistics.Builder failed(int value)
Required - Number of nodes that rejected the request or failed to respond. If this value is not 0, a reason for the rejection or failure is included in the response.API name:
failed
-
build
public NodeStatistics build()
Builds aNodeStatistics
.- Specified by:
build
in interfaceObjectBuilder<NodeStatistics>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-
-