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 class
ImmutableReviewRequests.Builder
Builds instances of typeImmutableReviewRequests
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableReviewRequests.Builder
builder()
Creates a builder forImmutableReviewRequests
.static ImmutableReviewRequests
copyOf(ReviewRequests instance)
Creates an immutable copy of aReviewRequests
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableReviewRequests
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:users
,teams
.List<Team>
teams()
String
toString()
Prints the immutable valueReviewRequests
with attribute values.List<User>
users()
ImmutableReviewRequests
withTeams(Team... elements)
Copy the current immutable object with elements that replace the content ofteams
.ImmutableReviewRequests
withTeams(Iterable<? extends Team> elements)
Copy the current immutable object with elements that replace the content ofteams
.ImmutableReviewRequests
withUsers(User... elements)
Copy the current immutable object with elements that replace the content ofusers
.ImmutableReviewRequests
withUsers(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:
users
in interfaceReviewRequests
- Returns:
- The value of the
users
attribute
-
teams
@Nullable public List<Team> teams()
- Specified by:
teams
in interfaceReviewRequests
- Returns:
- The value of the
teams
attribute
-
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
this
object
-
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
this
object
-
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
this
object
-
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
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableReviewRequests
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:users
,teams
.
-
toString
public String toString()
Prints the immutable valueReviewRequests
with attribute values.
-
copyOf
public static ImmutableReviewRequests copyOf(ReviewRequests instance)
Creates an immutable copy of aReviewRequests
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 ReviewRequests instance
-
builder
public static ImmutableReviewRequests.Builder builder()
Creates a builder forImmutableReviewRequests
.ImmutableReviewRequests.builder() .users(List<com.spotify.github.v3.User> | null) // nullable
users
.teams(List<com.spotify.github.v3.Team> | null) // nullableteams
.build();- Returns:
- A new ImmutableReviewRequests builder
-
-