Class ImmutableIssuesEvent
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutableIssuesEvent
-
- All Implemented Interfaces:
BaseEvent,IssuesEvent
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableIssuesEvent extends Object implements IssuesEvent
Immutable implementation ofIssuesEvent.Use the builder to create immutable instances:
ImmutableIssuesEvent.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableIssuesEvent.BuilderBuilds instances of typeImmutableIssuesEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringaction()The action that was performed.static ImmutableIssuesEvent.Builderbuilder()Creates a builder forImmutableIssuesEvent.static ImmutableIssuesEventcopyOf(IssuesEvent instance)Creates an immutable copy of aIssuesEventvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableIssuesEventthat 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,issue.Issueissue()IssueRepositoryrepository()TheRepositoryUsersender()TheUserthat triggered/sent the event.StringtoString()Prints the immutable valueIssuesEventwith attribute values.ImmutableIssuesEventwithAction(String value)Copy the current immutable object by setting a value for theactionattribute.ImmutableIssuesEventwithEventInstallation(EventInstallation value)Copy the current immutable object by setting a value for theeventInstallationattribute.ImmutableIssuesEventwithIssue(Issue value)Copy the current immutable object by setting a value for theissueattribute.ImmutableIssuesEventwithRepository(Repository value)Copy the current immutable object by setting a value for therepositoryattribute.ImmutableIssuesEventwithSender(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. Can be one of "assigned", "unassigned", "labeled", "unlabeled", "opened", "edited", "closed", or "reopened".- Specified by:
actionin interfaceIssuesEvent
-
issue
@Nullable public Issue issue()
Issue- Specified by:
issuein interfaceIssuesEvent
-
withRepository
public final ImmutableIssuesEvent 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 ImmutableIssuesEvent 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 ImmutableIssuesEvent 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 ImmutableIssuesEvent 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
-
withIssue
public final ImmutableIssuesEvent withIssue(@Nullable Issue value)
Copy the current immutable object by setting a value for theissueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for issue (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableIssuesEventthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:repository,sender,eventInstallation,action,issue.
-
toString
public String toString()
Prints the immutable valueIssuesEventwith attribute values.
-
copyOf
public static ImmutableIssuesEvent copyOf(IssuesEvent instance)
Creates an immutable copy of aIssuesEventvalue. 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 IssuesEvent instance
-
builder
public static ImmutableIssuesEvent.Builder builder()
Creates a builder forImmutableIssuesEvent.ImmutableIssuesEvent.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.issue(com.spotify.github.v3.issues.Issue | null) // nullableissue.build();- Returns:
- A new ImmutableIssuesEvent builder
-
-