Class HelpResponse.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<HelpResponse.Builder>
co.elastic.clients.elasticsearch.cat.HelpResponse.Builder
- All Implemented Interfaces:
WithJson<HelpResponse.Builder>
,ObjectBuilder<HelpResponse>
- Enclosing class:
- HelpResponse
public static class HelpResponse.Builder
extends WithJsonObjectBuilderBase<HelpResponse.Builder>
implements ObjectBuilder<HelpResponse>
Builder for
HelpResponse
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aHelpResponse
.protected HelpResponse.Builder
self()
final HelpResponse.Builder
valueBody
(HelpRecord value, HelpRecord... values) Required - Response value.final HelpResponse.Builder
Required - Response value.final HelpResponse.Builder
valueBody
(List<HelpRecord> 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
-
valueBody
Required - Response value.Adds all elements of
list
tovalueBody
. -
valueBody
Required - Response value.Adds one or more values to
valueBody
. -
valueBody
public final HelpResponse.Builder valueBody(Function<HelpRecord.Builder, ObjectBuilder<HelpRecord>> fn) Required - Response value.Adds a value to
valueBody
using a builder lambda. -
withJson
Description copied from interface:WithJson
Sets 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
withJson
gives 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:
withJson
in interfaceWithJson<HelpResponse.Builder>
- Overrides:
withJson
in classWithJsonObjectBuilderBase<HelpResponse.Builder>
- Parameters:
parser
- the JSONP parsermapper
- the JSONP mapper used to deserialize values and nested objects- Returns:
- this object
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<HelpResponse.Builder>
-
build
Builds aHelpResponse
.- Specified by:
build
in interfaceObjectBuilder<HelpResponse>
- Throws:
NullPointerException
- if some of the required fields are null.
-