Class ImmutableEventInstallation
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutableEventInstallation
-
- All Implemented Interfaces:
EventInstallation
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableEventInstallation extends Object implements EventInstallation
Immutable implementation ofEventInstallation.Use the builder to create immutable instances:
ImmutableEventInstallation.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableEventInstallation.BuilderBuilds instances of typeImmutableEventInstallation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableEventInstallation.Builderbuilder()Creates a builder forImmutableEventInstallation.static ImmutableEventInstallationcopyOf(EventInstallation instance)Creates an immutable copy of aEventInstallationvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableEventInstallationthat have equal attribute values.inthashCode()Computes a hash code from attributes:id.Integerid()The Installation ID.StringtoString()Prints the immutable valueEventInstallationwith attribute values.ImmutableEventInstallationwithId(Integer value)Copy the current immutable object by setting a value for theidattribute.
-
-
-
Method Detail
-
id
public Integer id()
The Installation ID.- Specified by:
idin interfaceEventInstallation- Returns:
- the ID
-
withId
public final ImmutableEventInstallation withId(Integer 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
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableEventInstallationthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id.
-
toString
public String toString()
Prints the immutable valueEventInstallationwith attribute values.
-
copyOf
public static ImmutableEventInstallation copyOf(EventInstallation instance)
Creates an immutable copy of aEventInstallationvalue. 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 EventInstallation instance
-
builder
public static ImmutableEventInstallation.Builder builder()
Creates a builder forImmutableEventInstallation.ImmutableEventInstallation.builder() .id(Integer) // requiredid.build();- Returns:
- A new ImmutableEventInstallation builder
-
-