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 class
ImmutablePullRequestReviewCommentEvent.Builder
Builds instances of typeImmutablePullRequestReviewCommentEvent
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
action()
The action that was performed on the comment.static ImmutablePullRequestReviewCommentEvent.Builder
builder()
Creates a builder forImmutablePullRequestReviewCommentEvent
.Comment
comment()
The comment itself.static ImmutablePullRequestReviewCommentEvent
copyOf(PullRequestReviewCommentEvent instance)
Creates an immutable copy of aPullRequestReviewCommentEvent
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutablePullRequestReviewCommentEvent
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
,comment
,pullRequest
.PullRequestItem
pullRequest()
The pull request the comment belongs to.Repository
repository()
TheRepository
User
sender()
TheUser
that triggered/sent the event.String
toString()
Prints the immutable valuePullRequestReviewCommentEvent
with attribute values.ImmutablePullRequestReviewCommentEvent
withAction(String value)
Copy the current immutable object by setting a value for theaction
attribute.ImmutablePullRequestReviewCommentEvent
withComment(Comment value)
Copy the current immutable object by setting a value for thecomment
attribute.ImmutablePullRequestReviewCommentEvent
withEventInstallation(EventInstallation value)
Copy the current immutable object by setting a value for theeventInstallation
attribute.ImmutablePullRequestReviewCommentEvent
withPullRequest(PullRequestItem value)
Copy the current immutable object by setting a value for thepullRequest
attribute.ImmutablePullRequestReviewCommentEvent
withRepository(Repository value)
Copy the current immutable object by setting a value for therepository
attribute.ImmutablePullRequestReviewCommentEvent
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()
The action that was performed on the comment. Can be one of "created", "edited", or "deleted".- Specified by:
action
in interfacePullRequestReviewCommentEvent
-
comment
@Nullable public Comment comment()
The comment itself.- Specified by:
comment
in interfacePullRequestReviewCommentEvent
-
pullRequest
@Nullable public PullRequestItem pullRequest()
The pull request the comment belongs to.- Specified by:
pullRequest
in interfacePullRequestReviewCommentEvent
-
withRepository
public final ImmutablePullRequestReviewCommentEvent 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 ImmutablePullRequestReviewCommentEvent 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 ImmutablePullRequestReviewCommentEvent 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 ImmutablePullRequestReviewCommentEvent 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
-
withComment
public final ImmutablePullRequestReviewCommentEvent withComment(@Nullable Comment value)
Copy the current immutable object by setting a value for thecomment
attribute. 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
this
object
-
withPullRequest
public final ImmutablePullRequestReviewCommentEvent 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 ofImmutablePullRequestReviewCommentEvent
that 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 valuePullRequestReviewCommentEvent
with attribute values.
-
copyOf
public static ImmutablePullRequestReviewCommentEvent copyOf(PullRequestReviewCommentEvent instance)
Creates an immutable copy of aPullRequestReviewCommentEvent
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 PullRequestReviewCommentEvent instance
-
builder
public static ImmutablePullRequestReviewCommentEvent.Builder builder()
Creates a builder forImmutablePullRequestReviewCommentEvent
.ImmutablePullRequestReviewCommentEvent.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
.comment(com.spotify.github.v3.prs.Comment | null) // nullablecomment
.pullRequest(com.spotify.github.v3.prs.PullRequestItem | null) // nullablepullRequest
.build();- Returns:
- A new ImmutablePullRequestReviewCommentEvent builder
-
-