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 classImmutablePullRequestReviewEvent.BuilderBuilds instances of typeImmutablePullRequestReviewEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringaction()State of the action.static ImmutablePullRequestReviewEvent.Builderbuilder()Creates a builder forImmutablePullRequestReviewEvent.static ImmutablePullRequestReviewEventcopyOf(PullRequestReviewEvent instance)Creates an immutable copy of aPullRequestReviewEventvalue.booleanequals(Object another)This instance is equal to all instances ofImmutablePullRequestReviewEventthat 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,review,pullRequest.PullRequestItempullRequest()Pull Request.Repositoryrepository()TheRepositoryReviewreview()Review.Usersender()TheUserthat triggered/sent the event.StringtoString()Prints the immutable valuePullRequestReviewEventwith attribute values.ImmutablePullRequestReviewEventwithAction(String value)Copy the current immutable object by setting a value for theactionattribute.ImmutablePullRequestReviewEventwithEventInstallation(EventInstallation value)Copy the current immutable object by setting a value for theeventInstallationattribute.ImmutablePullRequestReviewEventwithPullRequest(PullRequestItem value)Copy the current immutable object by setting a value for thepullRequestattribute.ImmutablePullRequestReviewEventwithRepository(Repository value)Copy the current immutable object by setting a value for therepositoryattribute.ImmutablePullRequestReviewEventwithReview(Review value)Copy the current immutable object by setting a value for thereviewattribute.ImmutablePullRequestReviewEventwithSender(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()
State of the action.- Specified by:
actionin interfacePullRequestReviewEvent
-
review
@Nullable public Review review()
Review.- Specified by:
reviewin interfacePullRequestReviewEvent
-
pullRequest
@Nullable public PullRequestItem pullRequest()
Pull Request.- Specified by:
pullRequestin interfacePullRequestReviewEvent
-
withRepository
public final ImmutablePullRequestReviewEvent 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 ImmutablePullRequestReviewEvent 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 ImmutablePullRequestReviewEvent 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 ImmutablePullRequestReviewEvent 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
-
withReview
public final ImmutablePullRequestReviewEvent withReview(@Nullable Review value)
Copy the current immutable object by setting a value for thereviewattribute. 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
thisobject
-
withPullRequest
public final ImmutablePullRequestReviewEvent 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 ofImmutablePullRequestReviewEventthat 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 valuePullRequestReviewEventwith attribute values.
-
copyOf
public static ImmutablePullRequestReviewEvent copyOf(PullRequestReviewEvent instance)
Creates an immutable copy of aPullRequestReviewEventvalue. 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) // nullablerepository.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
-
-