Class GrantApiKey.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<GrantApiKey.Builder>
co.elastic.clients.elasticsearch.security.grant_api_key.GrantApiKey.Builder
- All Implemented Interfaces:
WithJson<GrantApiKey.Builder>
,ObjectBuilder<GrantApiKey>
- Enclosing class:
- GrantApiKey
public static class GrantApiKey.Builder
extends WithJsonObjectBuilderBase<GrantApiKey.Builder>
implements ObjectBuilder<GrantApiKey>
Builder for
GrantApiKey
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aGrantApiKey
.final GrantApiKey.Builder
expiration
(Time value) API name:expiration
final GrantApiKey.Builder
API name:expiration
final GrantApiKey.Builder
API name:metadata
final GrantApiKey.Builder
API name:metadata
final GrantApiKey.Builder
Required - API name:name
final GrantApiKey.Builder
roleDescriptors
(List<Map<String, RoleDescriptor>> list) API name:role_descriptors
final GrantApiKey.Builder
roleDescriptors
(Map<String, RoleDescriptor> value, Map<String, RoleDescriptor>... values) API name:role_descriptors
protected GrantApiKey.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
-
name
Required - API name:name
-
expiration
API name:expiration
-
expiration
API name:expiration
-
roleDescriptors
API name:role_descriptors
Adds all elements of
list
toroleDescriptors
. -
roleDescriptors
public final GrantApiKey.Builder roleDescriptors(Map<String, RoleDescriptor> value, Map<String, RoleDescriptor>... values) API name:role_descriptors
Adds one or more values to
roleDescriptors
. -
metadata
API name:metadata
Adds all entries of
map
tometadata
. -
metadata
API name:metadata
Adds an entry to
metadata
. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<GrantApiKey.Builder>
-
build
Builds aGrantApiKey
.- Specified by:
build
in interfaceObjectBuilder<GrantApiKey>
- Throws:
NullPointerException
- if some of the required fields are null.
-