Class ImmutableCheckRunRequest

  • All Implemented Interfaces:
    CheckRunBase, CheckRunRequest

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableCheckRunRequest
    extends Object
    implements CheckRunRequest
    Immutable implementation of CheckRunRequest.

    Use the builder to create immutable instances: ImmutableCheckRunRequest.builder().

    • Method Detail

      • headSha

        public String headSha()
        The SHA of the commit.
        Specified by:
        headSha in interface CheckRunBase
        Returns:
        the string
      • name

        public String name()
        The name of the check. For example, "code-coverage".
        Specified by:
        name in interface CheckRunBase
        Returns:
        the string
      • status

        public CheckRunStatus status()
        The current status. Can be one of queued, in_progress, or completed.
        Specified by:
        status in interface CheckRunBase
        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 interface CheckRunBase
        Returns:
        the conclusion
      • externalId

        public Optional<String> externalId()
        A reference for the run on the integrator's system.
        Specified by:
        externalId in interface CheckRunBase
        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 interface CheckRunBase
        Returns:
        the optional
      • withHeadSha

        public final ImmutableCheckRunRequest withHeadSha​(String value)
        Copy the current immutable object by setting a value for the headSha attribute. An equals check used to prevent copying of the same value by returning this.
        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 the name attribute. An equals check used to prevent copying of the same value by returning this.
        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 the status attribute. A value equality check is used to prevent copying of the same value by returning this.
        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 optional conclusion 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 the conclusion attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        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 optional startedAt 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 the startedAt attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        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 optional completedAt 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 the completedAt attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        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 optional externalId 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 the externalId attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        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 optional detailsUrl 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 the detailsUrl attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        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 optional output 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 the output attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        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 of actions.
        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 of actions. A shallow reference equality check is used to prevent copying of the same value by returning this.
        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 of ImmutableCheckRunRequest that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: headSha, name, status, conclusion, startedAt, completedAt, externalId, detailsUrl, output, actions.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Prints the immutable value CheckRunRequest with attribute values.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableCheckRunRequest copyOf​(CheckRunRequest instance)
        Creates an immutable copy of a CheckRunRequest 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 for ImmutableCheckRunRequest.
         ImmutableCheckRunRequest.builder()
            .headSha(String) // required headSha
            .name(String) // required name
            .status(com.spotify.github.v3.checks.CheckRunStatus) // required status
            .conclusion(com.spotify.github.v3.checks.CheckRunConclusion) // optional conclusion
            .startedAt(java.time.ZonedDateTime) // optional startedAt
            .completedAt(java.time.ZonedDateTime) // optional completedAt
            .externalId(String) // optional externalId
            .detailsUrl(String) // optional detailsUrl
            .output(com.spotify.github.v3.checks.CheckRunOutput) // optional output
            .addActions|addAllActions(com.spotify.github.v3.checks.CheckRunAction) // actions elements
            .build();
         
        Returns:
        A new ImmutableCheckRunRequest builder