Class ShardsResponse.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<ShardsResponse.Builder>
co.elastic.clients.elasticsearch.cat.ShardsResponse.Builder
- All Implemented Interfaces:
WithJson<ShardsResponse.Builder>,ObjectBuilder<ShardsResponse>
- Enclosing class:
- ShardsResponse
public static class ShardsResponse.Builder
extends WithJsonObjectBuilderBase<ShardsResponse.Builder>
implements ObjectBuilder<ShardsResponse>
Builder for
ShardsResponse.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aShardsResponse.protected ShardsResponse.Builderself()final ShardsResponse.Buildershards(ShardsRecord value, ShardsRecord... values) Required - Response value.final ShardsResponse.BuilderRequired - Response value.final ShardsResponse.Buildershards(List<ShardsRecord> list) Required - Response value.withJson(jakarta.json.stream.JsonParser parser, JsonpMapper mapper) Sets additional properties values on this object by reading from a JSON input.Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
shards
Required - Response value.Adds all elements of
listtoshards. -
shards
Required - Response value.Adds one or more values to
shards. -
shards
public final ShardsResponse.Builder shards(Function<ShardsRecord.Builder, ObjectBuilder<ShardsRecord>> fn) Required - Response value.Adds a value to
shardsusing a builder lambda. -
withJson
Description copied from interface:WithJsonSets additional properties values on this object by reading from a JSON input.This is a "partial deserialization": properties that were already set keep their value if they're not present in the JSON input, and properties can also be set after having called this method, including overriding those read from the JSON input.
This low level variant of
withJsongives full control on the json parser and object mapper. Most of the time usingWithJson.withJson(Reader)andWithJson.withJson(InputStream)will be more convenient.- Specified by:
withJsonin interfaceWithJson<ShardsResponse.Builder>- Overrides:
withJsonin classWithJsonObjectBuilderBase<ShardsResponse.Builder>- Parameters:
parser- the JSONP parsermapper- the JSONP mapper used to deserialize values and nested objects- Returns:
- this object
-
self
- Specified by:
selfin classWithJsonObjectBuilderBase<ShardsResponse.Builder>
-
build
Builds aShardsResponse.- Specified by:
buildin interfaceObjectBuilder<ShardsResponse>- Throws:
NullPointerException- if some of the required fields are null.
-