Package io.dialob.client.api
Class ImmutableDialobCreds.Builder
- java.lang.Object
-
- io.dialob.client.api.ImmutableDialobCreds.Builder
-
- Enclosing class:
- ImmutableDialobCreds
@NotThreadSafe public static final class ImmutableDialobCreds.Builder extends Object
Builds instances of typeImmutableDialobCreds. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableDialobCredsbuild()Builds a newImmutableDialobCreds.ImmutableDialobCreds.Builderemail(String email)Initializes the value for theemailattribute.ImmutableDialobCreds.Builderfrom(DialobStore.DialobCreds instance)Fill a builder with attribute values from the providedDialobCredsinstance.ImmutableDialobCreds.Builderuser(String user)Initializes the value for theuserattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableDialobCreds.Builder from(DialobStore.DialobCreds instance)
Fill a builder with attribute values from the providedDialobCredsinstance. 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
-
user
@CanIgnoreReturnValue public final ImmutableDialobCreds.Builder user(String user)
Initializes the value for theuserattribute.- Parameters:
user- The value for user- Returns:
thisbuilder for use in a chained invocation
-
email
@CanIgnoreReturnValue public final ImmutableDialobCreds.Builder email(String email)
Initializes the value for theemailattribute.- Parameters:
email- The value for email- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableDialobCreds build()
Builds a newImmutableDialobCreds.- Returns:
- An immutable instance of DialobCreds
- Throws:
IllegalStateException- if any required attributes are missing
-
-