@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableAuthenticationSubject extends Object implements AuthenticationSubject
AuthenticationSubject.
Use the builder to create immutable instances:
ImmutableAuthenticationSubject.builder().
Use the static factory method to create immutable instances:
ImmutableAuthenticationSubject.of().
| 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() |
static ImmutableAuthenticationSubject |
of(String token,
String roleName,
boolean isFromExternalAuth,
Map<String,String> customProperties)
Construct a new immutable
AuthenticationSubject instance. |
String |
roleName() |
String |
token() |
String |
toString()
Prints the immutable value
AuthenticationSubject with attribute values. |
ImmutableAuthenticationSubject |
withCustomProperties(Map<String,String> value)
Copy the current immutable object by setting a value for the
customProperties attribute. |
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. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitasUser, of, of, of@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,String> value)
customProperties attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for customPropertiesthis 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 of(@Nullable String token, String roleName, boolean isFromExternalAuth, Map<String,String> customProperties)
AuthenticationSubject instance.of in interface AuthenticationSubjecttoken - The value for the token attributeroleName - The value for the roleName attributeisFromExternalAuth - The value for the isFromExternalAuth attributecustomProperties - The value for the customProperties attributepublic 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
.customProperties(Map<String, String>) // required customProperties
.build();
Copyright © 2024. All rights reserved.