Class NodeShard.Builder
- java.lang.Object
-
- org.opensearch.client.util.ObjectBuilderBase
-
- org.opensearch.client.opensearch._types.NodeShard.Builder
-
- All Implemented Interfaces:
CopyableBuilder<NodeShard.Builder,NodeShard>,MutableBuilder<NodeShard.Builder,NodeShard>,ObjectBuilder<NodeShard>
- Enclosing class:
- NodeShard
public static class NodeShard.Builder extends ObjectBuilderBase implements CopyableBuilder<NodeShard.Builder,NodeShard>
Builder forNodeShard.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeShard.BuilderallocationId(java.lang.String key, java.lang.String value)API name:allocation_idNodeShard.BuilderallocationId(java.util.Map<java.lang.String,java.lang.String> map)API name:allocation_idNodeShardbuild()Builds aNodeShard.NodeShard.Buildercopy()Create a new builderCopyableBuilderthat is a copy of this one.NodeShard.Builderindex(java.lang.String value)Required - API name:indexNodeShard.Buildernode(java.lang.String value)API name:nodeNodeShard.Builderprimary(boolean value)Required - API name:primaryNodeShard.BuilderrecoverySource(java.lang.String key, java.lang.String value)The recovery source information for this shard.NodeShard.BuilderrecoverySource(java.util.Map<java.lang.String,java.lang.String> map)The recovery source information for this shard.NodeShard.BuilderrelocatingNode(java.lang.String value)API name:relocating_nodeNodeShard.BuildersearchOnly(java.lang.Boolean value)Indicates if this shard is configured for search operations onlyNodeShard.Buildershard(int value)Required - API name:shardNodeShard.Builderstate(ShardRoutingState value)Required - API name:stateNodeShard.BuilderunassignedInfo(java.util.function.Function<UnassignedInformation.Builder,ObjectBuilder<UnassignedInformation>> fn)API name:unassigned_infoNodeShard.BuilderunassignedInfo(UnassignedInformation value)API name:unassigned_info-
Methods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAdd, _listAddAll, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAll
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
-
-
-
Method Detail
-
copy
@Nonnull public NodeShard.Builder copy()
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<NodeShard.Builder,NodeShard>- Returns:
- a new builder instance.
-
allocationId
@Nonnull public final NodeShard.Builder allocationId(java.util.Map<java.lang.String,java.lang.String> map)
API name:allocation_idAdds all elements of
maptoallocationId.
-
allocationId
@Nonnull public final NodeShard.Builder allocationId(java.lang.String key, java.lang.String value)
API name:allocation_idAdds an entry to
allocationId.
-
index
@Nonnull public final NodeShard.Builder index(java.lang.String value)
Required - API name:index
-
node
@Nonnull public final NodeShard.Builder node(@Nullable java.lang.String value)
API name:node
-
primary
@Nonnull public final NodeShard.Builder primary(boolean value)
Required - API name:primary
-
recoverySource
@Nonnull public final NodeShard.Builder recoverySource(java.util.Map<java.lang.String,java.lang.String> map)
The recovery source information for this shard.API name:
recovery_sourceAdds all elements of
maptorecoverySource.
-
recoverySource
@Nonnull public final NodeShard.Builder recoverySource(java.lang.String key, java.lang.String value)
The recovery source information for this shard.API name:
recovery_sourceAdds an entry to
recoverySource.
-
relocatingNode
@Nonnull public final NodeShard.Builder relocatingNode(@Nullable java.lang.String value)
API name:relocating_node
-
searchOnly
@Nonnull public final NodeShard.Builder searchOnly(@Nullable java.lang.Boolean value)
Indicates if this shard is configured for search operations onlyAPI name:
searchOnly
-
shard
@Nonnull public final NodeShard.Builder shard(int value)
Required - API name:shard
-
state
@Nonnull public final NodeShard.Builder state(ShardRoutingState value)
Required - API name:state
-
unassignedInfo
@Nonnull public final NodeShard.Builder unassignedInfo(@Nullable UnassignedInformation value)
API name:unassigned_info
-
unassignedInfo
@Nonnull public final NodeShard.Builder unassignedInfo(java.util.function.Function<UnassignedInformation.Builder,ObjectBuilder<UnassignedInformation>> fn)
API name:unassigned_info
-
build
@Nonnull public NodeShard build()
Builds aNodeShard.- Specified by:
buildin interfaceObjectBuilder<NodeShard>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-
-