Class GetTokenRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<GetTokenRequest.Builder>
co.elastic.clients.elasticsearch.security.GetTokenRequest.Builder
- All Implemented Interfaces:
WithJson<GetTokenRequest.Builder>,ObjectBuilder<GetTokenRequest>
- Enclosing class:
- GetTokenRequest
public static class GetTokenRequest.Builder
extends RequestBase.AbstractBuilder<GetTokenRequest.Builder>
implements ObjectBuilder<GetTokenRequest>
Builder for
GetTokenRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aGetTokenRequest.final GetTokenRequest.BuildergrantType(AccessTokenGrantType value) The type of grant.final GetTokenRequest.BuilderkerberosTicket(String value) The base64 encoded kerberos ticket.final GetTokenRequest.BuilderThe user's password.final GetTokenRequest.BuilderrefreshToken(String value) The string that was returned when you created the token, which enables you to extend its life.final GetTokenRequest.BuilderThe scope of the token.protected GetTokenRequest.Builderself()final GetTokenRequest.BuilderThe username 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
-
grantType
The type of grant. Supported grant types are:password,_kerberos,client_credentials, andrefresh_token.API name:
grant_type -
kerberosTicket
The base64 encoded kerberos ticket. If you specify the_kerberosgrant type, this parameter is required. This parameter is not valid with any other supported grant type.API name:
kerberos_ticket -
password
The user's password. If you specify thepasswordgrant type, this parameter is required. This parameter is not valid with any other supported grant type.API name:
password -
refreshToken
The string that was returned when you created the token, which enables you to extend its life. If you specify therefresh_tokengrant type, this parameter is required. This parameter is not valid with any other supported grant type.API name:
refresh_token -
scope
The scope of the token. Currently tokens are only issued for a scope of FULL regardless of the value sent with the request.API name:
scope -
username
The username that identifies the user. If you specify thepasswordgrant type, this parameter is required. This parameter is not valid with any other supported grant type.API name:
username -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<GetTokenRequest.Builder>
-
build
Builds aGetTokenRequest.- Specified by:
buildin interfaceObjectBuilder<GetTokenRequest>- Throws:
NullPointerException- if some of the required fields are null.
-