Package com.spotify.github.v3.prs
Class ImmutableReview
- java.lang.Object
-
- com.spotify.github.v3.prs.ImmutableReview
-
- All Implemented Interfaces:
Review
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableReview extends Object implements Review
Immutable implementation ofReview.Use the builder to create immutable instances:
ImmutableReview.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableReview.BuilderBuilds instances of typeImmutableReview.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>body()Body.static ImmutableReview.Builderbuilder()Creates a builder forImmutableReview.StringcommitId()Commit sha the review refers tostatic ImmutableReviewcopyOf(Review instance)Creates an immutable copy of aReviewvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableReviewthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,user,body,submittedAt,state,htmlUrl,pullRequestUrl,links,commitId.URIhtmlUrl()Html URL.Integerid()Id.ReviewLinkslinks()Hypermedia links.URIpullRequestUrl()Pull Request URL.Stringstate()State.Optional<GitHubInstant>submittedAt()Submitted at.StringtoString()Prints the immutable valueReviewwith attribute values.Useruser()User.ImmutableReviewwithBody(String value)Copy the current immutable object by setting a present value for the optionalbodyattribute.ImmutableReviewwithBody(Optional<String> optional)Copy the current immutable object by setting an optional value for thebodyattribute.ImmutableReviewwithCommitId(String value)Copy the current immutable object by setting a value for thecommitIdattribute.ImmutableReviewwithHtmlUrl(URI value)Copy the current immutable object by setting a value for thehtmlUrlattribute.ImmutableReviewwithId(Integer value)Copy the current immutable object by setting a value for theidattribute.ImmutableReviewwithLinks(ReviewLinks value)Copy the current immutable object by setting a value for thelinksattribute.ImmutableReviewwithPullRequestUrl(URI value)Copy the current immutable object by setting a value for thepullRequestUrlattribute.ImmutableReviewwithState(String value)Copy the current immutable object by setting a value for thestateattribute.ImmutableReviewwithSubmittedAt(GitHubInstant value)Copy the current immutable object by setting a present value for the optionalsubmittedAtattribute.ImmutableReviewwithSubmittedAt(Optional<? extends GitHubInstant> optional)Copy the current immutable object by setting an optional value for thesubmittedAtattribute.ImmutableReviewwithUser(User value)Copy the current immutable object by setting a value for theuserattribute.
-
-
-
Method Detail
-
submittedAt
public Optional<GitHubInstant> submittedAt()
Submitted at.- Specified by:
submittedAtin interfaceReview
-
pullRequestUrl
@Nullable public URI pullRequestUrl()
Pull Request URL.- Specified by:
pullRequestUrlin interfaceReview
-
links
@Nullable public ReviewLinks links()
Hypermedia links.
-
commitId
@Nullable public String commitId()
Commit sha the review refers to
-
withId
public final ImmutableReview withId(@Nullable 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 (can benull)- Returns:
- A modified copy of the
thisobject
-
withUser
public final ImmutableReview withUser(@Nullable User value)
Copy the current immutable object by setting a value for theuserattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for user (can benull)- Returns:
- A modified copy of the
thisobject
-
withBody
public final ImmutableReview withBody(String value)
Copy the current immutable object by setting a present value for the optionalbodyattribute.- Parameters:
value- The value for body- Returns:
- A modified copy of
thisobject
-
withBody
public final ImmutableReview withBody(Optional<String> optional)
Copy the current immutable object by setting an optional value for thebodyattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for body- Returns:
- A modified copy of
thisobject
-
withSubmittedAt
public final ImmutableReview withSubmittedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalsubmittedAtattribute.- Parameters:
value- The value for submittedAt- Returns:
- A modified copy of
thisobject
-
withSubmittedAt
public final ImmutableReview withSubmittedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for thesubmittedAtattribute. 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 submittedAt- Returns:
- A modified copy of
thisobject
-
withState
public final ImmutableReview withState(@Nullable String value)
Copy the current immutable object by setting a value for thestateattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for state (can benull)- Returns:
- A modified copy of the
thisobject
-
withHtmlUrl
public final ImmutableReview withHtmlUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thehtmlUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for htmlUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withPullRequestUrl
public final ImmutableReview withPullRequestUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thepullRequestUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for pullRequestUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withLinks
public final ImmutableReview withLinks(@Nullable ReviewLinks value)
Copy the current immutable object by setting a value for thelinksattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for links (can benull)- Returns:
- A modified copy of the
thisobject
-
withCommitId
public final ImmutableReview withCommitId(@Nullable String value)
Copy the current immutable object by setting a value for thecommitIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for commitId (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableReviewthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,user,body,submittedAt,state,htmlUrl,pullRequestUrl,links,commitId.
-
toString
public String toString()
Prints the immutable valueReviewwith attribute values.
-
copyOf
public static ImmutableReview copyOf(Review instance)
Creates an immutable copy of aReviewvalue. 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 Review instance
-
builder
public static ImmutableReview.Builder builder()
Creates a builder forImmutableReview.ImmutableReview.builder() .id(Integer | null) // nullableid.user(com.spotify.github.v3.User | null) // nullableuser.body(String) // optionalbody.submittedAt(com.spotify.github.GitHubInstant) // optionalsubmittedAt.state(String | null) // nullablestate.htmlUrl(java.net.URI | null) // nullablehtmlUrl.pullRequestUrl(java.net.URI | null) // nullablepullRequestUrl.links(com.spotify.github.v3.activity.events.ReviewLinks | null) // nullablelinks.commitId(String | null) // nullablecommitId.build();- Returns:
- A new ImmutableReview builder
-
-