Class GetLifecycleResponse.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<GetLifecycleResponse.Builder>
co.elastic.clients.elasticsearch.ilm.GetLifecycleResponse.Builder
- All Implemented Interfaces:
WithJson<GetLifecycleResponse.Builder>,ObjectBuilder<GetLifecycleResponse>
- Enclosing class:
- GetLifecycleResponse
public static class GetLifecycleResponse.Builder
extends WithJsonObjectBuilderBase<GetLifecycleResponse.Builder>
implements ObjectBuilder<GetLifecycleResponse>
Builder for
GetLifecycleResponse.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aGetLifecycleResponse.lifecycles(String key, Lifecycle value) Required - Response value.lifecycles(String key, Function<Lifecycle.Builder, ObjectBuilder<Lifecycle>> fn) Required - Response value.lifecycles(Map<String, Lifecycle> map) Required - Response value.protected GetLifecycleResponse.Builderself()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
-
lifecycles
Required - Response value.Adds all entries of
maptolifecycles. -
lifecycles
Required - Response value.Adds an entry to
lifecycles. -
lifecycles
public final GetLifecycleResponse.Builder lifecycles(String key, Function<Lifecycle.Builder, ObjectBuilder<Lifecycle>> fn) Required - Response value.Adds an entry to
lifecyclesusing a builder lambda. -
withJson
public GetLifecycleResponse.Builder withJson(jakarta.json.stream.JsonParser parser, JsonpMapper mapper) 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<GetLifecycleResponse.Builder>- Overrides:
withJsonin classWithJsonObjectBuilderBase<GetLifecycleResponse.Builder>- Parameters:
parser- the JSONP parsermapper- the JSONP mapper used to deserialize values and nested objects- Returns:
- this object
-
self
- Specified by:
selfin classWithJsonObjectBuilderBase<GetLifecycleResponse.Builder>
-
build
Builds aGetLifecycleResponse.- Specified by:
buildin interfaceObjectBuilder<GetLifecycleResponse>- Throws:
NullPointerException- if some of the required fields are null.
-