Class ImmutableUserCreationResponse.Builder
java.lang.Object
com.iland.core.web.rest.response.user.ImmutableUserCreationResponse.Builder
- Enclosing class:
- ImmutableUserCreationResponse
@Generated(from="UserCreationResponse",
generator="Immutables")
@NotThreadSafe
public static final class ImmutableUserCreationResponse.Builder
extends Object
Builds instances of type
ImmutableUserCreationResponse.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableUserCreationResponse.created(boolean created) Initializes the value for thecreatedattribute.Initializes the optional valueerrorto error.Initializes the optional valueerrorto error.from(UserCreationResponse instance) Fill a builder with attribute values from the providedUserCreationResponseinstance.Initializes the value for theusernameattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableUserCreationResponse.Builder from(UserCreationResponse instance) Fill a builder with attribute values from the providedUserCreationResponseinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
username
Initializes the value for theusernameattribute.- Parameters:
username- The value for username- Returns:
thisbuilder for use in a chained invocation
-
created
Initializes the value for thecreatedattribute.- Parameters:
created- The value for created- Returns:
thisbuilder for use in a chained invocation
-
error
Initializes the optional valueerrorto error.- Parameters:
error- The value for error- Returns:
thisbuilder for chained invocation
-
error
@CanIgnoreReturnValue public final ImmutableUserCreationResponse.Builder error(Optional<String> error) Initializes the optional valueerrorto error.- Parameters:
error- The value for error- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableUserCreationResponse.- Returns:
- An immutable instance of UserCreationResponse
- Throws:
IllegalStateException- if any required attributes are missing
-