Class ApiKey.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<ApiKey.Builder>
co.elastic.clients.elasticsearch.security.ApiKey.Builder
- All Implemented Interfaces:
WithJson<ApiKey.Builder>
,ObjectBuilder<ApiKey>
- Enclosing class:
- ApiKey
public static class ApiKey.Builder extends WithJsonObjectBuilderBase<ApiKey.Builder> implements ObjectBuilder<ApiKey>
Builder for
ApiKey
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description ApiKey
build()
Builds aApiKey
.ApiKey.Builder
creation(java.lang.Long value)
API name:creation
ApiKey.Builder
expiration(java.lang.Long value)
API name:expiration
ApiKey.Builder
id(java.lang.String value)
Required - API name:id
ApiKey.Builder
invalidated(java.lang.Boolean value)
API name:invalidated
ApiKey.Builder
metadata(java.lang.String key, JsonData value)
API name:metadata
ApiKey.Builder
metadata(java.util.Map<java.lang.String,JsonData> map)
API name:metadata
ApiKey.Builder
name(java.lang.String value)
Required - API name:name
ApiKey.Builder
realm(java.lang.String value)
API name:realm
protected ApiKey.Builder
self()
ApiKey.Builder
username(java.lang.String value)
API name:username
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
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
-
creation
API name:creation
-
expiration
API name:expiration
-
id
Required - API name:id
-
invalidated
API name:invalidated
-
name
Required - API name:name
-
realm
API name:realm
-
username
API name:username
-
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<ApiKey.Builder>
-
build
Builds aApiKey
.- Specified by:
build
in interfaceObjectBuilder<ApiKey>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-