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 class
ImmutableSuspensionReason.Builder
Builds instances of typeImmutableSuspensionReason
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSuspensionReason.Builder
builder()
Creates a builder forImmutableSuspensionReason
.static ImmutableSuspensionReason
copyOf(SuspensionReason instance)
Creates an immutable copy of aSuspensionReason
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableSuspensionReason
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:reason
.String
reason()
String
toString()
Prints the immutable valueSuspensionReason
with attribute values.ImmutableSuspensionReason
withReason(String value)
Copy the current immutable object by setting a value for thereason
attribute.
-
-
-
Method Detail
-
reason
public String reason()
- Specified by:
reason
in interfaceSuspensionReason
- Returns:
- The value of the
reason
attribute
-
withReason
public final ImmutableSuspensionReason withReason(String value)
Copy the current immutable object by setting a value for thereason
attribute. 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
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableSuspensionReason
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:reason
.
-
toString
public String toString()
Prints the immutable valueSuspensionReason
with attribute values.
-
copyOf
public static ImmutableSuspensionReason copyOf(SuspensionReason instance)
Creates an immutable copy of aSuspensionReason
value. 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) // required
reason
.build();- Returns:
- A new ImmutableSuspensionReason builder
-
-