Class ImmutableOauth2AccessTokenResponse
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.oauth2.ImmutableOauth2AccessTokenResponse
-
- All Implemented Interfaces:
Oauth2AccessTokenResponse
@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableOauth2AccessTokenResponse extends Object implements Oauth2AccessTokenResponse
Immutable implementation ofOauth2AccessTokenResponse.Use the builder to create immutable instances:
ImmutableOauth2AccessTokenResponse.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableOauth2AccessTokenResponse.BuilderBuilds instances of typeImmutableOauth2AccessTokenResponse.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableOauth2AccessTokenResponse.Builderbuilder()Creates a builder forImmutableOauth2AccessTokenResponse.static ImmutableOauth2AccessTokenResponsecopyOf(Oauth2AccessTokenResponse instance)Creates an immutable copy of aOauth2AccessTokenResponsevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableOauth2AccessTokenResponsethat have equal attribute values.StringgetAccessToken()longgetExpiresIn()StringgetIdToken()StringgetJti()StringgetRefreshToken()StringgetScope()StringgetTokenType()inthashCode()Computes a hash code from attributes:accessToken,tokenType,idToken,refreshToken,expiresIn,scope,jti.StringtoString()Prints the immutable valueOauth2AccessTokenResponsewith attribute values.ImmutableOauth2AccessTokenResponsewithAccessToken(String value)Copy the current immutable object by setting a value for theaccessTokenattribute.ImmutableOauth2AccessTokenResponsewithExpiresIn(long value)Copy the current immutable object by setting a value for theexpiresInattribute.ImmutableOauth2AccessTokenResponsewithIdToken(String value)Copy the current immutable object by setting a value for theidTokenattribute.ImmutableOauth2AccessTokenResponsewithJti(String value)Copy the current immutable object by setting a value for thejtiattribute.ImmutableOauth2AccessTokenResponsewithRefreshToken(String value)Copy the current immutable object by setting a value for therefreshTokenattribute.ImmutableOauth2AccessTokenResponsewithScope(String value)Copy the current immutable object by setting a value for thescopeattribute.ImmutableOauth2AccessTokenResponsewithTokenType(String value)Copy the current immutable object by setting a value for thetokenTypeattribute.
-
-
-
Method Detail
-
getAccessToken
public String getAccessToken()
- Specified by:
getAccessTokenin interfaceOauth2AccessTokenResponse- Returns:
- The value of the
accessTokenattribute
-
getTokenType
public String getTokenType()
- Specified by:
getTokenTypein interfaceOauth2AccessTokenResponse- Returns:
- The value of the
tokenTypeattribute
-
getIdToken
public String getIdToken()
- Specified by:
getIdTokenin interfaceOauth2AccessTokenResponse- Returns:
- The value of the
idTokenattribute
-
getRefreshToken
public String getRefreshToken()
- Specified by:
getRefreshTokenin interfaceOauth2AccessTokenResponse- Returns:
- The value of the
refreshTokenattribute
-
getExpiresIn
public long getExpiresIn()
- Specified by:
getExpiresInin interfaceOauth2AccessTokenResponse- Returns:
- The value of the
expiresInattribute
-
getScope
public String getScope()
- Specified by:
getScopein interfaceOauth2AccessTokenResponse- Returns:
- The value of the
scopeattribute
-
getJti
public String getJti()
- Specified by:
getJtiin interfaceOauth2AccessTokenResponse- Returns:
- The value of the
jtiattribute
-
withAccessToken
public final ImmutableOauth2AccessTokenResponse withAccessToken(String value)
Copy the current immutable object by setting a value for theaccessTokenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for accessToken- Returns:
- A modified copy of the
thisobject
-
withTokenType
public final ImmutableOauth2AccessTokenResponse withTokenType(String value)
Copy the current immutable object by setting a value for thetokenTypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tokenType- Returns:
- A modified copy of the
thisobject
-
withIdToken
public final ImmutableOauth2AccessTokenResponse withIdToken(String value)
Copy the current immutable object by setting a value for theidTokenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for idToken- Returns:
- A modified copy of the
thisobject
-
withRefreshToken
public final ImmutableOauth2AccessTokenResponse withRefreshToken(String value)
Copy the current immutable object by setting a value for therefreshTokenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for refreshToken- Returns:
- A modified copy of the
thisobject
-
withExpiresIn
public final ImmutableOauth2AccessTokenResponse withExpiresIn(long value)
Copy the current immutable object by setting a value for theexpiresInattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for expiresIn- Returns:
- A modified copy of the
thisobject
-
withScope
public final ImmutableOauth2AccessTokenResponse withScope(String value)
Copy the current immutable object by setting a value for thescopeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for scope- Returns:
- A modified copy of the
thisobject
-
withJti
public final ImmutableOauth2AccessTokenResponse withJti(String value)
Copy the current immutable object by setting a value for thejtiattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for jti- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableOauth2AccessTokenResponsethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:accessToken,tokenType,idToken,refreshToken,expiresIn,scope,jti.
-
toString
public String toString()
Prints the immutable valueOauth2AccessTokenResponsewith attribute values.
-
copyOf
public static ImmutableOauth2AccessTokenResponse copyOf(Oauth2AccessTokenResponse instance)
Creates an immutable copy of aOauth2AccessTokenResponsevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Oauth2AccessTokenResponse instance
-
builder
public static ImmutableOauth2AccessTokenResponse.Builder builder()
Creates a builder forImmutableOauth2AccessTokenResponse.ImmutableOauth2AccessTokenResponse.builder() .accessToken(String) // requiredaccessToken.tokenType(String) // requiredtokenType.idToken(String) // requiredidToken.refreshToken(String) // requiredrefreshToken.expiresIn(long) // requiredexpiresIn.scope(String) // requiredscope.jti(String) // requiredjti.build();- Returns:
- A new ImmutableOauth2AccessTokenResponse builder
-
-