Class ImmutableSuspensionReason
- java.lang.Object
-
- com.spotify.github.v3.user.requests.ImmutableSuspensionReason
-
- All Implemented Interfaces:
SuspensionReason
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSuspensionReason extends Object implements SuspensionReason
Immutable implementation ofSuspensionReason.Use the builder to create immutable instances:
ImmutableSuspensionReason.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSuspensionReason.BuilderBuilds instances of typeImmutableSuspensionReason.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSuspensionReason.Builderbuilder()Creates a builder forImmutableSuspensionReason.static ImmutableSuspensionReasoncopyOf(SuspensionReason instance)Creates an immutable copy of aSuspensionReasonvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSuspensionReasonthat have equal attribute values.inthashCode()Computes a hash code from attributes:reason.Stringreason()StringtoString()Prints the immutable valueSuspensionReasonwith attribute values.ImmutableSuspensionReasonwithReason(String value)Copy the current immutable object by setting a value for thereasonattribute.
-
-
-
Method Detail
-
reason
public String reason()
- Specified by:
reasonin interfaceSuspensionReason- Returns:
- The value of the
reasonattribute
-
withReason
public final ImmutableSuspensionReason withReason(String value)
Copy the current immutable object by setting a value for thereasonattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for reason- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableSuspensionReasonthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:reason.
-
toString
public String toString()
Prints the immutable valueSuspensionReasonwith attribute values.
-
copyOf
public static ImmutableSuspensionReason copyOf(SuspensionReason instance)
Creates an immutable copy of aSuspensionReasonvalue. 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 SuspensionReason instance
-
builder
public static ImmutableSuspensionReason.Builder builder()
Creates a builder forImmutableSuspensionReason.ImmutableSuspensionReason.builder() .reason(String) // requiredreason.build();- Returns:
- A new ImmutableSuspensionReason builder
-
-