Class ImmutableCheckRunEvent
- java.lang.Object
-
- com.spotify.github.v3.activity.events.ImmutableCheckRunEvent
-
- All Implemented Interfaces:
UpdateTracking,BaseEvent,CheckRunEvent
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCheckRunEvent extends Object implements CheckRunEvent
Immutable implementation ofCheckRunEvent.Use the builder to create immutable instances:
ImmutableCheckRunEvent.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCheckRunEvent.BuilderBuilds instances of typeImmutableCheckRunEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringaction()static ImmutableCheckRunEvent.Builderbuilder()Creates a builder forImmutableCheckRunEvent.CheckRunResponsecheckRun()static ImmutableCheckRunEventcopyOf(CheckRunEvent instance)Creates an immutable copy of aCheckRunEventvalue.GitHubInstantcreatedAt()Created datebooleanequals(Object another)This instance is equal to all instances ofImmutableCheckRunEventthat have equal attribute values.EventInstallationeventInstallation()TheEventInstallation, if the event comes from a Github App.inthashCode()Computes a hash code from attributes:repository,sender,eventInstallation,createdAt,updatedAt,action,checkRun.Repositoryrepository()TheRepositoryUsersender()TheUserthat triggered/sent the event.StringtoString()Prints the immutable valueCheckRunEventwith attribute values.GitHubInstantupdatedAt()Updated dateImmutableCheckRunEventwithAction(String value)Copy the current immutable object by setting a value for theactionattribute.ImmutableCheckRunEventwithCheckRun(CheckRunResponse value)Copy the current immutable object by setting a value for thecheckRunattribute.ImmutableCheckRunEventwithCreatedAt(GitHubInstant value)Copy the current immutable object by setting a value for thecreatedAtattribute.ImmutableCheckRunEventwithEventInstallation(EventInstallation value)Copy the current immutable object by setting a value for theeventInstallationattribute.ImmutableCheckRunEventwithRepository(Repository value)Copy the current immutable object by setting a value for therepositoryattribute.ImmutableCheckRunEventwithSender(User value)Copy the current immutable object by setting a value for thesenderattribute.ImmutableCheckRunEventwithUpdatedAt(GitHubInstant value)Copy the current immutable object by setting a value for theupdatedAtattribute.
-
-
-
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
-
createdAt
@Nullable public GitHubInstant createdAt()
Created date- Specified by:
createdAtin interfaceUpdateTracking- Returns:
- The date when the issue was created
-
updatedAt
@Nullable public GitHubInstant updatedAt()
Updated date- Specified by:
updatedAtin interfaceUpdateTracking- Returns:
- The date when the issue was updated
-
action
@Nullable public String action()
- Specified by:
actionin interfaceCheckRunEvent- Returns:
- The value of the
actionattribute
-
checkRun
@Nullable public CheckRunResponse checkRun()
- Specified by:
checkRunin interfaceCheckRunEvent- Returns:
- The value of the
checkRunattribute
-
withRepository
public final ImmutableCheckRunEvent 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 ImmutableCheckRunEvent 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 ImmutableCheckRunEvent 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
-
withCreatedAt
public final ImmutableCheckRunEvent withCreatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAtattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for createdAt (can benull)- Returns:
- A modified copy of the
thisobject
-
withUpdatedAt
public final ImmutableCheckRunEvent withUpdatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAtattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for updatedAt (can benull)- Returns:
- A modified copy of the
thisobject
-
withAction
public final ImmutableCheckRunEvent 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
-
withCheckRun
public final ImmutableCheckRunEvent withCheckRun(@Nullable CheckRunResponse value)
Copy the current immutable object by setting a value for thecheckRunattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for checkRun (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCheckRunEventthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:repository,sender,eventInstallation,createdAt,updatedAt,action,checkRun.
-
toString
public String toString()
Prints the immutable valueCheckRunEventwith attribute values.
-
copyOf
public static ImmutableCheckRunEvent copyOf(CheckRunEvent instance)
Creates an immutable copy of aCheckRunEventvalue. 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 CheckRunEvent instance
-
builder
public static ImmutableCheckRunEvent.Builder builder()
Creates a builder forImmutableCheckRunEvent.ImmutableCheckRunEvent.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.createdAt(com.spotify.github.GitHubInstant | null) // nullablecreatedAt.updatedAt(com.spotify.github.GitHubInstant | null) // nullableupdatedAt.action(String | null) // nullableaction.checkRun(com.spotify.github.v3.checks.CheckRunResponse | null) // nullablecheckRun.build();- Returns:
- A new ImmutableCheckRunEvent builder
-
-