Class AuthorizationCodeCredentials.Builder
java.lang.Object
com.wrapper.spotify.model_objects.AbstractModelObject.Builder
com.wrapper.spotify.model_objects.credentials.AuthorizationCodeCredentials.Builder
- All Implemented Interfaces:
IModelObject.Builder
- Enclosing class:
- AuthorizationCodeCredentials
public static final class AuthorizationCodeCredentials.Builder extends AbstractModelObject.Builder
Builder class for building
AuthorizationCodeCredentials instances.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description AuthorizationCodeCredentialsbuild()Build a model object with the information set in the builder object.AuthorizationCodeCredentials.BuildersetAccessToken(String accessToken)The access token setter.AuthorizationCodeCredentials.BuildersetExpiresIn(Integer expiresIn)The expiration time setter.AuthorizationCodeCredentials.BuildersetRefreshToken(String refreshToken)The refresh token setter.AuthorizationCodeCredentials.BuildersetScope(String scope)The scopes setter.AuthorizationCodeCredentials.BuildersetTokenType(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:
- An
AuthorizationCodeCredentials.Builder.
-
setTokenType
The access token type setter.- Parameters:
tokenType- How the access token may be used: always "Bearer".- Returns:
- An
AuthorizationCodeCredentials.Builder.
-
setScope
The scopes setter.- Parameters:
scope- The scopes specified in the credentials request.- Returns:
- An
AuthorizationCodeCredentials.Builder.
-
setExpiresIn
The expiration time setter.- Parameters:
expiresIn- The time period (in seconds) for which the access token is valid.- Returns:
- An
AuthorizationCodeCredentials.Builder.
-
setRefreshToken
The refresh token setter.- Parameters:
refreshToken- A token that can be sent to the Spotify Accounts service in place of an authorization code.- Returns:
- An
AuthorizationCodeCredentials.Builder.
-
build
Description copied from interface:IModelObject.BuilderBuild 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.
-