@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableUserCreationResponse extends Object implements UserCreationResponse
UserCreationResponse.
Use the builder to create immutable instances:
ImmutableUserCreationResponse.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableUserCreationResponse.Builder
Builds instances of type
ImmutableUserCreationResponse. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableUserCreationResponse.Builder |
builder()
Creates a builder for
ImmutableUserCreationResponse. |
static ImmutableUserCreationResponse |
copyOf(UserCreationResponse instance)
Creates an immutable copy of a
UserCreationResponse value. |
boolean |
created()
Whether or not the username was created.
|
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableUserCreationResponse that have equal attribute values. |
Optional<String> |
error()
Error returned when creating user, if any.
|
int |
hashCode()
Computes a hash code from attributes:
username, created, error. |
String |
toString()
Prints the immutable value
UserCreationResponse with attribute values. |
String |
username()
The username of the user that was requested to create.
|
ImmutableUserCreationResponse |
withCreated(boolean value)
Copy the current immutable object by setting a value for the
created attribute. |
ImmutableUserCreationResponse |
withError(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
error attribute. |
ImmutableUserCreationResponse |
withError(String value)
Copy the current immutable object by setting a present value for the optional
error attribute. |
ImmutableUserCreationResponse |
withUsername(String value)
Copy the current immutable object by setting a value for the
username attribute. |
public String username()
username in interface UserCreationResponseString usernamepublic boolean created()
created in interface UserCreationResponsepublic Optional<String> error()
error in interface UserCreationResponseOptional of String errorpublic final ImmutableUserCreationResponse withUsername(String value)
username attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for usernamethis objectpublic final ImmutableUserCreationResponse withCreated(boolean value)
created attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for createdthis objectpublic final ImmutableUserCreationResponse withError(String value)
error attribute.value - The value for errorthis objectpublic final ImmutableUserCreationResponse withError(Optional<String> optional)
error attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for errorthis objectpublic boolean equals(@Nullable Object another)
ImmutableUserCreationResponse that have equal attribute values.public int hashCode()
username, created, error.public String toString()
UserCreationResponse with attribute values.public static ImmutableUserCreationResponse copyOf(UserCreationResponse instance)
UserCreationResponse 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 ImmutableUserCreationResponse.Builder builder()
ImmutableUserCreationResponse.
ImmutableUserCreationResponse.builder()
.username(String) // required username
.created(boolean) // required created
.error(String) // optional error
.build();
Copyright © 2023 iland Internet Solutions, Corp. All rights reserved.