Class GetRoleResponse.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<GetRoleResponse.Builder>
co.elastic.clients.elasticsearch.security.GetRoleResponse.Builder
- All Implemented Interfaces:
WithJson<GetRoleResponse.Builder>,ObjectBuilder<GetRoleResponse>
- Enclosing class:
- GetRoleResponse
public static class GetRoleResponse.Builder
extends WithJsonObjectBuilderBase<GetRoleResponse.Builder>
implements ObjectBuilder<GetRoleResponse>
Builder for
GetRoleResponse.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aGetRoleResponse.final GetRoleResponse.BuilderRequired - Response value.final GetRoleResponse.Builderroles(String key, Function<Role.Builder, ObjectBuilder<Role>> fn) Required - Response value.final GetRoleResponse.BuilderRequired - Response value.protected GetRoleResponse.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
-
roles
Required - Response value.Adds all entries of
maptoroles. -
roles
Required - Response value.Adds an entry to
roles. -
roles
public final GetRoleResponse.Builder roles(String key, Function<Role.Builder, ObjectBuilder<Role>> fn) Required - Response value.Adds an entry to
rolesusing 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<GetRoleResponse.Builder>- Overrides:
withJsonin classWithJsonObjectBuilderBase<GetRoleResponse.Builder>- Parameters:
parser- the JSONP parsermapper- the JSONP mapper used to deserialize values and nested objects- Returns:
- this object
-
self
- Specified by:
selfin classWithJsonObjectBuilderBase<GetRoleResponse.Builder>
-
build
Builds aGetRoleResponse.- Specified by:
buildin interfaceObjectBuilder<GetRoleResponse>- Throws:
NullPointerException- if some of the required fields are null.
-