@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableToken extends Token
Token.
Use the builder to create immutable instances:
ImmutableToken.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableToken.Builder
Builds instances of type
ImmutableToken. |
Token.PolicyLink| Modifier and Type | Method and Description |
|---|---|
static ImmutableToken.Builder |
builder()
Creates a builder for
ImmutableToken. |
static ImmutableToken |
copyOf(Token instance)
Creates an immutable copy of a
Token value. |
Optional<String> |
description() |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableToken that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
id, description, local, policies. |
Optional<String> |
id() |
boolean |
local() |
com.google.common.collect.ImmutableList<Token.PolicyLink> |
policies() |
String |
toString()
Prints the immutable value
Token with attribute values. |
ImmutableToken |
withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
description attribute. |
ImmutableToken |
withDescription(String value)
Copy the current immutable object by setting a present value for the optional
description attribute. |
ImmutableToken |
withId(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
id attribute. |
ImmutableToken |
withId(String value)
Copy the current immutable object by setting a present value for the optional
id attribute. |
ImmutableToken |
withLocal(boolean value)
Copy the current immutable object by setting a value for the
local attribute. |
ImmutableToken |
withPolicies(Iterable<? extends Token.PolicyLink> elements)
Copy the current immutable object with elements that replace the content of
policies. |
ImmutableToken |
withPolicies(Token.PolicyLink... elements)
Copy the current immutable object with elements that replace the content of
policies. |
public Optional<String> description()
description in class Tokendescription attributepublic boolean local()
public com.google.common.collect.ImmutableList<Token.PolicyLink> policies()
public final ImmutableToken withId(String value)
id attribute.value - The value for idthis objectpublic final ImmutableToken withId(Optional<String> optional)
id attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for idthis objectpublic final ImmutableToken withDescription(String value)
description attribute.value - The value for descriptionthis objectpublic final ImmutableToken withDescription(Optional<String> optional)
description attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for descriptionthis objectpublic final ImmutableToken withLocal(boolean value)
local attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for localthis objectpublic final ImmutableToken withPolicies(Token.PolicyLink... elements)
policies.elements - The elements to setthis objectpublic final ImmutableToken withPolicies(Iterable<? extends Token.PolicyLink> elements)
policies.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of policies elements to setthis objectpublic boolean equals(@Nullable Object another)
ImmutableToken that have equal attribute values.public int hashCode()
id, description, local, policies.public String toString()
Token with attribute values.public static ImmutableToken copyOf(Token instance)
Token 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 ImmutableToken.Builder builder()
ImmutableToken.
ImmutableToken.builder()
.id(String) // optional id
.description(String) // optional description
.local(boolean) // required local
.addPolicies|addAllPolicies(com.orbitz.consul.model.acl.Token.PolicyLink) // policies elements
.build();
Copyright © 2019. All rights reserved.