Package com.orbitz.consul.model.acl
Class ImmutableAclToken
- java.lang.Object
-
- com.orbitz.consul.model.acl.AclToken
-
- com.orbitz.consul.model.acl.ImmutableAclToken
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableAclToken.BuilderBuilds instances of typeImmutableAclToken.
-
Method Summary
Modifier and Type Method Description static ImmutableAclToken.Builderbuilder()Creates a builder forImmutableAclToken.static ImmutableAclTokencopyOf(AclToken instance)Creates an immutable copy of aAclTokenvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableAclTokenthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,name,type,rules.java.util.Optional<java.lang.String>id()java.util.Optional<java.lang.String>name()java.util.Optional<java.lang.String>rules()java.lang.StringtoString()Prints the immutable valueAclTokenwith attribute values.java.util.Optional<java.lang.String>type()ImmutableAclTokenwithId(java.lang.String value)Copy the current immutable object by setting a present value for the optionalidattribute.ImmutableAclTokenwithId(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for theidattribute.ImmutableAclTokenwithName(java.lang.String value)Copy the current immutable object by setting a present value for the optionalnameattribute.ImmutableAclTokenwithName(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thenameattribute.ImmutableAclTokenwithRules(java.lang.String value)Copy the current immutable object by setting a present value for the optionalrulesattribute.ImmutableAclTokenwithRules(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for therulesattribute.ImmutableAclTokenwithType(java.lang.String value)Copy the current immutable object by setting a present value for the optionaltypeattribute.ImmutableAclTokenwithType(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thetypeattribute.
-
-
-
Method Detail
-
id
public java.util.Optional<java.lang.String> id()
-
name
public java.util.Optional<java.lang.String> name()
-
type
public java.util.Optional<java.lang.String> type()
-
rules
public java.util.Optional<java.lang.String> rules()
-
withId
public final ImmutableAclToken withId(java.lang.String value)
Copy the current immutable object by setting a present value for the optionalidattribute.- Parameters:
value- The value for id- Returns:
- A modified copy of
thisobject
-
withId
public final ImmutableAclToken withId(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for theidattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for id- Returns:
- A modified copy of
thisobject
-
withName
public final ImmutableAclToken withName(java.lang.String value)
Copy the current immutable object by setting a present value for the optionalnameattribute.- Parameters:
value- The value for name- Returns:
- A modified copy of
thisobject
-
withName
public final ImmutableAclToken withName(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for thenameattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for name- Returns:
- A modified copy of
thisobject
-
withType
public final ImmutableAclToken withType(java.lang.String value)
Copy the current immutable object by setting a present value for the optionaltypeattribute.- Parameters:
value- The value for type- Returns:
- A modified copy of
thisobject
-
withType
public final ImmutableAclToken withType(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for thetypeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for type- Returns:
- A modified copy of
thisobject
-
withRules
public final ImmutableAclToken withRules(java.lang.String value)
Copy the current immutable object by setting a present value for the optionalrulesattribute.- Parameters:
value- The value for rules- Returns:
- A modified copy of
thisobject
-
withRules
public final ImmutableAclToken withRules(java.util.Optional<java.lang.String> optional)
Copy the current immutable object by setting an optional value for therulesattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for rules- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableAclTokenthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,name,type,rules.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueAclTokenwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableAclToken copyOf(AclToken instance)
Creates an immutable copy of aAclTokenvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable AclToken instance
-
builder
public static ImmutableAclToken.Builder builder()
Creates a builder forImmutableAclToken.ImmutableAclToken.builder() .id(String) // optionalid.name(String) // optionalname.type(String) // optionaltype.rules(String) // optionalrules.build();- Returns:
- A new ImmutableAclToken builder
-
-