Class ImmutableOauth2AccessTokenResponse.Builder
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.oauth2.ImmutableOauth2AccessTokenResponse.Builder
-
- Enclosing class:
- ImmutableOauth2AccessTokenResponse
public static final class ImmutableOauth2AccessTokenResponse.Builder extends Object
Builds instances of typeImmutableOauth2AccessTokenResponse. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
public final ImmutableOauth2AccessTokenResponse.Builder from(Oauth2AccessTokenResponse instance)
Fill a builder with attribute values from the providedOauth2AccessTokenResponseinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
accessToken
public final ImmutableOauth2AccessTokenResponse.Builder accessToken(String accessToken)
Initializes the value for theaccessTokenattribute.- Parameters:
accessToken- The value for accessToken- Returns:
thisbuilder for use in a chained invocation
-
tokenType
public final ImmutableOauth2AccessTokenResponse.Builder tokenType(String tokenType)
Initializes the value for thetokenTypeattribute.- Parameters:
tokenType- The value for tokenType- Returns:
thisbuilder for use in a chained invocation
-
idToken
public final ImmutableOauth2AccessTokenResponse.Builder idToken(String idToken)
Initializes the value for theidTokenattribute.- Parameters:
idToken- The value for idToken- Returns:
thisbuilder for use in a chained invocation
-
refreshToken
public final ImmutableOauth2AccessTokenResponse.Builder refreshToken(String refreshToken)
Initializes the value for therefreshTokenattribute.- Parameters:
refreshToken- The value for refreshToken- Returns:
thisbuilder for use in a chained invocation
-
expiresIn
public final ImmutableOauth2AccessTokenResponse.Builder expiresIn(long expiresIn)
Initializes the value for theexpiresInattribute.- Parameters:
expiresIn- The value for expiresIn- Returns:
thisbuilder for use in a chained invocation
-
scope
public final ImmutableOauth2AccessTokenResponse.Builder scope(String scope)
Initializes the value for thescopeattribute.- Parameters:
scope- The value for scope- Returns:
thisbuilder for use in a chained invocation
-
jti
public final ImmutableOauth2AccessTokenResponse.Builder jti(String jti)
Initializes the value for thejtiattribute.- Parameters:
jti- The value for jti- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableOauth2AccessTokenResponse build()
Builds a newImmutableOauth2AccessTokenResponse.- Returns:
- An immutable instance of Oauth2AccessTokenResponse
- Throws:
IllegalStateException- if any required attributes are missing
-
-