Class ImmutablePullRequestReviewCommentEvent
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutablePullRequestReviewCommentEvent
-
- All Implemented Interfaces:
BaseEvent,PullRequestReviewCommentEvent
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePullRequestReviewCommentEvent extends Object implements PullRequestReviewCommentEvent
Immutable implementation ofPullRequestReviewCommentEvent.Use the builder to create immutable instances:
ImmutablePullRequestReviewCommentEvent.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePullRequestReviewCommentEvent.BuilderBuilds instances of typeImmutablePullRequestReviewCommentEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringaction()The action that was performed on the comment.static ImmutablePullRequestReviewCommentEvent.Builderbuilder()Creates a builder forImmutablePullRequestReviewCommentEvent.Commentcomment()The comment itself.static ImmutablePullRequestReviewCommentEventcopyOf(PullRequestReviewCommentEvent instance)Creates an immutable copy of aPullRequestReviewCommentEventvalue.booleanequals(Object another)This instance is equal to all instances ofImmutablePullRequestReviewCommentEventthat have equal attribute values.EventInstallationeventInstallation()TheEventInstallation, if the event comes from a Github App.inthashCode()Computes a hash code from attributes:repository,sender,eventInstallation,action,comment,pullRequest.PullRequestItempullRequest()The pull request the comment belongs to.Repositoryrepository()TheRepositoryUsersender()TheUserthat triggered/sent the event.StringtoString()Prints the immutable valuePullRequestReviewCommentEventwith attribute values.ImmutablePullRequestReviewCommentEventwithAction(String value)Copy the current immutable object by setting a value for theactionattribute.ImmutablePullRequestReviewCommentEventwithComment(Comment value)Copy the current immutable object by setting a value for thecommentattribute.ImmutablePullRequestReviewCommentEventwithEventInstallation(EventInstallation value)Copy the current immutable object by setting a value for theeventInstallationattribute.ImmutablePullRequestReviewCommentEventwithPullRequest(PullRequestItem value)Copy the current immutable object by setting a value for thepullRequestattribute.ImmutablePullRequestReviewCommentEventwithRepository(Repository value)Copy the current immutable object by setting a value for therepositoryattribute.ImmutablePullRequestReviewCommentEventwithSender(User value)Copy the current immutable object by setting a value for thesenderattribute.
-
-
-
Method Detail
-
repository
@Nullable public Repository repository()
TheRepository- Specified by:
repositoryin interfaceBaseEvent
-
eventInstallation
@Nullable public EventInstallation eventInstallation()
TheEventInstallation, if the event comes from a Github App.- Specified by:
eventInstallationin interfaceBaseEvent
-
action
@Nullable public String action()
The action that was performed on the comment. Can be one of "created", "edited", or "deleted".- Specified by:
actionin interfacePullRequestReviewCommentEvent
-
comment
@Nullable public Comment comment()
The comment itself.- Specified by:
commentin interfacePullRequestReviewCommentEvent
-
pullRequest
@Nullable public PullRequestItem pullRequest()
The pull request the comment belongs to.- Specified by:
pullRequestin interfacePullRequestReviewCommentEvent
-
withRepository
public final ImmutablePullRequestReviewCommentEvent withRepository(@Nullable Repository value)
Copy the current immutable object by setting a value for therepositoryattribute. 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
thisobject
-
withSender
public final ImmutablePullRequestReviewCommentEvent withSender(@Nullable User value)
Copy the current immutable object by setting a value for thesenderattribute. 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
thisobject
-
withEventInstallation
public final ImmutablePullRequestReviewCommentEvent withEventInstallation(@Nullable EventInstallation value)
Copy the current immutable object by setting a value for theeventInstallationattribute. 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
thisobject
-
withAction
public final ImmutablePullRequestReviewCommentEvent withAction(@Nullable String value)
Copy the current immutable object by setting a value for theactionattribute. 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
thisobject
-
withComment
public final ImmutablePullRequestReviewCommentEvent withComment(@Nullable Comment value)
Copy the current immutable object by setting a value for thecommentattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for comment (can benull)- Returns:
- A modified copy of the
thisobject
-
withPullRequest
public final ImmutablePullRequestReviewCommentEvent withPullRequest(@Nullable PullRequestItem value)
Copy the current immutable object by setting a value for thepullRequestattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutablePullRequestReviewCommentEventthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:repository,sender,eventInstallation,action,comment,pullRequest.
-
toString
public String toString()
Prints the immutable valuePullRequestReviewCommentEventwith attribute values.
-
copyOf
public static ImmutablePullRequestReviewCommentEvent copyOf(PullRequestReviewCommentEvent instance)
Creates an immutable copy of aPullRequestReviewCommentEventvalue. 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 PullRequestReviewCommentEvent instance
-
builder
public static ImmutablePullRequestReviewCommentEvent.Builder builder()
Creates a builder forImmutablePullRequestReviewCommentEvent.ImmutablePullRequestReviewCommentEvent.builder() .repository(com.spotify.github.v3.repos.Repository | null) // nullablerepository.sender(com.spotify.github.v3.User | null) // nullablesender.eventInstallation(com.spotify.github.v3.activity.events.EventInstallation | null) // nullableeventInstallation.action(String | null) // nullableaction.comment(com.spotify.github.v3.prs.Comment | null) // nullablecomment.pullRequest(com.spotify.github.v3.prs.PullRequestItem | null) // nullablepullRequest.build();- Returns:
- A new ImmutablePullRequestReviewCommentEvent builder
-
-