public static final class ImmutableLoginResponse.Builder extends Object
ImmutableLoginResponse.
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.
| Modifier and Type | Method and Description |
|---|---|
ImmutableLoginResponse.Builder |
agbAgreed(boolean agbAgreed)
Initializes the value for the
agbAgreed attribute. |
ImmutableLoginResponse |
build()
Builds a new
ImmutableLoginResponse. |
ImmutableLoginResponse.Builder |
errormessage(Optional<String> errormessage)
Initializes the optional value
errormessage to errormessage. |
ImmutableLoginResponse.Builder |
errormessage(String errormessage)
Initializes the optional value
errormessage to errormessage. |
ImmutableLoginResponse.Builder |
firstname(String firstname)
Initializes the value for the
firstname attribute. |
ImmutableLoginResponse.Builder |
from(LoginResponse instance)
Fill a builder with attribute values from the provided
LoginResponse instance. |
ImmutableLoginResponse.Builder |
isLoggedIn(boolean isLoggedIn)
Initializes the value for the
isLoggedIn attribute. |
ImmutableLoginResponse.Builder |
lastname(String lastname)
Initializes the value for the
lastname attribute. |
ImmutableLoginResponse.Builder |
username(String username)
Initializes the value for the
username attribute. |
ImmutableLoginResponse.Builder |
usertype(String usertype)
Initializes the value for the
usertype attribute. |
@CanIgnoreReturnValue public final ImmutableLoginResponse.Builder from(LoginResponse instance)
LoginResponse instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableLoginResponse.Builder isLoggedIn(boolean isLoggedIn)
isLoggedIn attribute.isLoggedIn - The value for isLoggedInthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableLoginResponse.Builder username(String username)
username attribute.
If not set, this attribute will have a default value as returned by the initializer of username.
username - The value for usernamethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableLoginResponse.Builder firstname(String firstname)
firstname attribute.
If not set, this attribute will have a default value as returned by the initializer of firstname.
firstname - The value for firstnamethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableLoginResponse.Builder lastname(String lastname)
lastname attribute.
If not set, this attribute will have a default value as returned by the initializer of lastname.
lastname - The value for lastnamethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableLoginResponse.Builder usertype(String usertype)
usertype attribute.
If not set, this attribute will have a default value as returned by the initializer of usertype.
usertype - The value for usertypethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableLoginResponse.Builder errormessage(String errormessage)
errormessage to errormessage.errormessage - The value for errormessagethis builder for chained invocation@CanIgnoreReturnValue public final ImmutableLoginResponse.Builder errormessage(Optional<String> errormessage)
errormessage to errormessage.errormessage - The value for errormessagethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableLoginResponse.Builder agbAgreed(boolean agbAgreed)
agbAgreed attribute.agbAgreed - The value for agbAgreedthis builder for use in a chained invocationpublic ImmutableLoginResponse build()
ImmutableLoginResponse.IllegalStateException - if any required attributes are missingCopyright © 2018. All rights reserved.