Class IndexPrivilegesCheck.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<IndexPrivilegesCheck.Builder>
co.elastic.clients.elasticsearch.security.has_privileges.IndexPrivilegesCheck.Builder
- All Implemented Interfaces:
WithJson<IndexPrivilegesCheck.Builder>
,ObjectBuilder<IndexPrivilegesCheck>
- Enclosing class:
- IndexPrivilegesCheck
public static class IndexPrivilegesCheck.Builder
extends WithJsonObjectBuilderBase<IndexPrivilegesCheck.Builder>
implements ObjectBuilder<IndexPrivilegesCheck>
Builder for
IndexPrivilegesCheck
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowRestrictedIndices
(Boolean value) This needs to be set to true (default is false) if using wildcards or regexps for patterns that cover restricted indices.build()
Builds aIndexPrivilegesCheck
.Required - A list of indices.Required - A list of indices.privileges
(String value, String... values) Required - A list of the privileges that you want to check for the specified indices.privileges
(List<String> list) Required - A list of the privileges that you want to check for the specified indices.protected IndexPrivilegesCheck.Builder
self()
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
names
Required - A list of indices.API name:
names
Adds all elements of
list
tonames
. -
names
Required - A list of indices.API name:
names
Adds one or more values to
names
. -
privileges
Required - A list of the privileges that you want to check for the specified indices.API name:
privileges
Adds all elements of
list
toprivileges
. -
privileges
Required - A list of the privileges that you want to check for the specified indices.API name:
privileges
Adds one or more values to
privileges
. -
allowRestrictedIndices
This needs to be set to true (default is false) if using wildcards or regexps for patterns that cover restricted indices. Implicitly, restricted indices do not match index patterns because restricted indices usually have limited privileges and including them in pattern tests would render most such tests false. If restricted indices are explicitly included in the names list, privileges will be checked against them regardless of the value of allow_restricted_indices.API name:
allow_restricted_indices
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<IndexPrivilegesCheck.Builder>
-
build
Builds aIndexPrivilegesCheck
.- Specified by:
build
in interfaceObjectBuilder<IndexPrivilegesCheck>
- Throws:
NullPointerException
- if some of the required fields are null.
-