@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAuthorizedResource extends Object implements AuthorizedResource
AuthorizedResource.
Use the builder to create immutable instances:
ImmutableAuthorizedResource.builder().
Use the static factory method to create immutable instances:
ImmutableAuthorizedResource.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableAuthorizedResource.Builder
Builds instances of type
ImmutableAuthorizedResource. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableAuthorizedResource.Builder |
builder()
Creates a builder for
ImmutableAuthorizedResource. |
static ImmutableAuthorizedResource |
copyOf(AuthorizedResource instance)
Creates an immutable copy of a
AuthorizedResource value. |
EntitySelector |
element()
Identifies the name of the resource.
|
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableAuthorizedResource that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
kind, keyspace, element. |
EntitySelector |
keyspace()
Identifies the keyspace of the resource.
|
ResourceKind |
kind()
Identifies the resource kind.
|
static ImmutableAuthorizedResource |
of(ResourceKind kind)
Construct a new immutable
AuthorizedResource instance. |
String |
toString()
Prints the immutable value
AuthorizedResource with attribute values. |
ImmutableAuthorizedResource |
withElement(EntitySelector value)
Copy the current immutable object by setting a value for the
element attribute. |
ImmutableAuthorizedResource |
withKeyspace(EntitySelector value)
Copy the current immutable object by setting a value for the
keyspace attribute. |
ImmutableAuthorizedResource |
withKind(ResourceKind value)
Copy the current immutable object by setting a value for the
kind attribute. |
public ResourceKind kind()
kind in interface AuthorizedResourcepublic EntitySelector keyspace()
If the keyspace selector is a wildcard, the element() selector should also be a
wildcard.
keyspace in interface AuthorizedResourcepublic EntitySelector element()
element in interface AuthorizedResourcepublic final ImmutableAuthorizedResource withKind(ResourceKind value)
kind attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for kindthis objectpublic final ImmutableAuthorizedResource withKeyspace(EntitySelector value)
keyspace attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for keyspacethis objectpublic final ImmutableAuthorizedResource withElement(EntitySelector value)
element attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for elementthis objectpublic boolean equals(@Nullable Object another)
ImmutableAuthorizedResource that have equal attribute values.public int hashCode()
kind, keyspace, element.public String toString()
AuthorizedResource with attribute values.public static ImmutableAuthorizedResource of(ResourceKind kind)
AuthorizedResource instance.kind - The value for the kind attributepublic static ImmutableAuthorizedResource copyOf(AuthorizedResource instance)
AuthorizedResource 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 ImmutableAuthorizedResource.Builder builder()
ImmutableAuthorizedResource.
ImmutableAuthorizedResource.builder()
.kind(io.stargate.auth.entity.ResourceKind) // required kind
.keyspace(io.stargate.auth.entity.EntitySelector) // optional keyspace
.element(io.stargate.auth.entity.EntitySelector) // optional element
.build();
Copyright © 2022. All rights reserved.