Package com.orbitz.consul.model.operator
Class ImmutableRaftServer
- java.lang.Object
-
- com.orbitz.consul.model.operator.RaftServer
-
- com.orbitz.consul.model.operator.ImmutableRaftServer
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableRaftServer extends RaftServerImmutable implementation ofRaftServer.Use the builder to create immutable instances:
ImmutableRaftServer.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableRaftServer.BuilderBuilds instances of typeImmutableRaftServer.
-
Method Summary
Modifier and Type Method Description java.lang.Stringaddress()static ImmutableRaftServer.Builderbuilder()Creates a builder forImmutableRaftServer.static ImmutableRaftServercopyOf(RaftServer instance)Creates an immutable copy of aRaftServervalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableRaftServerthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,node,address,leader,voter.java.lang.Stringid()java.lang.Booleanleader()java.lang.Stringnode()java.lang.StringtoString()Prints the immutable valueRaftServerwith attribute values.java.lang.Booleanvoter()ImmutableRaftServerwithAddress(java.lang.String value)Copy the current immutable object by setting a value for theaddressattribute.ImmutableRaftServerwithId(java.lang.String value)Copy the current immutable object by setting a value for theidattribute.ImmutableRaftServerwithLeader(java.lang.Boolean value)Copy the current immutable object by setting a value for theleaderattribute.ImmutableRaftServerwithNode(java.lang.String value)Copy the current immutable object by setting a value for thenodeattribute.ImmutableRaftServerwithVoter(java.lang.Boolean value)Copy the current immutable object by setting a value for thevoterattribute.
-
-
-
Method Detail
-
id
public java.lang.String id()
- Specified by:
idin classRaftServer- Returns:
- The value of the
idattribute
-
node
public java.lang.String node()
- Specified by:
nodein classRaftServer- Returns:
- The value of the
nodeattribute
-
address
public java.lang.String address()
- Specified by:
addressin classRaftServer- Returns:
- The value of the
addressattribute
-
leader
public java.lang.Boolean leader()
- Specified by:
leaderin classRaftServer- Returns:
- The value of the
leaderattribute
-
voter
public java.lang.Boolean voter()
- Specified by:
voterin classRaftServer- Returns:
- The value of the
voterattribute
-
withId
public final ImmutableRaftServer withId(java.lang.String value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withNode
public final ImmutableRaftServer withNode(java.lang.String value)
Copy the current immutable object by setting a value for thenodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for node- Returns:
- A modified copy of the
thisobject
-
withAddress
public final ImmutableRaftServer withAddress(java.lang.String value)
Copy the current immutable object by setting a value for theaddressattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for address- Returns:
- A modified copy of the
thisobject
-
withLeader
public final ImmutableRaftServer withLeader(java.lang.Boolean value)
Copy the current immutable object by setting a value for theleaderattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for leader- Returns:
- A modified copy of the
thisobject
-
withVoter
public final ImmutableRaftServer withVoter(java.lang.Boolean value)
Copy the current immutable object by setting a value for thevoterattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for voter- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableRaftServerthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,node,address,leader,voter.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueRaftServerwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableRaftServer copyOf(RaftServer instance)
Creates an immutable copy of aRaftServervalue. 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 RaftServer instance
-
builder
public static ImmutableRaftServer.Builder builder()
Creates a builder forImmutableRaftServer.ImmutableRaftServer.builder() .id(String) // requiredid.node(String) // requirednode.address(String) // requiredaddress.leader(Boolean) // requiredleader.voter(Boolean) // requiredvoter.build();- Returns:
- A new ImmutableRaftServer builder
-
-