Package com.spotify.github.v3.prs
Class ImmutableReviewRequests
- java.lang.Object
-
- com.spotify.github.v3.prs.ImmutableReviewRequests
-
- All Implemented Interfaces:
ReviewRequests
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableReviewRequests extends Object implements ReviewRequests
Immutable implementation ofReviewRequests.Use the builder to create immutable instances:
ImmutableReviewRequests.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableReviewRequests.BuilderBuilds instances of typeImmutableReviewRequests.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableReviewRequests.Builderbuilder()Creates a builder forImmutableReviewRequests.static ImmutableReviewRequestscopyOf(ReviewRequests instance)Creates an immutable copy of aReviewRequestsvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableReviewRequeststhat have equal attribute values.inthashCode()Computes a hash code from attributes:users,teams.List<Team>teams()StringtoString()Prints the immutable valueReviewRequestswith attribute values.List<User>users()ImmutableReviewRequestswithTeams(Team... elements)Copy the current immutable object with elements that replace the content ofteams.ImmutableReviewRequestswithTeams(Iterable<? extends Team> elements)Copy the current immutable object with elements that replace the content ofteams.ImmutableReviewRequestswithUsers(User... elements)Copy the current immutable object with elements that replace the content ofusers.ImmutableReviewRequestswithUsers(Iterable<? extends User> elements)Copy the current immutable object with elements that replace the content ofusers.
-
-
-
Method Detail
-
users
@Nullable public List<User> users()
- Specified by:
usersin interfaceReviewRequests- Returns:
- The value of the
usersattribute
-
teams
@Nullable public List<Team> teams()
- Specified by:
teamsin interfaceReviewRequests- Returns:
- The value of the
teamsattribute
-
withUsers
public final ImmutableReviewRequests withUsers(@Nullable User... elements)
Copy the current immutable object with elements that replace the content ofusers.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withUsers
public final ImmutableReviewRequests withUsers(@Nullable Iterable<? extends User> elements)
Copy the current immutable object with elements that replace the content ofusers. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of users elements to set- Returns:
- A modified copy of
thisobject
-
withTeams
public final ImmutableReviewRequests withTeams(@Nullable Team... elements)
Copy the current immutable object with elements that replace the content ofteams.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTeams
public final ImmutableReviewRequests withTeams(@Nullable Iterable<? extends Team> elements)
Copy the current immutable object with elements that replace the content ofteams. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of teams elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableReviewRequeststhat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:users,teams.
-
toString
public String toString()
Prints the immutable valueReviewRequestswith attribute values.
-
copyOf
public static ImmutableReviewRequests copyOf(ReviewRequests instance)
Creates an immutable copy of aReviewRequestsvalue. 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 ReviewRequests instance
-
builder
public static ImmutableReviewRequests.Builder builder()
Creates a builder forImmutableReviewRequests.ImmutableReviewRequests.builder() .users(List<com.spotify.github.v3.User> | null) // nullableusers.teams(List<com.spotify.github.v3.Team> | null) // nullableteams.build();- Returns:
- A new ImmutableReviewRequests builder
-
-