Class HealthResponse.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch.cluster.HealthResponse.Builder
-
- All Implemented Interfaces:
ObjectBuilder<HealthResponse>
- Enclosing class:
- HealthResponse
public static class HealthResponse.Builder extends ObjectBuilderBase implements ObjectBuilder<HealthResponse>
Builder forHealthResponse.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HealthResponse.BuilderactivePrimaryShards(int value)Required - The number of active primary shards.HealthResponse.BuilderactiveShards(int value)Required - The total number of active primary and replica shards.HealthResponse.BuilderactiveShardsPercentAsNumber(java.lang.String value)Required - The ratio of active shards in the cluster expressed as a percentage.HealthResponsebuild()Builds aHealthResponse.HealthResponse.BuilderclusterName(java.lang.String value)Required - The name of the cluster.HealthResponse.BuilderdelayedUnassignedShards(int value)Required - The number of shards whose allocation has been delayed by the timeout settings.HealthResponse.Builderindices(java.lang.String key, java.util.function.Function<IndexHealthStats.Builder,ObjectBuilder<IndexHealthStats>> fn)API name:indicesHealthResponse.Builderindices(java.lang.String key, IndexHealthStats value)API name:indicesHealthResponse.Builderindices(java.util.Map<java.lang.String,IndexHealthStats> map)API name:indicesHealthResponse.BuilderinitializingShards(int value)Required - The number of shards that are under initialization.HealthResponse.BuildernumberOfDataNodes(int value)Required - The number of nodes that are dedicated data nodes.HealthResponse.BuildernumberOfInFlightFetch(int value)Required - API name:number_of_in_flight_fetchHealthResponse.BuildernumberOfNodes(int value)Required - The number of nodes within the cluster.HealthResponse.BuildernumberOfPendingTasks(int value)Required - The number of cluster-level changes that have not yet been executed.HealthResponse.BuilderrelocatingShards(int value)Required - The number of shards that are under relocation.HealthResponse.Builderstatus(HealthStatus value)Required - API name:statusHealthResponse.BuildertaskMaxWaitingInQueueMillis(java.lang.String value)Required - The time expressed in milliseconds since the earliest initiated task is waiting for being performed.HealthResponse.BuildertimedOut(boolean value)Required - If false the response returned within the period of time that is specified by the timeout parameter (30s by default)HealthResponse.BuilderunassignedShards(int value)Required - The number of shards that are not allocated.-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
-
-
-
Method Detail
-
activePrimaryShards
public final HealthResponse.Builder activePrimaryShards(int value)
Required - The number of active primary shards.API name:
active_primary_shards
-
activeShards
public final HealthResponse.Builder activeShards(int value)
Required - The total number of active primary and replica shards.API name:
active_shards
-
activeShardsPercentAsNumber
public final HealthResponse.Builder activeShardsPercentAsNumber(java.lang.String value)
Required - The ratio of active shards in the cluster expressed as a percentage.API name:
active_shards_percent_as_number
-
clusterName
public final HealthResponse.Builder clusterName(java.lang.String value)
Required - The name of the cluster.API name:
cluster_name
-
delayedUnassignedShards
public final HealthResponse.Builder delayedUnassignedShards(int value)
Required - The number of shards whose allocation has been delayed by the timeout settings.API name:
delayed_unassigned_shards
-
indices
public final HealthResponse.Builder indices(java.util.Map<java.lang.String,IndexHealthStats> map)
API name:indicesAdds all entries of
maptoindices.
-
indices
public final HealthResponse.Builder indices(java.lang.String key, IndexHealthStats value)
API name:indicesAdds an entry to
indices.
-
indices
public final HealthResponse.Builder indices(java.lang.String key, java.util.function.Function<IndexHealthStats.Builder,ObjectBuilder<IndexHealthStats>> fn)
API name:indicesAdds an entry to
indicesusing a builder lambda.
-
initializingShards
public final HealthResponse.Builder initializingShards(int value)
Required - The number of shards that are under initialization.API name:
initializing_shards
-
numberOfDataNodes
public final HealthResponse.Builder numberOfDataNodes(int value)
Required - The number of nodes that are dedicated data nodes.API name:
number_of_data_nodes
-
numberOfInFlightFetch
public final HealthResponse.Builder numberOfInFlightFetch(int value)
Required - API name:number_of_in_flight_fetch
-
numberOfNodes
public final HealthResponse.Builder numberOfNodes(int value)
Required - The number of nodes within the cluster.API name:
number_of_nodes
-
numberOfPendingTasks
public final HealthResponse.Builder numberOfPendingTasks(int value)
Required - The number of cluster-level changes that have not yet been executed.API name:
number_of_pending_tasks
-
relocatingShards
public final HealthResponse.Builder relocatingShards(int value)
Required - The number of shards that are under relocation.API name:
relocating_shards
-
status
public final HealthResponse.Builder status(HealthStatus value)
Required - API name:status
-
taskMaxWaitingInQueueMillis
public final HealthResponse.Builder taskMaxWaitingInQueueMillis(java.lang.String value)
Required - The time expressed in milliseconds since the earliest initiated task is waiting for being performed.API name:
task_max_waiting_in_queue_millis
-
timedOut
public final HealthResponse.Builder timedOut(boolean value)
Required - If false the response returned within the period of time that is specified by the timeout parameter (30s by default)API name:
timed_out
-
unassignedShards
public final HealthResponse.Builder unassignedShards(int value)
Required - The number of shards that are not allocated.API name:
unassigned_shards
-
build
public HealthResponse build()
Builds aHealthResponse.- Specified by:
buildin interfaceObjectBuilder<HealthResponse>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-
-