Class ClientCredentials.Builder
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject.Builder
se.michaelthelin.spotify.model_objects.credentials.ClientCredentials.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
ClientCredentials
Builder class for building
ClientCredentials
instances.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build a model object with the information set in the builder object.setAccessToken
(String accessToken) The access token setter.setExpiresIn
(Integer expiresIn) The expiration time setter.setTokenType
(String tokenType) The access token type setter.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setAccessToken
The access token setter.- Parameters:
accessToken
- An access token that can be provided in subsequent calls, for example to Spotify Web API services.- Returns:
- A
ClientCredentials.Builder
.
-
setTokenType
The access token type setter.- Parameters:
tokenType
- How the access token may be used: always "Bearer".- Returns:
- A
ClientCredentials.Builder
.
-
setExpiresIn
The expiration time setter.- Parameters:
expiresIn
- The time period (in seconds) for which the access token is valid.- Returns:
- A
ClientCredentials.Builder
.
-
build
Description copied from interface:IModelObject.Builder
Build a model object with the information set in the builder object.
The type of the model object and its methods depend on its corresponding implementation.- Returns:
- A model object.
-