Package com.spotify.github.v3.prs
Class ImmutableReviewRequests.Builder
- java.lang.Object
-
- com.spotify.github.v3.prs.ImmutableReviewRequests.Builder
-
- Enclosing class:
- ImmutableReviewRequests
@NotThreadSafe public static final class ImmutableReviewRequests.Builder extends Object
Builds instances of typeImmutableReviewRequests
. Initialize attributes and then invoke thebuild()
method to create an immutable instance.Builder
is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableReviewRequests.Builder
addAllTeams(Iterable<? extends Team> elements)
Adds elements toteams
list.ImmutableReviewRequests.Builder
addAllUsers(Iterable<? extends User> elements)
Adds elements tousers
list.ImmutableReviewRequests.Builder
addTeams(Team element)
Adds one element toteams
list.ImmutableReviewRequests.Builder
addTeams(Team... elements)
Adds elements toteams
list.ImmutableReviewRequests.Builder
addUsers(User element)
Adds one element tousers
list.ImmutableReviewRequests.Builder
addUsers(User... elements)
Adds elements tousers
list.ImmutableReviewRequests
build()
Builds a newImmutableReviewRequests
.ImmutableReviewRequests.Builder
from(ReviewRequests instance)
Fill a builder with attribute values from the providedReviewRequests
instance.ImmutableReviewRequests.Builder
teams(Iterable<? extends Team> elements)
Sets or replaces all elements forteams
list.ImmutableReviewRequests.Builder
users(Iterable<? extends User> elements)
Sets or replaces all elements forusers
list.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableReviewRequests.Builder from(ReviewRequests instance)
Fill a builder with attribute values from the providedReviewRequests
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
addUsers
@CanIgnoreReturnValue public final ImmutableReviewRequests.Builder addUsers(User element)
Adds one element tousers
list.- Parameters:
element
- A users element- Returns:
this
builder for use in a chained invocation
-
addUsers
@CanIgnoreReturnValue public final ImmutableReviewRequests.Builder addUsers(User... elements)
Adds elements tousers
list.- Parameters:
elements
- An array of users elements- Returns:
this
builder for use in a chained invocation
-
users
@CanIgnoreReturnValue public final ImmutableReviewRequests.Builder users(@Nullable Iterable<? extends User> elements)
Sets or replaces all elements forusers
list.- Parameters:
elements
- An iterable of users elements- Returns:
this
builder for use in a chained invocation
-
addAllUsers
@CanIgnoreReturnValue public final ImmutableReviewRequests.Builder addAllUsers(Iterable<? extends User> elements)
Adds elements tousers
list.- Parameters:
elements
- An iterable of users elements- Returns:
this
builder for use in a chained invocation
-
addTeams
@CanIgnoreReturnValue public final ImmutableReviewRequests.Builder addTeams(Team element)
Adds one element toteams
list.- Parameters:
element
- A teams element- Returns:
this
builder for use in a chained invocation
-
addTeams
@CanIgnoreReturnValue public final ImmutableReviewRequests.Builder addTeams(Team... elements)
Adds elements toteams
list.- Parameters:
elements
- An array of teams elements- Returns:
this
builder for use in a chained invocation
-
teams
@CanIgnoreReturnValue public final ImmutableReviewRequests.Builder teams(@Nullable Iterable<? extends Team> elements)
Sets or replaces all elements forteams
list.- Parameters:
elements
- An iterable of teams elements- Returns:
this
builder for use in a chained invocation
-
addAllTeams
@CanIgnoreReturnValue public final ImmutableReviewRequests.Builder addAllTeams(Iterable<? extends Team> elements)
Adds elements toteams
list.- Parameters:
elements
- An iterable of teams elements- Returns:
this
builder for use in a chained invocation
-
build
public ImmutableReviewRequests build()
Builds a newImmutableReviewRequests
.- Returns:
- An immutable instance of ReviewRequests
- Throws:
IllegalStateException
- if any required attributes are missing
-
-