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.Builder
grantType
(AccessTokenGrantType value) The type of grant.final GetTokenRequest.Builder
kerberosTicket
(String value) The base64 encoded kerberos ticket.final GetTokenRequest.Builder
The user's password.final GetTokenRequest.Builder
refreshToken
(String value) The string that was returned when you created the token, which enables you to extend its life.final GetTokenRequest.Builder
The scope of the token.protected GetTokenRequest.Builder
self()
final GetTokenRequest.Builder
The username 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
-
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_kerberos
grant 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 thepassword
grant 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_token
grant 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 thepassword
grant type, this parameter is required. This parameter is not valid with any other supported grant type.API name:
username
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<GetTokenRequest.Builder>
-
build
Builds aGetTokenRequest
.- Specified by:
build
in interfaceObjectBuilder<GetTokenRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-