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 class
ImmutableCheckRunEvent.Builder
Builds instances of typeImmutableCheckRunEvent
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
action()
static ImmutableCheckRunEvent.Builder
builder()
Creates a builder forImmutableCheckRunEvent
.CheckRunResponse
checkRun()
static ImmutableCheckRunEvent
copyOf(CheckRunEvent instance)
Creates an immutable copy of aCheckRunEvent
value.GitHubInstant
createdAt()
Created dateboolean
equals(Object another)
This instance is equal to all instances ofImmutableCheckRunEvent
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
,createdAt
,updatedAt
,action
,checkRun
.Repository
repository()
TheRepository
User
sender()
TheUser
that triggered/sent the event.String
toString()
Prints the immutable valueCheckRunEvent
with attribute values.GitHubInstant
updatedAt()
Updated dateImmutableCheckRunEvent
withAction(String value)
Copy the current immutable object by setting a value for theaction
attribute.ImmutableCheckRunEvent
withCheckRun(CheckRunResponse value)
Copy the current immutable object by setting a value for thecheckRun
attribute.ImmutableCheckRunEvent
withCreatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAt
attribute.ImmutableCheckRunEvent
withEventInstallation(EventInstallation value)
Copy the current immutable object by setting a value for theeventInstallation
attribute.ImmutableCheckRunEvent
withRepository(Repository value)
Copy the current immutable object by setting a value for therepository
attribute.ImmutableCheckRunEvent
withSender(User value)
Copy the current immutable object by setting a value for thesender
attribute.ImmutableCheckRunEvent
withUpdatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAt
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
-
createdAt
@Nullable public GitHubInstant createdAt()
Created date- Specified by:
createdAt
in interfaceUpdateTracking
- Returns:
- The date when the issue was created
-
updatedAt
@Nullable public GitHubInstant updatedAt()
Updated date- Specified by:
updatedAt
in interfaceUpdateTracking
- Returns:
- The date when the issue was updated
-
action
@Nullable public String action()
- Specified by:
action
in interfaceCheckRunEvent
- Returns:
- The value of the
action
attribute
-
checkRun
@Nullable public CheckRunResponse checkRun()
- Specified by:
checkRun
in interfaceCheckRunEvent
- Returns:
- The value of the
checkRun
attribute
-
withRepository
public final ImmutableCheckRunEvent 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 ImmutableCheckRunEvent 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 ImmutableCheckRunEvent 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
-
withCreatedAt
public final ImmutableCheckRunEvent withCreatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAt
attribute. 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
this
object
-
withUpdatedAt
public final ImmutableCheckRunEvent withUpdatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAt
attribute. 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
this
object
-
withAction
public final ImmutableCheckRunEvent 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
-
withCheckRun
public final ImmutableCheckRunEvent withCheckRun(@Nullable CheckRunResponse value)
Copy the current immutable object by setting a value for thecheckRun
attribute. 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
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCheckRunEvent
that 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 valueCheckRunEvent
with attribute values.
-
copyOf
public static ImmutableCheckRunEvent copyOf(CheckRunEvent instance)
Creates an immutable copy of aCheckRunEvent
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 CheckRunEvent instance
-
builder
public static ImmutableCheckRunEvent.Builder builder()
Creates a builder forImmutableCheckRunEvent
.ImmutableCheckRunEvent.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
.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
-
-