Class ImmutableCommitCommentEvent
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutableCommitCommentEvent
-
- All Implemented Interfaces:
BaseEvent,CommitCommentEvent
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCommitCommentEvent extends Object implements CommitCommentEvent
Immutable implementation ofCommitCommentEvent.Use the builder to create immutable instances:
ImmutableCommitCommentEvent.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCommitCommentEvent.BuilderBuilds instances of typeImmutableCommitCommentEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringaction()The action that was performed.static ImmutableCommitCommentEvent.Builderbuilder()Creates a builder forImmutableCommitCommentEvent.Commentcomment()The repositoryCommentcreated.static ImmutableCommitCommentEventcopyOf(CommitCommentEvent instance)Creates an immutable copy of aCommitCommentEventvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCommitCommentEventthat 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.Repositoryrepository()TheRepositoryUsersender()TheUserthat triggered/sent the event.StringtoString()Prints the immutable valueCommitCommentEventwith attribute values.ImmutableCommitCommentEventwithAction(String value)Copy the current immutable object by setting a value for theactionattribute.ImmutableCommitCommentEventwithComment(Comment value)Copy the current immutable object by setting a value for thecommentattribute.ImmutableCommitCommentEventwithEventInstallation(EventInstallation value)Copy the current immutable object by setting a value for theeventInstallationattribute.ImmutableCommitCommentEventwithRepository(Repository value)Copy the current immutable object by setting a value for therepositoryattribute.ImmutableCommitCommentEventwithSender(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.- Specified by:
actionin interfaceCommitCommentEvent
-
comment
@Nullable public Comment comment()
The repositoryCommentcreated.- Specified by:
commentin interfaceCommitCommentEvent
-
withRepository
public final ImmutableCommitCommentEvent 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 ImmutableCommitCommentEvent 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 ImmutableCommitCommentEvent 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 ImmutableCommitCommentEvent 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 ImmutableCommitCommentEvent 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
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCommitCommentEventthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:repository,sender,eventInstallation,action,comment.
-
toString
public String toString()
Prints the immutable valueCommitCommentEventwith attribute values.
-
copyOf
public static ImmutableCommitCommentEvent copyOf(CommitCommentEvent instance)
Creates an immutable copy of aCommitCommentEventvalue. 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 CommitCommentEvent instance
-
builder
public static ImmutableCommitCommentEvent.Builder builder()
Creates a builder forImmutableCommitCommentEvent.ImmutableCommitCommentEvent.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.comment.Comment | null) // nullablecomment.build();- Returns:
- A new ImmutableCommitCommentEvent builder
-
-