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 class
ImmutableReview.Builder
Builds instances of typeImmutableReview
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>
body()
Body.static ImmutableReview.Builder
builder()
Creates a builder forImmutableReview
.String
commitId()
Commit sha the review refers tostatic ImmutableReview
copyOf(Review instance)
Creates an immutable copy of aReview
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableReview
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:id
,user
,body
,submittedAt
,state
,htmlUrl
,pullRequestUrl
,links
,commitId
.URI
htmlUrl()
Html URL.Integer
id()
Id.ReviewLinks
links()
Hypermedia links.URI
pullRequestUrl()
Pull Request URL.String
state()
State.Optional<GitHubInstant>
submittedAt()
Submitted at.String
toString()
Prints the immutable valueReview
with attribute values.User
user()
User.ImmutableReview
withBody(Optional<String> value)
Copy the current immutable object by setting a value for thebody
attribute.ImmutableReview
withCommitId(String value)
Copy the current immutable object by setting a value for thecommitId
attribute.ImmutableReview
withHtmlUrl(URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute.ImmutableReview
withId(Integer value)
Copy the current immutable object by setting a value for theid
attribute.ImmutableReview
withLinks(ReviewLinks value)
Copy the current immutable object by setting a value for thelinks
attribute.ImmutableReview
withPullRequestUrl(URI value)
Copy the current immutable object by setting a value for thepullRequestUrl
attribute.ImmutableReview
withState(String value)
Copy the current immutable object by setting a value for thestate
attribute.ImmutableReview
withSubmittedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalsubmittedAt
attribute.ImmutableReview
withSubmittedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for thesubmittedAt
attribute.ImmutableReview
withUser(User value)
Copy the current immutable object by setting a value for theuser
attribute.
-
-
-
Method Detail
-
submittedAt
public Optional<GitHubInstant> submittedAt()
Submitted at.- Specified by:
submittedAt
in interfaceReview
-
pullRequestUrl
@Nullable public URI pullRequestUrl()
Pull Request URL.- Specified by:
pullRequestUrl
in 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 theid
attribute. 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
this
object
-
withUser
public final ImmutableReview withUser(@Nullable User value)
Copy the current immutable object by setting a value for theuser
attribute. 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
this
object
-
withBody
public final ImmutableReview withBody(@Nullable Optional<String> value)
Copy the current immutable object by setting a value for thebody
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for body (can benull
)- Returns:
- A modified copy of the
this
object
-
withSubmittedAt
public final ImmutableReview withSubmittedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalsubmittedAt
attribute.- Parameters:
value
- The value for submittedAt- Returns:
- A modified copy of
this
object
-
withSubmittedAt
public final ImmutableReview withSubmittedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for thesubmittedAt
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 submittedAt- Returns:
- A modified copy of
this
object
-
withState
public final ImmutableReview withState(@Nullable String value)
Copy the current immutable object by setting a value for thestate
attribute. 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
this
object
-
withHtmlUrl
public final ImmutableReview withHtmlUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute. 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
this
object
-
withPullRequestUrl
public final ImmutableReview withPullRequestUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thepullRequestUrl
attribute. 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
this
object
-
withLinks
public final ImmutableReview withLinks(@Nullable ReviewLinks value)
Copy the current immutable object by setting a value for thelinks
attribute. 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
this
object
-
withCommitId
public final ImmutableReview withCommitId(@Nullable String value)
Copy the current immutable object by setting a value for thecommitId
attribute. 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
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableReview
that 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 valueReview
with attribute values.
-
copyOf
public static ImmutableReview copyOf(Review instance)
Creates an immutable copy of aReview
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 Review instance
-
builder
public static ImmutableReview.Builder builder()
Creates a builder forImmutableReview
.ImmutableReview.builder() .id(Integer | null) // nullable
id
.user(com.spotify.github.v3.User | null) // nullableuser
.body(Optional<String> | null) // nullablebody
.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
-
-