Class GrantApiKeyRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<GrantApiKeyRequest.Builder>
co.elastic.clients.elasticsearch.security.GrantApiKeyRequest.Builder
- All Implemented Interfaces:
WithJson<GrantApiKeyRequest.Builder>
,ObjectBuilder<GrantApiKeyRequest>
- Enclosing class:
- GrantApiKeyRequest
public static class GrantApiKeyRequest.Builder
extends RequestBase.AbstractBuilder<GrantApiKeyRequest.Builder>
implements ObjectBuilder<GrantApiKeyRequest>
Builder for
GrantApiKeyRequest
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessToken
(String value) The user's access token.apiKey
(GrantApiKey value) Required - The API key.Required - The API key.build()
Builds aGrantApiKeyRequest
.grantType
(ApiKeyGrantType value) Required - The type of grant.The user's password.If 'true', Elasticsearch refreshes the affected shards to make this operation visible to search.The name of the user to be impersonated.protected GrantApiKeyRequest.Builder
self()
The user name that identifies the user.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
-
accessToken
The user's access token. If you specify theaccess_token
grant type, this parameter is required. It is not valid with other grant types.API name:
access_token
-
apiKey
Required - The API key.API name:
api_key
-
apiKey
public final GrantApiKeyRequest.Builder apiKey(Function<GrantApiKey.Builder, ObjectBuilder<GrantApiKey>> fn) Required - The API key.API name:
api_key
-
grantType
Required - The type of grant. Supported grant types are:access_token
,password
.API name:
grant_type
-
password
The user's password. If you specify thepassword
grant type, this parameter is required. It is not valid with other grant types.API name:
password
-
refresh
If 'true', Elasticsearch refreshes the affected shards to make this operation visible to search. If 'wait_for', it waits for a refresh to make this operation visible to search. If 'false', nothing is done with refreshes.API name:
refresh
-
runAs
The name of the user to be impersonated.API name:
run_as
-
username
The user name that identifies the user. If you specify thepassword
grant type, this parameter is required. It is not valid with other grant types.API name:
username
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<GrantApiKeyRequest.Builder>
-
build
Builds aGrantApiKeyRequest
.- Specified by:
build
in interfaceObjectBuilder<GrantApiKeyRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-