Class ImmutablePullRequestReviewEvent
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutablePullRequestReviewEvent
-
- All Implemented Interfaces:
BaseEvent
,PullRequestReviewEvent
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePullRequestReviewEvent extends Object implements PullRequestReviewEvent
Immutable implementation ofPullRequestReviewEvent
.Use the builder to create immutable instances:
ImmutablePullRequestReviewEvent.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutablePullRequestReviewEvent.Builder
Builds instances of typeImmutablePullRequestReviewEvent
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
action()
State of the action.static ImmutablePullRequestReviewEvent.Builder
builder()
Creates a builder forImmutablePullRequestReviewEvent
.static ImmutablePullRequestReviewEvent
copyOf(PullRequestReviewEvent instance)
Creates an immutable copy of aPullRequestReviewEvent
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutablePullRequestReviewEvent
that have equal attribute values.EventInstallation
eventInstallation()
TheEventInstallation
, if the event comes from a Github App.int
hashCode()
Computes a hash code from attributes:repository
,sender
,eventInstallation
,action
,review
,pullRequest
.PullRequestItem
pullRequest()
Pull Request.Repository
repository()
TheRepository
Review
review()
Review.User
sender()
TheUser
that triggered/sent the event.String
toString()
Prints the immutable valuePullRequestReviewEvent
with attribute values.ImmutablePullRequestReviewEvent
withAction(String value)
Copy the current immutable object by setting a value for theaction
attribute.ImmutablePullRequestReviewEvent
withEventInstallation(EventInstallation value)
Copy the current immutable object by setting a value for theeventInstallation
attribute.ImmutablePullRequestReviewEvent
withPullRequest(PullRequestItem value)
Copy the current immutable object by setting a value for thepullRequest
attribute.ImmutablePullRequestReviewEvent
withRepository(Repository value)
Copy the current immutable object by setting a value for therepository
attribute.ImmutablePullRequestReviewEvent
withReview(Review value)
Copy the current immutable object by setting a value for thereview
attribute.ImmutablePullRequestReviewEvent
withSender(User value)
Copy the current immutable object by setting a value for thesender
attribute.
-
-
-
Method Detail
-
repository
@Nullable public Repository repository()
TheRepository
- Specified by:
repository
in interfaceBaseEvent
-
eventInstallation
@Nullable public EventInstallation eventInstallation()
TheEventInstallation
, if the event comes from a Github App.- Specified by:
eventInstallation
in interfaceBaseEvent
-
action
@Nullable public String action()
State of the action.- Specified by:
action
in interfacePullRequestReviewEvent
-
review
@Nullable public Review review()
Review.- Specified by:
review
in interfacePullRequestReviewEvent
-
pullRequest
@Nullable public PullRequestItem pullRequest()
Pull Request.- Specified by:
pullRequest
in interfacePullRequestReviewEvent
-
withRepository
public final ImmutablePullRequestReviewEvent withRepository(@Nullable Repository value)
Copy the current immutable object by setting a value for therepository
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for repository (can benull
)- Returns:
- A modified copy of the
this
object
-
withSender
public final ImmutablePullRequestReviewEvent withSender(@Nullable User value)
Copy the current immutable object by setting a value for thesender
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for sender (can benull
)- Returns:
- A modified copy of the
this
object
-
withEventInstallation
public final ImmutablePullRequestReviewEvent withEventInstallation(@Nullable EventInstallation value)
Copy the current immutable object by setting a value for theeventInstallation
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for eventInstallation (can benull
)- Returns:
- A modified copy of the
this
object
-
withAction
public final ImmutablePullRequestReviewEvent withAction(@Nullable String value)
Copy the current immutable object by setting a value for theaction
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for action (can benull
)- Returns:
- A modified copy of the
this
object
-
withReview
public final ImmutablePullRequestReviewEvent withReview(@Nullable Review value)
Copy the current immutable object by setting a value for thereview
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for review (can benull
)- Returns:
- A modified copy of the
this
object
-
withPullRequest
public final ImmutablePullRequestReviewEvent withPullRequest(@Nullable PullRequestItem value)
Copy the current immutable object by setting a value for thepullRequest
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for pullRequest (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutablePullRequestReviewEvent
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:repository
,sender
,eventInstallation
,action
,review
,pullRequest
.
-
toString
public String toString()
Prints the immutable valuePullRequestReviewEvent
with attribute values.
-
copyOf
public static ImmutablePullRequestReviewEvent copyOf(PullRequestReviewEvent instance)
Creates an immutable copy of aPullRequestReviewEvent
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 PullRequestReviewEvent instance
-
builder
public static ImmutablePullRequestReviewEvent.Builder builder()
Creates a builder forImmutablePullRequestReviewEvent
.ImmutablePullRequestReviewEvent.builder() .repository(com.spotify.github.v3.repos.Repository | null) // nullable
repository
.sender(com.spotify.github.v3.User | null) // nullablesender
.eventInstallation(com.spotify.github.v3.activity.events.EventInstallation | null) // nullableeventInstallation
.action(String | null) // nullableaction
.review(com.spotify.github.v3.prs.Review | null) // nullablereview
.pullRequest(com.spotify.github.v3.prs.PullRequestItem | null) // nullablepullRequest
.build();- Returns:
- A new ImmutablePullRequestReviewEvent builder
-
-