Class PutPrivilegesRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<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 RequestBase.AbstractBuilder<PutPrivilegesRequest.Builder> implements ObjectBuilder<PutPrivilegesRequest>
Builder for
PutPrivilegesRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description PutPrivilegesRequest
build()
Builds aPutPrivilegesRequest
.PutPrivilegesRequest.Builder
privileges(java.lang.String key, java.util.Map<java.lang.String,Actions> value)
Required - Request body.PutPrivilegesRequest.Builder
privileges(java.util.Map<java.lang.String,java.util.Map<java.lang.String,Actions>> map)
Required - Request body.PutPrivilegesRequest.Builder
refresh(Refresh value)
Iftrue
(the default) then refresh the affected shards to make this operation visible to search, ifwait_for
then wait for a refresh to make this operation visible to search, iffalse
then do nothing with refreshes.protected PutPrivilegesRequest.Builder
self()
PutPrivilegesRequest.Builder
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
Methods 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_for
then wait for a refresh to make this operation visible to search, iffalse
then 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
map
toprivileges
. -
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: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<PutPrivilegesRequest.Builder>
- Overrides:
withJson
in classWithJsonObjectBuilderBase<PutPrivilegesRequest.Builder>
- Parameters:
parser
- the JSONP parsermapper
- the JSONP mapper used to deserialize values and nested objects- Returns:
- this object
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<PutPrivilegesRequest.Builder>
-
build
Builds aPutPrivilegesRequest
.- Specified by:
build
in interfaceObjectBuilder<PutPrivilegesRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-