Package com.orbitz.consul.model.catalog
Class ImmutableWriteRequest
- java.lang.Object
-
- com.orbitz.consul.model.catalog.WriteRequest
-
- com.orbitz.consul.model.catalog.ImmutableWriteRequest
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableWriteRequest extends WriteRequestImmutable implementation ofWriteRequest.Use the builder to create immutable instances:
ImmutableWriteRequest.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableWriteRequest.BuilderBuilds instances of typeImmutableWriteRequest.
-
Method Summary
Modifier and Type Method Description static ImmutableWriteRequest.Builderbuilder()Creates a builder forImmutableWriteRequest.static ImmutableWriteRequestcopyOf(WriteRequest instance)Creates an immutable copy of aWriteRequestvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableWriteRequestthat have equal attribute values.inthashCode()Computes a hash code from attributes:token.java.lang.Stringtoken()java.lang.StringtoString()Prints the immutable valueWriteRequestwith attribute values.ImmutableWriteRequestwithToken(java.lang.String value)Copy the current immutable object by setting a value for thetokenattribute.
-
-
-
Method Detail
-
token
public java.lang.String token()
- Specified by:
tokenin classWriteRequest- Returns:
- The value of the
tokenattribute
-
withToken
public final ImmutableWriteRequest withToken(java.lang.String value)
Copy the current immutable object by setting a value for thetokenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for token- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableWriteRequestthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:token.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueWriteRequestwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableWriteRequest copyOf(WriteRequest instance)
Creates an immutable copy of aWriteRequestvalue. 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 WriteRequest instance
-
builder
public static ImmutableWriteRequest.Builder builder()
Creates a builder forImmutableWriteRequest.ImmutableWriteRequest.builder() .token(String) // requiredtoken.build();- Returns:
- A new ImmutableWriteRequest builder
-
-