Package com.spotify.github.v3.checks
Class ImmutableCheckRunResponse
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableCheckRunResponse
-
- All Implemented Interfaces:
CheckRunBase
,CheckRunResponse
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCheckRunResponse extends Object implements CheckRunResponse
Immutable implementation ofCheckRunResponse
.Use the builder to create immutable instances:
ImmutableCheckRunResponse.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableCheckRunResponse.Builder
Builds instances of typeImmutableCheckRunResponse
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<App>
app()
App which this check ran.static ImmutableCheckRunResponse.Builder
builder()
Creates a builder forImmutableCheckRunResponse
.Optional<CheckSuite>
checkSuite()
Check suite this CheckRun belongs to.Optional<ZonedDateTime>
completedAt()
The time that the check completed.Optional<CheckRunConclusion>
conclusion()
The final conclusion of the check.static ImmutableCheckRunResponse
copyOf(CheckRunResponse instance)
Creates an immutable copy of aCheckRunResponse
value.Optional<String>
detailsUrl()
The URL of the integrator's site that has the full details of the check.boolean
equals(Object another)
This instance is equal to all instances ofImmutableCheckRunResponse
that have equal attribute values.Optional<String>
externalId()
A reference for the run on the integrator's system.int
hashCode()
Computes a hash code from attributes:headSha
,name
,status
,conclusion
,startedAt
,completedAt
,externalId
,detailsUrl
,id
,url
,htmlUrl
,output
,checkSuite
,app
.String
headSha()
The SHA of the commit.String
htmlUrl()
Html url string.long
id()
The CheckRun ID.String
name()
The name of the check.CheckRunOutput
output()
The check run output.Optional<ZonedDateTime>
startedAt()
The time that the check run began.CheckRunStatus
status()
The current status.String
toString()
Prints the immutable valueCheckRunResponse
with attribute values.String
url()
Url string.ImmutableCheckRunResponse
withApp(App value)
Copy the current immutable object by setting a present value for the optionalapp
attribute.ImmutableCheckRunResponse
withApp(Optional<? extends App> optional)
Copy the current immutable object by setting an optional value for theapp
attribute.ImmutableCheckRunResponse
withCheckSuite(CheckSuite value)
Copy the current immutable object by setting a present value for the optionalcheckSuite
attribute.ImmutableCheckRunResponse
withCheckSuite(Optional<? extends CheckSuite> optional)
Copy the current immutable object by setting an optional value for thecheckSuite
attribute.ImmutableCheckRunResponse
withCompletedAt(ZonedDateTime value)
Copy the current immutable object by setting a present value for the optionalcompletedAt
attribute.ImmutableCheckRunResponse
withCompletedAt(Optional<? extends ZonedDateTime> optional)
Copy the current immutable object by setting an optional value for thecompletedAt
attribute.ImmutableCheckRunResponse
withConclusion(CheckRunConclusion value)
Copy the current immutable object by setting a present value for the optionalconclusion
attribute.ImmutableCheckRunResponse
withConclusion(Optional<? extends CheckRunConclusion> optional)
Copy the current immutable object by setting an optional value for theconclusion
attribute.ImmutableCheckRunResponse
withDetailsUrl(String value)
Copy the current immutable object by setting a present value for the optionaldetailsUrl
attribute.ImmutableCheckRunResponse
withDetailsUrl(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedetailsUrl
attribute.ImmutableCheckRunResponse
withExternalId(String value)
Copy the current immutable object by setting a present value for the optionalexternalId
attribute.ImmutableCheckRunResponse
withExternalId(Optional<String> optional)
Copy the current immutable object by setting an optional value for theexternalId
attribute.ImmutableCheckRunResponse
withHeadSha(String value)
Copy the current immutable object by setting a value for theheadSha
attribute.ImmutableCheckRunResponse
withHtmlUrl(String value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute.ImmutableCheckRunResponse
withId(long value)
Copy the current immutable object by setting a value for theid
attribute.ImmutableCheckRunResponse
withName(String value)
Copy the current immutable object by setting a value for thename
attribute.ImmutableCheckRunResponse
withOutput(CheckRunOutput value)
Copy the current immutable object by setting a value for theoutput
attribute.ImmutableCheckRunResponse
withStartedAt(ZonedDateTime value)
Copy the current immutable object by setting a present value for the optionalstartedAt
attribute.ImmutableCheckRunResponse
withStartedAt(Optional<? extends ZonedDateTime> optional)
Copy the current immutable object by setting an optional value for thestartedAt
attribute.ImmutableCheckRunResponse
withStatus(CheckRunStatus value)
Copy the current immutable object by setting a value for thestatus
attribute.ImmutableCheckRunResponse
withUrl(String value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
headSha
public String headSha()
The SHA of the commit.- Specified by:
headSha
in interfaceCheckRunBase
- Returns:
- the string
-
name
public String name()
The name of the check. For example, "code-coverage".- Specified by:
name
in interfaceCheckRunBase
- Returns:
- the string
-
status
public CheckRunStatus status()
The current status. Can be one of queued, in_progress, or completed.- Specified by:
status
in interfaceCheckRunBase
- Returns:
- the check run status enum
-
conclusion
public Optional<CheckRunConclusion> conclusion()
The final conclusion of the check. Can be one of success, failure, neutral, cancelled, timed_out, or action_required. When the conclusion is action_required, additional details should be provided on the site specified by details_url. Required if you provide completedAt or a status of completed.- Specified by:
conclusion
in interfaceCheckRunBase
- Returns:
- the conclusion
-
startedAt
public Optional<ZonedDateTime> startedAt()
The time that the check run began.- Specified by:
startedAt
in interfaceCheckRunBase
- Returns:
- the zoned date time
-
completedAt
public Optional<ZonedDateTime> completedAt()
The time that the check completed.- Specified by:
completedAt
in interfaceCheckRunBase
- Returns:
- the zoned date time
-
externalId
public Optional<String> externalId()
A reference for the run on the integrator's system.- Specified by:
externalId
in interfaceCheckRunBase
- Returns:
- the optional string
-
detailsUrl
public Optional<String> detailsUrl()
The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.- Specified by:
detailsUrl
in interfaceCheckRunBase
- Returns:
- the optional
-
id
public long id()
The CheckRun ID.- Specified by:
id
in interfaceCheckRunResponse
- Returns:
- the int
-
url
public String url()
Url string.- Specified by:
url
in interfaceCheckRunResponse
- Returns:
- the string
-
htmlUrl
public String htmlUrl()
Html url string.- Specified by:
htmlUrl
in interfaceCheckRunResponse
- Returns:
- the string
-
output
public CheckRunOutput output()
The check run output.- Specified by:
output
in interfaceCheckRunResponse
- Returns:
- the check run output
- See Also:
CheckRunOutput
-
checkSuite
public Optional<CheckSuite> checkSuite()
Check suite this CheckRun belongs to.- Specified by:
checkSuite
in interfaceCheckRunResponse
- Returns:
- the optional
-
app
public Optional<App> app()
App which this check ran.- Specified by:
app
in interfaceCheckRunResponse
- Returns:
- the optional
-
withHeadSha
public final ImmutableCheckRunResponse withHeadSha(String value)
Copy the current immutable object by setting a value for theheadSha
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for headSha- Returns:
- A modified copy of the
this
object
-
withName
public final ImmutableCheckRunResponse withName(String value)
Copy the current immutable object by setting a value for thename
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for name- Returns:
- A modified copy of the
this
object
-
withStatus
public final ImmutableCheckRunResponse withStatus(CheckRunStatus value)
Copy the current immutable object by setting a value for thestatus
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for status- Returns:
- A modified copy of the
this
object
-
withConclusion
public final ImmutableCheckRunResponse withConclusion(CheckRunConclusion value)
Copy the current immutable object by setting a present value for the optionalconclusion
attribute.- Parameters:
value
- The value for conclusion- Returns:
- A modified copy of
this
object
-
withConclusion
public final ImmutableCheckRunResponse withConclusion(Optional<? extends CheckRunConclusion> optional)
Copy the current immutable object by setting an optional value for theconclusion
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for conclusion- Returns:
- A modified copy of
this
object
-
withStartedAt
public final ImmutableCheckRunResponse withStartedAt(ZonedDateTime value)
Copy the current immutable object by setting a present value for the optionalstartedAt
attribute.- Parameters:
value
- The value for startedAt- Returns:
- A modified copy of
this
object
-
withStartedAt
public final ImmutableCheckRunResponse withStartedAt(Optional<? extends ZonedDateTime> optional)
Copy the current immutable object by setting an optional value for thestartedAt
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for startedAt- Returns:
- A modified copy of
this
object
-
withCompletedAt
public final ImmutableCheckRunResponse withCompletedAt(ZonedDateTime value)
Copy the current immutable object by setting a present value for the optionalcompletedAt
attribute.- Parameters:
value
- The value for completedAt- Returns:
- A modified copy of
this
object
-
withCompletedAt
public final ImmutableCheckRunResponse withCompletedAt(Optional<? extends ZonedDateTime> optional)
Copy the current immutable object by setting an optional value for thecompletedAt
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for completedAt- Returns:
- A modified copy of
this
object
-
withExternalId
public final ImmutableCheckRunResponse withExternalId(String value)
Copy the current immutable object by setting a present value for the optionalexternalId
attribute.- Parameters:
value
- The value for externalId- Returns:
- A modified copy of
this
object
-
withExternalId
public final ImmutableCheckRunResponse withExternalId(Optional<String> optional)
Copy the current immutable object by setting an optional value for theexternalId
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for externalId- Returns:
- A modified copy of
this
object
-
withDetailsUrl
public final ImmutableCheckRunResponse withDetailsUrl(String value)
Copy the current immutable object by setting a present value for the optionaldetailsUrl
attribute.- Parameters:
value
- The value for detailsUrl- Returns:
- A modified copy of
this
object
-
withDetailsUrl
public final ImmutableCheckRunResponse withDetailsUrl(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedetailsUrl
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for detailsUrl- Returns:
- A modified copy of
this
object
-
withId
public final ImmutableCheckRunResponse withId(long value)
Copy the current immutable object by setting a value for theid
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for id- Returns:
- A modified copy of the
this
object
-
withUrl
public final ImmutableCheckRunResponse withUrl(String value)
Copy the current immutable object by setting a value for theurl
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for url- Returns:
- A modified copy of the
this
object
-
withHtmlUrl
public final ImmutableCheckRunResponse withHtmlUrl(String value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for htmlUrl- Returns:
- A modified copy of the
this
object
-
withOutput
public final ImmutableCheckRunResponse withOutput(CheckRunOutput value)
Copy the current immutable object by setting a value for theoutput
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for output- Returns:
- A modified copy of the
this
object
-
withCheckSuite
public final ImmutableCheckRunResponse withCheckSuite(CheckSuite value)
Copy the current immutable object by setting a present value for the optionalcheckSuite
attribute.- Parameters:
value
- The value for checkSuite- Returns:
- A modified copy of
this
object
-
withCheckSuite
public final ImmutableCheckRunResponse withCheckSuite(Optional<? extends CheckSuite> optional)
Copy the current immutable object by setting an optional value for thecheckSuite
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for checkSuite- Returns:
- A modified copy of
this
object
-
withApp
public final ImmutableCheckRunResponse withApp(App value)
Copy the current immutable object by setting a present value for the optionalapp
attribute.- Parameters:
value
- The value for app- Returns:
- A modified copy of
this
object
-
withApp
public final ImmutableCheckRunResponse withApp(Optional<? extends App> optional)
Copy the current immutable object by setting an optional value for theapp
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for app- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCheckRunResponse
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:headSha
,name
,status
,conclusion
,startedAt
,completedAt
,externalId
,detailsUrl
,id
,url
,htmlUrl
,output
,checkSuite
,app
.
-
toString
public String toString()
Prints the immutable valueCheckRunResponse
with attribute values.
-
copyOf
public static ImmutableCheckRunResponse copyOf(CheckRunResponse instance)
Creates an immutable copy of aCheckRunResponse
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 CheckRunResponse instance
-
builder
public static ImmutableCheckRunResponse.Builder builder()
Creates a builder forImmutableCheckRunResponse
.ImmutableCheckRunResponse.builder() .headSha(String) // required
headSha
.name(String) // requiredname
.status(com.spotify.github.v3.checks.CheckRunStatus) // requiredstatus
.conclusion(com.spotify.github.v3.checks.CheckRunConclusion) // optionalconclusion
.startedAt(java.time.ZonedDateTime) // optionalstartedAt
.completedAt(java.time.ZonedDateTime) // optionalcompletedAt
.externalId(String) // optionalexternalId
.detailsUrl(String) // optionaldetailsUrl
.id(long) // requiredid
.url(String) // requiredurl
.htmlUrl(String) // requiredhtmlUrl
.output(com.spotify.github.v3.checks.CheckRunOutput) // requiredoutput
.checkSuite(com.spotify.github.v3.checks.CheckSuite) // optionalcheckSuite
.app(com.spotify.github.v3.checks.App) // optionalapp
.build();- Returns:
- A new ImmutableCheckRunResponse builder
-
-