@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAuthenticationSubject extends Object implements AuthenticationSubject
AuthenticationSubject.
Use the builder to create immutable instances:
ImmutableAuthenticationSubject.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableAuthenticationSubject.Builder
Builds instances of type
ImmutableAuthenticationSubject. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableAuthenticationSubject.Builder |
builder()
Creates a builder for
ImmutableAuthenticationSubject. |
static ImmutableAuthenticationSubject |
copyOf(AuthenticationSubject instance)
Creates an immutable copy of a
AuthenticationSubject value. |
Map<String,String> |
customProperties() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableAuthenticationSubject that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
token, roleName, isFromExternalAuth, customProperties. |
boolean |
isFromExternalAuth() |
String |
roleName() |
String |
token() |
String |
toString()
Prints the immutable value
AuthenticationSubject with attribute values. |
ImmutableAuthenticationSubject |
withCustomProperties(Map<String,? extends String> entries)
Copy the current immutable object by replacing the
customProperties map with the specified map. |
ImmutableAuthenticationSubject |
withIsFromExternalAuth(boolean value)
Copy the current immutable object by setting a value for the
isFromExternalAuth attribute. |
ImmutableAuthenticationSubject |
withRoleName(String value)
Copy the current immutable object by setting a value for the
roleName attribute. |
ImmutableAuthenticationSubject |
withToken(String value)
Copy the current immutable object by setting a value for the
token attribute. |
@Nullable public String token()
token in interface AuthenticationSubjecttoken attributepublic String roleName()
roleName in interface AuthenticationSubjectroleName attributepublic boolean isFromExternalAuth()
isFromExternalAuth in interface AuthenticationSubjectisFromExternalAuth attributepublic Map<String,String> customProperties()
customProperties in interface AuthenticationSubjectcustomProperties attributepublic final ImmutableAuthenticationSubject withToken(@Nullable String value)
token attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for token (can be null)this objectpublic final ImmutableAuthenticationSubject withRoleName(String value)
roleName attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for roleNamethis objectpublic final ImmutableAuthenticationSubject withIsFromExternalAuth(boolean value)
isFromExternalAuth attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for isFromExternalAuththis objectpublic final ImmutableAuthenticationSubject withCustomProperties(Map<String,? extends String> entries)
customProperties map with the specified map.
Nulls are not permitted as keys or values.
A shallow reference equality check is used to prevent copying of the same value by returning this.entries - The entries to be added to the customProperties mapthis objectpublic boolean equals(@Nullable Object another)
ImmutableAuthenticationSubject that have equal attribute values.public int hashCode()
token, roleName, isFromExternalAuth, customProperties.public String toString()
AuthenticationSubject with attribute values.public static ImmutableAuthenticationSubject copyOf(AuthenticationSubject instance)
AuthenticationSubject value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableAuthenticationSubject.Builder builder()
ImmutableAuthenticationSubject.
ImmutableAuthenticationSubject.builder()
.token(String | null) // nullable token
.roleName(String) // required roleName
.isFromExternalAuth(boolean) // required isFromExternalAuth
.putCustomProperties|putAllCustomProperties(String => String) // customProperties mappings
.build();
Copyright © 2022. All rights reserved.