Class ImmutablePullRequestLinks

  • All Implemented Interfaces:
    Links, PullRequestLinks

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

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

    • Method Detail

      • self

        @Nullable
        public Links.Href<URI> self()
        Link to this entity in the API.
        Specified by:
        self in interface Links
        Returns:
        The link to the API of this entity
      • html

        @Nullable
        public Links.Href<URI> html()
        Link to the HTML representaion of this item.
        Specified by:
        html in interface Links
        Returns:
        The link to the HTML representation of this entity
      • withSelf

        public final ImmutablePullRequestLinks withSelf​(@Nullable
                                                        Links.Href<URI> value)
        Copy the current immutable object by setting a value for the self attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for self (can be null)
        Returns:
        A modified copy of the this object
      • withHtml

        public final ImmutablePullRequestLinks withHtml​(@Nullable
                                                        Links.Href<URI> value)
        Copy the current immutable object by setting a value for the html attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for html (can be null)
        Returns:
        A modified copy of the this object
      • withIssue

        public final ImmutablePullRequestLinks withIssue​(@Nullable
                                                         Links.Href<URI> value)
        Copy the current immutable object by setting a value for the issue attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for issue (can be null)
        Returns:
        A modified copy of the this object
      • withComments

        public final ImmutablePullRequestLinks withComments​(@Nullable
                                                            Links.Href<URI> value)
        Copy the current immutable object by setting a value for the comments attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for comments (can be null)
        Returns:
        A modified copy of the this object
      • withReviewComment

        public final ImmutablePullRequestLinks withReviewComment​(@Nullable
                                                                 Links.Href<String> value)
        Copy the current immutable object by setting a value for the reviewComment attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for reviewComment (can be null)
        Returns:
        A modified copy of the this object
      • withReviewComments

        public final ImmutablePullRequestLinks withReviewComments​(@Nullable
                                                                  Links.Href<URI> value)
        Copy the current immutable object by setting a value for the reviewComments attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for reviewComments (can be null)
        Returns:
        A modified copy of the this object
      • withCommits

        public final ImmutablePullRequestLinks withCommits​(@Nullable
                                                           Links.Href<URI> value)
        Copy the current immutable object by setting a value for the commits attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for commits (can be null)
        Returns:
        A modified copy of the this object
      • withStatuses

        public final ImmutablePullRequestLinks withStatuses​(@Nullable
                                                            Links.Href<URI> value)
        Copy the current immutable object by setting a value for the statuses attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for statuses (can be null)
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutablePullRequestLinks 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: self, html, issue, comments, reviewComment, reviewComments, commits, statuses.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutablePullRequestLinks copyOf​(PullRequestLinks instance)
        Creates an immutable copy of a PullRequestLinks 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 PullRequestLinks instance
      • builder

        public static ImmutablePullRequestLinks.Builder builder()
        Creates a builder for ImmutablePullRequestLinks.
         ImmutablePullRequestLinks.builder()
            .self(com.spotify.github.Links.Href&lt;java.net.URI&gt; | null) // nullable self
            .html(com.spotify.github.Links.Href&lt;java.net.URI&gt; | null) // nullable html
            .issue(com.spotify.github.Links.Href&lt;java.net.URI&gt; | null) // nullable issue
            .comments(com.spotify.github.Links.Href&lt;java.net.URI&gt; | null) // nullable comments
            .reviewComment(com.spotify.github.Links.Href&lt;String&gt; | null) // nullable reviewComment
            .reviewComments(com.spotify.github.Links.Href&lt;java.net.URI&gt; | null) // nullable reviewComments
            .commits(com.spotify.github.Links.Href&lt;java.net.URI&gt; | null) // nullable commits
            .statuses(com.spotify.github.Links.Href&lt;java.net.URI&gt; | null) // nullable statuses
            .build();
         
        Returns:
        A new ImmutablePullRequestLinks builder