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.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.WithJsonObjectBuilderBase
withJsonMethods 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_tokengrant 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 thepasswordgrant type, this parameter is required. It is not valid with other grant types.API name:
password -
runAs
The name of the user to be impersonated.API name:
run_as -
username
The 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 classRequestBase.AbstractBuilder<GrantApiKeyRequest.Builder>
-
build
Builds aGrantApiKeyRequest.- Specified by:
buildin interfaceObjectBuilder<GrantApiKeyRequest>- Throws:
NullPointerException- if some of the required fields are null.
-