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 SummaryConstructors
- 
Method SummaryModifier 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.Builderself()The user name that identifies the user.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBasewithJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
accessTokenThe user's access token. If you specify theaccess_tokengrant type, this parameter is required. It is not valid with other grant types.API name: access_token
- 
apiKeyRequired - The API key.API name: api_key
- 
apiKeypublic final GrantApiKeyRequest.Builder apiKey(Function<GrantApiKey.Builder, ObjectBuilder<GrantApiKey>> fn) Required - The API key.API name: api_key
- 
grantTypeRequired - The type of grant. Supported grant types are:access_token,password.API name: grant_type
- 
passwordThe user's password. If you specify thepasswordgrant type, this parameter is required. It is not valid with other grant types.API name: password
- 
refreshIf '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
- 
runAsThe name of the user to be impersonated.API name: run_as
- 
usernameThe user name that identifies the user. If you specify thepasswordgrant type, this parameter is required. It is not valid with other grant types.API name: username
- 
self- Specified by:
- selfin class- RequestBase.AbstractBuilder<GrantApiKeyRequest.Builder>
 
- 
buildBuilds aGrantApiKeyRequest.- Specified by:
- buildin interface- ObjectBuilder<GrantApiKeyRequest>
- Throws:
- NullPointerException- if some of the required fields are null.
 
 
-