Class PutPrivilegesRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<PutPrivilegesRequest.Builder>
co.elastic.clients.elasticsearch.security.PutPrivilegesRequest.Builder
- All Implemented Interfaces:
WithJson<PutPrivilegesRequest.Builder>,ObjectBuilder<PutPrivilegesRequest>
- Enclosing class:
- PutPrivilegesRequest
public static class PutPrivilegesRequest.Builder extends WithJsonObjectBuilderBase<PutPrivilegesRequest.Builder> implements ObjectBuilder<PutPrivilegesRequest>
Builder for
PutPrivilegesRequest.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description PutPrivilegesRequestbuild()Builds aPutPrivilegesRequest.PutPrivilegesRequest.Builderprivileges(java.lang.String key, java.util.Map<java.lang.String,Actions> value)Required - Request body.PutPrivilegesRequest.Builderprivileges(java.util.Map<java.lang.String,java.util.Map<java.lang.String,Actions>> map)Required - Request body.PutPrivilegesRequest.Builderrefresh(Refresh value)Iftrue(the default) then refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalsethen do nothing with refreshes.protected PutPrivilegesRequest.Builderself()PutPrivilegesRequest.BuilderwithJson(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, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
refresh
Iftrue(the default) then refresh the affected shards to make this operation visible to search, ifwait_forthen wait for a refresh to make this operation visible to search, iffalsethen do nothing with refreshes.API name:
refresh -
privileges
public final PutPrivilegesRequest.Builder privileges(java.util.Map<java.lang.String,java.util.Map<java.lang.String,Actions>> map)Required - Request body.Adds all entries of
maptoprivileges. -
privileges
public final PutPrivilegesRequest.Builder privileges(java.lang.String key, java.util.Map<java.lang.String,Actions> value)Required - Request body.Adds an entry to
privileges. -
withJson
public PutPrivilegesRequest.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<PutPrivilegesRequest.Builder>- Overrides:
withJsonin classWithJsonObjectBuilderBase<PutPrivilegesRequest.Builder>- Parameters:
parser- the JSONP parsermapper- the JSONP mapper used to deserialize values and nested objects- Returns:
- this object
-
self
- Specified by:
selfin classWithJsonObjectBuilderBase<PutPrivilegesRequest.Builder>
-
build
Builds aPutPrivilegesRequest.- Specified by:
buildin interfaceObjectBuilder<PutPrivilegesRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-