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 classImmutableCheckRunRequest.BuilderBuilds 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.Builderbuilder()Creates a builder forImmutableCheckRunRequest.Optional<ZonedDateTime>completedAt()The time that the check completed.Optional<CheckRunConclusion>conclusion()The final conclusion of the check.static ImmutableCheckRunRequestcopyOf(CheckRunRequest instance)Creates an immutable copy of aCheckRunRequestvalue.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 ofImmutableCheckRunRequestthat 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,output,actions.StringheadSha()The SHA of the commit.Stringname()The name of the check.Optional<CheckRunOutput>output()The check run output.Optional<ZonedDateTime>startedAt()The time that the check run began.CheckRunStatusstatus()The current status.StringtoString()Prints the immutable valueCheckRunRequestwith attribute values.ImmutableCheckRunRequestwithActions(CheckRunAction... elements)Copy the current immutable object with elements that replace the content ofactions.ImmutableCheckRunRequestwithActions(Iterable<? extends CheckRunAction> elements)Copy the current immutable object with elements that replace the content ofactions.ImmutableCheckRunRequestwithCompletedAt(ZonedDateTime value)Copy the current immutable object by setting a present value for the optionalcompletedAtattribute.ImmutableCheckRunRequestwithCompletedAt(Optional<? extends ZonedDateTime> optional)Copy the current immutable object by setting an optional value for thecompletedAtattribute.ImmutableCheckRunRequestwithConclusion(CheckRunConclusion value)Copy the current immutable object by setting a present value for the optionalconclusionattribute.ImmutableCheckRunRequestwithConclusion(Optional<? extends CheckRunConclusion> optional)Copy the current immutable object by setting an optional value for theconclusionattribute.ImmutableCheckRunRequestwithDetailsUrl(String value)Copy the current immutable object by setting a present value for the optionaldetailsUrlattribute.ImmutableCheckRunRequestwithDetailsUrl(Optional<String> optional)Copy the current immutable object by setting an optional value for thedetailsUrlattribute.ImmutableCheckRunRequestwithExternalId(String value)Copy the current immutable object by setting a present value for the optionalexternalIdattribute.ImmutableCheckRunRequestwithExternalId(Optional<String> optional)Copy the current immutable object by setting an optional value for theexternalIdattribute.ImmutableCheckRunRequestwithHeadSha(String value)Copy the current immutable object by setting a value for theheadShaattribute.ImmutableCheckRunRequestwithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableCheckRunRequestwithOutput(CheckRunOutput value)Copy the current immutable object by setting a present value for the optionaloutputattribute.ImmutableCheckRunRequestwithOutput(Optional<? extends CheckRunOutput> optional)Copy the current immutable object by setting an optional value for theoutputattribute.ImmutableCheckRunRequestwithStartedAt(ZonedDateTime value)Copy the current immutable object by setting a present value for the optionalstartedAtattribute.ImmutableCheckRunRequestwithStartedAt(Optional<? extends ZonedDateTime> optional)Copy the current immutable object by setting an optional value for thestartedAtattribute.ImmutableCheckRunRequestwithStatus(CheckRunStatus value)Copy the current immutable object by setting a value for thestatusattribute.
-
-
-
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
-
output
public Optional<CheckRunOutput> output()
The check run output.- Specified by:
outputin interfaceCheckRunRequest- Returns:
- the check run output
- See Also:
CheckRunOutput
-
actions
public List<CheckRunAction> actions()
The actions list.- Specified by:
actionsin 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 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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 ImmutableCheckRunRequest 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
-
withOutput
public final ImmutableCheckRunRequest withOutput(CheckRunOutput value)
Copy the current immutable object by setting a present value for the optionaloutputattribute.- Parameters:
value- The value for output- Returns:
- A modified copy of
thisobject
-
withOutput
public final ImmutableCheckRunRequest withOutput(Optional<? extends CheckRunOutput> optional)
Copy the current immutable object by setting an optional value for theoutputattribute. 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
thisobject
-
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
thisobject
-
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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCheckRunRequestthat 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 valueCheckRunRequestwith attribute values.
-
copyOf
public static ImmutableCheckRunRequest copyOf(CheckRunRequest instance)
Creates an immutable copy of aCheckRunRequestvalue. 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) // 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.output(com.spotify.github.v3.checks.CheckRunOutput) // optionaloutput.addActions|addAllActions(com.spotify.github.v3.checks.CheckRunAction) //actionselements .build();- Returns:
- A new ImmutableCheckRunRequest builder
-
-