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 classImmutableCheckRunResponse.BuilderBuilds 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.Builderbuilder()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 ImmutableCheckRunResponsecopyOf(CheckRunResponse instance)Creates an immutable copy of aCheckRunResponsevalue.Optional<String>detailsUrl()The URL of the integrator's site that has the full details of the check.booleanequals(Object another)This instance is equal to all instances ofImmutableCheckRunResponsethat have equal attribute values.Optional<String>externalId()A reference for the run on the integrator's system.inthashCode()Computes a hash code from attributes:headSha,name,status,conclusion,startedAt,completedAt,externalId,detailsUrl,id,url,htmlUrl,output,checkSuite,app.StringheadSha()The SHA of the commit.StringhtmlUrl()Html url string.longid()The CheckRun ID.Stringname()The name of the check.CheckRunOutputoutput()The check run output.Optional<ZonedDateTime>startedAt()The time that the check run began.CheckRunStatusstatus()The current status.StringtoString()Prints the immutable valueCheckRunResponsewith attribute values.Stringurl()Url string.ImmutableCheckRunResponsewithApp(App value)Copy the current immutable object by setting a present value for the optionalappattribute.ImmutableCheckRunResponsewithApp(Optional<? extends App> optional)Copy the current immutable object by setting an optional value for theappattribute.ImmutableCheckRunResponsewithCheckSuite(CheckSuite value)Copy the current immutable object by setting a present value for the optionalcheckSuiteattribute.ImmutableCheckRunResponsewithCheckSuite(Optional<? extends CheckSuite> optional)Copy the current immutable object by setting an optional value for thecheckSuiteattribute.ImmutableCheckRunResponsewithCompletedAt(ZonedDateTime value)Copy the current immutable object by setting a present value for the optionalcompletedAtattribute.ImmutableCheckRunResponsewithCompletedAt(Optional<? extends ZonedDateTime> optional)Copy the current immutable object by setting an optional value for thecompletedAtattribute.ImmutableCheckRunResponsewithConclusion(CheckRunConclusion value)Copy the current immutable object by setting a present value for the optionalconclusionattribute.ImmutableCheckRunResponsewithConclusion(Optional<? extends CheckRunConclusion> optional)Copy the current immutable object by setting an optional value for theconclusionattribute.ImmutableCheckRunResponsewithDetailsUrl(String value)Copy the current immutable object by setting a present value for the optionaldetailsUrlattribute.ImmutableCheckRunResponsewithDetailsUrl(Optional<String> optional)Copy the current immutable object by setting an optional value for thedetailsUrlattribute.ImmutableCheckRunResponsewithExternalId(String value)Copy the current immutable object by setting a present value for the optionalexternalIdattribute.ImmutableCheckRunResponsewithExternalId(Optional<String> optional)Copy the current immutable object by setting an optional value for theexternalIdattribute.ImmutableCheckRunResponsewithHeadSha(String value)Copy the current immutable object by setting a value for theheadShaattribute.ImmutableCheckRunResponsewithHtmlUrl(String value)Copy the current immutable object by setting a value for thehtmlUrlattribute.ImmutableCheckRunResponsewithId(long value)Copy the current immutable object by setting a value for theidattribute.ImmutableCheckRunResponsewithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableCheckRunResponsewithOutput(CheckRunOutput value)Copy the current immutable object by setting a value for theoutputattribute.ImmutableCheckRunResponsewithStartedAt(ZonedDateTime value)Copy the current immutable object by setting a present value for the optionalstartedAtattribute.ImmutableCheckRunResponsewithStartedAt(Optional<? extends ZonedDateTime> optional)Copy the current immutable object by setting an optional value for thestartedAtattribute.ImmutableCheckRunResponsewithStatus(CheckRunStatus value)Copy the current immutable object by setting a value for thestatusattribute.ImmutableCheckRunResponsewithUrl(String value)Copy the current immutable object by setting a value for theurlattribute.
-
-
-
Method Detail
-
headSha
public String headSha()
The SHA of the commit.- Specified by:
headShain interfaceCheckRunBase- Returns:
- the string
-
name
public String name()
The name of the check. For example, "code-coverage".- Specified by:
namein interfaceCheckRunBase- Returns:
- the string
-
status
public CheckRunStatus status()
The current status. Can be one of queued, in_progress, or completed.- Specified by:
statusin 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:
conclusionin interfaceCheckRunBase- Returns:
- the conclusion
-
startedAt
public Optional<ZonedDateTime> startedAt()
The time that the check run began.- Specified by:
startedAtin interfaceCheckRunBase- Returns:
- the zoned date time
-
completedAt
public Optional<ZonedDateTime> completedAt()
The time that the check completed.- Specified by:
completedAtin interfaceCheckRunBase- Returns:
- the zoned date time
-
externalId
public Optional<String> externalId()
A reference for the run on the integrator's system.- Specified by:
externalIdin 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:
detailsUrlin interfaceCheckRunBase- Returns:
- the optional
-
id
public long id()
The CheckRun ID.- Specified by:
idin interfaceCheckRunResponse- Returns:
- the int
-
url
public String url()
Url string.- Specified by:
urlin interfaceCheckRunResponse- Returns:
- the string
-
htmlUrl
public String htmlUrl()
Html url string.- Specified by:
htmlUrlin interfaceCheckRunResponse- Returns:
- the string
-
output
public CheckRunOutput output()
The check run output.- Specified by:
outputin interfaceCheckRunResponse- Returns:
- the check run output
- See Also:
CheckRunOutput
-
checkSuite
public Optional<CheckSuite> checkSuite()
Check suite this CheckRun belongs to.- Specified by:
checkSuitein interfaceCheckRunResponse- Returns:
- the optional
-
app
public Optional<App> app()
App which this check ran.- Specified by:
appin interfaceCheckRunResponse- Returns:
- the optional
-
withHeadSha
public final ImmutableCheckRunResponse withHeadSha(String value)
Copy the current immutable object by setting a value for theheadShaattribute. 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
thisobject
-
withName
public final ImmutableCheckRunResponse withName(String value)
Copy the current immutable object by setting a value for thenameattribute. 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
thisobject
-
withStatus
public final ImmutableCheckRunResponse withStatus(CheckRunStatus value)
Copy the current immutable object by setting a value for thestatusattribute. 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
thisobject
-
withConclusion
public final ImmutableCheckRunResponse withConclusion(CheckRunConclusion value)
Copy the current immutable object by setting a present value for the optionalconclusionattribute.- Parameters:
value- The value for conclusion- Returns:
- A modified copy of
thisobject
-
withConclusion
public final ImmutableCheckRunResponse withConclusion(Optional<? extends CheckRunConclusion> optional)
Copy the current immutable object by setting an optional value for theconclusionattribute. 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
thisobject
-
withStartedAt
public final ImmutableCheckRunResponse withStartedAt(ZonedDateTime value)
Copy the current immutable object by setting a present value for the optionalstartedAtattribute.- Parameters:
value- The value for startedAt- Returns:
- A modified copy of
thisobject
-
withStartedAt
public final ImmutableCheckRunResponse withStartedAt(Optional<? extends ZonedDateTime> optional)
Copy the current immutable object by setting an optional value for thestartedAtattribute. 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
thisobject
-
withCompletedAt
public final ImmutableCheckRunResponse withCompletedAt(ZonedDateTime value)
Copy the current immutable object by setting a present value for the optionalcompletedAtattribute.- Parameters:
value- The value for completedAt- Returns:
- A modified copy of
thisobject
-
withCompletedAt
public final ImmutableCheckRunResponse withCompletedAt(Optional<? extends ZonedDateTime> optional)
Copy the current immutable object by setting an optional value for thecompletedAtattribute. 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
thisobject
-
withExternalId
public final ImmutableCheckRunResponse withExternalId(String value)
Copy the current immutable object by setting a present value for the optionalexternalIdattribute.- Parameters:
value- The value for externalId- Returns:
- A modified copy of
thisobject
-
withExternalId
public final ImmutableCheckRunResponse withExternalId(Optional<String> optional)
Copy the current immutable object by setting an optional value for theexternalIdattribute. 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
thisobject
-
withDetailsUrl
public final ImmutableCheckRunResponse withDetailsUrl(String value)
Copy the current immutable object by setting a present value for the optionaldetailsUrlattribute.- Parameters:
value- The value for detailsUrl- Returns:
- A modified copy of
thisobject
-
withDetailsUrl
public final ImmutableCheckRunResponse withDetailsUrl(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedetailsUrlattribute. 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
thisobject
-
withId
public final ImmutableCheckRunResponse withId(long value)
Copy the current immutable object by setting a value for theidattribute. 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
thisobject
-
withUrl
public final ImmutableCheckRunResponse withUrl(String value)
Copy the current immutable object by setting a value for theurlattribute. 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
thisobject
-
withHtmlUrl
public final ImmutableCheckRunResponse withHtmlUrl(String value)
Copy the current immutable object by setting a value for thehtmlUrlattribute. 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
thisobject
-
withOutput
public final ImmutableCheckRunResponse withOutput(CheckRunOutput value)
Copy the current immutable object by setting a value for theoutputattribute. 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
thisobject
-
withCheckSuite
public final ImmutableCheckRunResponse withCheckSuite(CheckSuite value)
Copy the current immutable object by setting a present value for the optionalcheckSuiteattribute.- Parameters:
value- The value for checkSuite- Returns:
- A modified copy of
thisobject
-
withCheckSuite
public final ImmutableCheckRunResponse withCheckSuite(Optional<? extends CheckSuite> optional)
Copy the current immutable object by setting an optional value for thecheckSuiteattribute. 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
thisobject
-
withApp
public final ImmutableCheckRunResponse withApp(App value)
Copy the current immutable object by setting a present value for the optionalappattribute.- Parameters:
value- The value for app- Returns:
- A modified copy of
thisobject
-
withApp
public final ImmutableCheckRunResponse withApp(Optional<? extends App> optional)
Copy the current immutable object by setting an optional value for theappattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCheckRunResponsethat 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 valueCheckRunResponsewith attribute values.
-
copyOf
public static ImmutableCheckRunResponse copyOf(CheckRunResponse instance)
Creates an immutable copy of aCheckRunResponsevalue. 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) // requiredheadSha.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
-
-