Class ImmutableUserCreationResponse
java.lang.Object
com.iland.core.web.rest.response.user.ImmutableUserCreationResponse
- All Implemented Interfaces:
UserCreationResponse
@Generated(from="UserCreationResponse",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableUserCreationResponse
extends Object
implements UserCreationResponse
Immutable implementation of
UserCreationResponse.
Use the builder to create immutable instances:
ImmutableUserCreationResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableUserCreationResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableUserCreationResponse.copyOf(UserCreationResponse instance) Creates an immutable copy of aUserCreationResponsevalue.booleancreated()Whether or not the username was created.booleanThis instance is equal to all instances ofImmutableUserCreationResponsethat have equal attribute values.error()Error returned when creating user, if any.inthashCode()Computes a hash code from attributes:username,created,error.toString()Prints the immutable valueUserCreationResponsewith attribute values.username()The username of the user that was requested to create.withCreated(boolean value) Copy the current immutable object by setting a value for thecreatedattribute.Copy the current immutable object by setting a present value for the optionalerrorattribute.Copy the current immutable object by setting an optional value for theerrorattribute.withUsername(String value) Copy the current immutable object by setting a value for theusernameattribute.
-
Method Details
-
username
The username of the user that was requested to create.- Specified by:
usernamein interfaceUserCreationResponse- Returns:
Stringusername
-
created
public boolean created()Whether or not the username was created.- Specified by:
createdin interfaceUserCreationResponse- Returns:
- whether username was created
-
error
Error returned when creating user, if any.- Specified by:
errorin interfaceUserCreationResponse- Returns:
OptionalofStringerror
-
withUsername
Copy the current immutable object by setting a value for theusernameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for username- Returns:
- A modified copy of the
thisobject
-
withCreated
Copy the current immutable object by setting a value for thecreatedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for created- Returns:
- A modified copy of the
thisobject
-
withError
Copy the current immutable object by setting a present value for the optionalerrorattribute.- Parameters:
value- The value for error- Returns:
- A modified copy of
thisobject
-
withError
Copy the current immutable object by setting an optional value for theerrorattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for error- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableUserCreationResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:username,created,error. -
toString
Prints the immutable valueUserCreationResponsewith attribute values. -
copyOf
Creates an immutable copy of aUserCreationResponsevalue. 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 UserCreationResponse instance
-
builder
Creates a builder forImmutableUserCreationResponse.ImmutableUserCreationResponse.builder() .username(String) // requiredusername.created(boolean) // requiredcreated.error(String) // optionalerror.build();- Returns:
- A new ImmutableUserCreationResponse builder
-