Package com.spotify.github.v3.checks
Class ImmutableCheckRunRequest
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableCheckRunRequest
-
- All Implemented Interfaces:
CheckRunBase
,CheckRunRequest
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCheckRunRequest extends Object implements CheckRunRequest
Immutable implementation ofCheckRunRequest
.Use the builder to create immutable instances:
ImmutableCheckRunRequest.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableCheckRunRequest.Builder
Builds instances of typeImmutableCheckRunRequest
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<CheckRunAction>
actions()
The actions list.static ImmutableCheckRunRequest.Builder
builder()
Creates a builder forImmutableCheckRunRequest
.Optional<ZonedDateTime>
completedAt()
The time that the check completed.Optional<CheckRunConclusion>
conclusion()
The final conclusion of the check.static ImmutableCheckRunRequest
copyOf(CheckRunRequest instance)
Creates an immutable copy of aCheckRunRequest
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 ofImmutableCheckRunRequest
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
,output
,actions
.String
headSha()
The SHA of the commit.String
name()
The name of the check.Optional<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 valueCheckRunRequest
with attribute values.ImmutableCheckRunRequest
withActions(CheckRunAction... elements)
Copy the current immutable object with elements that replace the content ofactions
.ImmutableCheckRunRequest
withActions(Iterable<? extends CheckRunAction> elements)
Copy the current immutable object with elements that replace the content ofactions
.ImmutableCheckRunRequest
withCompletedAt(ZonedDateTime value)
Copy the current immutable object by setting a present value for the optionalcompletedAt
attribute.ImmutableCheckRunRequest
withCompletedAt(Optional<? extends ZonedDateTime> optional)
Copy the current immutable object by setting an optional value for thecompletedAt
attribute.ImmutableCheckRunRequest
withConclusion(CheckRunConclusion value)
Copy the current immutable object by setting a present value for the optionalconclusion
attribute.ImmutableCheckRunRequest
withConclusion(Optional<? extends CheckRunConclusion> optional)
Copy the current immutable object by setting an optional value for theconclusion
attribute.ImmutableCheckRunRequest
withDetailsUrl(String value)
Copy the current immutable object by setting a present value for the optionaldetailsUrl
attribute.ImmutableCheckRunRequest
withDetailsUrl(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedetailsUrl
attribute.ImmutableCheckRunRequest
withExternalId(String value)
Copy the current immutable object by setting a present value for the optionalexternalId
attribute.ImmutableCheckRunRequest
withExternalId(Optional<String> optional)
Copy the current immutable object by setting an optional value for theexternalId
attribute.ImmutableCheckRunRequest
withHeadSha(String value)
Copy the current immutable object by setting a value for theheadSha
attribute.ImmutableCheckRunRequest
withName(String value)
Copy the current immutable object by setting a value for thename
attribute.ImmutableCheckRunRequest
withOutput(CheckRunOutput value)
Copy the current immutable object by setting a present value for the optionaloutput
attribute.ImmutableCheckRunRequest
withOutput(Optional<? extends CheckRunOutput> optional)
Copy the current immutable object by setting an optional value for theoutput
attribute.ImmutableCheckRunRequest
withStartedAt(ZonedDateTime value)
Copy the current immutable object by setting a present value for the optionalstartedAt
attribute.ImmutableCheckRunRequest
withStartedAt(Optional<? extends ZonedDateTime> optional)
Copy the current immutable object by setting an optional value for thestartedAt
attribute.ImmutableCheckRunRequest
withStatus(CheckRunStatus value)
Copy the current immutable object by setting a value for thestatus
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
-
output
public Optional<CheckRunOutput> output()
The check run output.- Specified by:
output
in interfaceCheckRunRequest
- Returns:
- the check run output
- See Also:
CheckRunOutput
-
actions
public List<CheckRunAction> actions()
The actions list.- Specified by:
actions
in interfaceCheckRunRequest
- Returns:
- the actions list
- See Also:
CheckRunAction
-
withHeadSha
public final ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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
-
withOutput
public final ImmutableCheckRunRequest withOutput(CheckRunOutput value)
Copy the current immutable object by setting a present value for the optionaloutput
attribute.- Parameters:
value
- The value for output- Returns:
- A modified copy of
this
object
-
withOutput
public final ImmutableCheckRunRequest withOutput(Optional<? extends CheckRunOutput> optional)
Copy the current immutable object by setting an optional value for theoutput
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 output- Returns:
- A modified copy of
this
object
-
withActions
public final ImmutableCheckRunRequest withActions(CheckRunAction... elements)
Copy the current immutable object with elements that replace the content ofactions
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withActions
public final ImmutableCheckRunRequest withActions(Iterable<? extends CheckRunAction> elements)
Copy the current immutable object with elements that replace the content ofactions
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of actions elements to set- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCheckRunRequest
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:headSha
,name
,status
,conclusion
,startedAt
,completedAt
,externalId
,detailsUrl
,output
,actions
.
-
toString
public String toString()
Prints the immutable valueCheckRunRequest
with attribute values.
-
copyOf
public static ImmutableCheckRunRequest copyOf(CheckRunRequest instance)
Creates an immutable copy of aCheckRunRequest
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 CheckRunRequest instance
-
builder
public static ImmutableCheckRunRequest.Builder builder()
Creates a builder forImmutableCheckRunRequest
.ImmutableCheckRunRequest.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
.output(com.spotify.github.v3.checks.CheckRunOutput) // optionaloutput
.addActions|addAllActions(com.spotify.github.v3.checks.CheckRunAction) //actions
elements .build();- Returns:
- A new ImmutableCheckRunRequest builder
-
-