Class ApiKey.Builder
java.lang.Object
co.elastic.clients.elasticsearch.security.grant_api_key.ApiKey.Builder
- All Implemented Interfaces:
ObjectBuilder<ApiKey>
- Enclosing class:
- ApiKey
public static class ApiKey.Builder extends java.lang.Object implements ObjectBuilder<ApiKey>
Builder for
ApiKey
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description ApiKey.Builder
addRoleDescriptors(java.util.Map<java.lang.String,JsonData> value)
Add a value toroleDescriptors(List)
, creating the list if needed.ApiKey
build()
Builds aApiKey
.ApiKey.Builder
expiration(java.lang.String value)
API name:expiration
ApiKey.Builder
name(java.lang.String value)
Required - API name:name
ApiKey.Builder
roleDescriptors(java.util.List<java.util.Map<java.lang.String,JsonData>> value)
API name:role_descriptors
ApiKey.Builder
roleDescriptors(java.util.Map<java.lang.String,JsonData>... value)
API name:role_descriptors
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
-
name
Required - API name:name
-
expiration
API name:expiration
-
roleDescriptors
public ApiKey.Builder roleDescriptors(@Nullable java.util.List<java.util.Map<java.lang.String,JsonData>> value)API name:role_descriptors
-
roleDescriptors
API name:role_descriptors
-
addRoleDescriptors
Add a value toroleDescriptors(List)
, creating the list if needed. -
build
Builds aApiKey
.- Specified by:
build
in interfaceObjectBuilder<ApiKey>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-