Package com.spotify.github.v3.prs
Class ImmutableRequestReviewParameters
- java.lang.Object
-
- com.spotify.github.v3.prs.RequestReviewParameters
-
- com.spotify.github.v3.prs.ImmutableRequestReviewParameters
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableRequestReviewParameters extends RequestReviewParameters
Immutable implementation ofRequestReviewParameters
.Use the builder to create immutable instances:
ImmutableRequestReviewParameters.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableRequestReviewParameters.Builder
Builds instances of typeImmutableRequestReviewParameters
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRequestReviewParameters.Builder
builder()
Creates a builder forImmutableRequestReviewParameters
.static ImmutableRequestReviewParameters
copyOf(RequestReviewParameters instance)
Creates an immutable copy of aRequestReviewParameters
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableRequestReviewParameters
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:reviewers
,teamReviewers
.Optional<List<String>>
reviewers()
Request reviews from users (list of login)Optional<List<String>>
teamReviewers()
Request reviews from teams (list of slugs)String
toString()
Prints the immutable valueRequestReviewParameters
with attribute values.ImmutableRequestReviewParameters
withReviewers(List<String> value)
Copy the current immutable object by setting a present value for the optionalreviewers
attribute.ImmutableRequestReviewParameters
withReviewers(Optional<? extends List<String>> optional)
Copy the current immutable object by setting an optional value for thereviewers
attribute.ImmutableRequestReviewParameters
withTeamReviewers(List<String> value)
Copy the current immutable object by setting a present value for the optionalteamReviewers
attribute.ImmutableRequestReviewParameters
withTeamReviewers(Optional<? extends List<String>> optional)
Copy the current immutable object by setting an optional value for theteamReviewers
attribute.
-
-
-
Method Detail
-
reviewers
public Optional<List<String>> reviewers()
Request reviews from users (list of login)- Specified by:
reviewers
in classRequestReviewParameters
-
teamReviewers
public Optional<List<String>> teamReviewers()
Request reviews from teams (list of slugs)- Specified by:
teamReviewers
in classRequestReviewParameters
-
withReviewers
public final ImmutableRequestReviewParameters withReviewers(List<String> value)
Copy the current immutable object by setting a present value for the optionalreviewers
attribute.- Parameters:
value
- The value for reviewers- Returns:
- A modified copy of
this
object
-
withReviewers
public final ImmutableRequestReviewParameters withReviewers(Optional<? extends List<String>> optional)
Copy the current immutable object by setting an optional value for thereviewers
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for reviewers- Returns:
- A modified copy of
this
object
-
withTeamReviewers
public final ImmutableRequestReviewParameters withTeamReviewers(List<String> value)
Copy the current immutable object by setting a present value for the optionalteamReviewers
attribute.- Parameters:
value
- The value for teamReviewers- Returns:
- A modified copy of
this
object
-
withTeamReviewers
public final ImmutableRequestReviewParameters withTeamReviewers(Optional<? extends List<String>> optional)
Copy the current immutable object by setting an optional value for theteamReviewers
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for teamReviewers- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableRequestReviewParameters
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:reviewers
,teamReviewers
.
-
toString
public String toString()
Prints the immutable valueRequestReviewParameters
with attribute values.
-
copyOf
public static ImmutableRequestReviewParameters copyOf(RequestReviewParameters instance)
Creates an immutable copy of aRequestReviewParameters
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 RequestReviewParameters instance
-
builder
public static ImmutableRequestReviewParameters.Builder builder()
Creates a builder forImmutableRequestReviewParameters
.ImmutableRequestReviewParameters.builder() .reviewers(List<String>) // optional
reviewers
.teamReviewers(List<String>) // optionalteamReviewers
.build();- Returns:
- A new ImmutableRequestReviewParameters builder
-
-