public final class ImmutableAuthenticationSetup extends AuthenticationSetup
AuthenticationSetup.
Use the builder to create immutable instances:
ImmutableAuthenticationSetup.builder().
Use the static factory method to create immutable instances:
ImmutableAuthenticationSetup.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableAuthenticationSetup.Builder
Builds instances of type
ImmutableAuthenticationSetup. |
AuthenticationSetup.Entry, AuthenticationSetup.Role, AuthenticationSetup.User| Modifier and Type | Method and Description |
|---|---|
protected UsernamePassword |
admin() |
static ImmutableAuthenticationSetup.Builder |
builder()
Creates a builder for
ImmutableAuthenticationSetup. |
static ImmutableAuthenticationSetup |
copyOf(AuthenticationSetup instance)
Creates an immutable copy of a
AuthenticationSetup value. |
protected List<AuthenticationSetup.Entry> |
entries() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableAuthenticationSetup that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
admin, entries. |
static ImmutableAuthenticationSetup |
of(UsernamePassword admin)
Construct a new immutable
AuthenticationSetup instance. |
String |
toString()
Prints the immutable value
AuthenticationSetup with attribute values. |
ImmutableAuthenticationSetup |
withAdmin(UsernamePassword value)
Copy the current immutable object by setting a value for the
admin attribute. |
ImmutableAuthenticationSetup |
withEntries(AuthenticationSetup.Entry... elements)
Copy the current immutable object with elements that replace the content of
entries. |
ImmutableAuthenticationSetup |
withEntries(Iterable<? extends AuthenticationSetup.Entry> elements)
Copy the current immutable object with elements that replace the content of
entries. |
role, userprotected UsernamePassword admin()
admin in class AuthenticationSetupadmin attributeprotected List<AuthenticationSetup.Entry> entries()
entries in class AuthenticationSetupentries attributepublic final ImmutableAuthenticationSetup withAdmin(UsernamePassword value)
admin attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for adminthis objectpublic final ImmutableAuthenticationSetup withEntries(AuthenticationSetup.Entry... elements)
entries.elements - The elements to setthis objectpublic final ImmutableAuthenticationSetup withEntries(Iterable<? extends AuthenticationSetup.Entry> elements)
entries.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of entries elements to setthis objectpublic boolean equals(Object another)
ImmutableAuthenticationSetup that have equal attribute values.public int hashCode()
admin, entries.public String toString()
AuthenticationSetup with attribute values.public static ImmutableAuthenticationSetup of(UsernamePassword admin)
AuthenticationSetup instance.admin - The value for the admin attributepublic static ImmutableAuthenticationSetup copyOf(AuthenticationSetup instance)
AuthenticationSetup 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 ImmutableAuthenticationSetup.Builder builder()
ImmutableAuthenticationSetup.
ImmutableAuthenticationSetup.builder()
.admin(de.flapdoodle.embed.mongo.client.UsernamePassword) // required admin
.addEntries|addAllEntries(de.flapdoodle.embed.mongo.client.AuthenticationSetup.Entry) // entries elements
.build();
Copyright © 2024. All rights reserved.