Class ImmutablePullRequest

    • Method Detail

      • state

        @Nullable
        public String state()
        Either open, closed, or all to filter by state. Default: open.
        Specified by:
        state in interface PullRequestItem
      • withCreatedAt

        public final ImmutablePullRequest withCreatedAt​(@Nullable
                                                        GitHubInstant value)
        Copy the current immutable object by setting a value for the createdAt attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for createdAt (can be null)
        Returns:
        A modified copy of the this object
      • withUpdatedAt

        public final ImmutablePullRequest withUpdatedAt​(@Nullable
                                                        GitHubInstant value)
        Copy the current immutable object by setting a value for the updatedAt attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for updatedAt (can be null)
        Returns:
        A modified copy of the this object
      • withClosedAt

        public final ImmutablePullRequest withClosedAt​(GitHubInstant value)
        Copy the current immutable object by setting a present value for the optional closedAt attribute.
        Parameters:
        value - The value for closedAt
        Returns:
        A modified copy of this object
      • withClosedAt

        public final ImmutablePullRequest withClosedAt​(Optional<? extends GitHubInstant> optional)
        Copy the current immutable object by setting an optional value for the closedAt 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 closedAt
        Returns:
        A modified copy of this object
      • withId

        public final ImmutablePullRequest withId​(@Nullable
                                                 Integer value)
        Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for id (can be null)
        Returns:
        A modified copy of the this object
      • withUrl

        public final ImmutablePullRequest withUrl​(@Nullable
                                                  URI value)
        Copy the current immutable object by setting a value for the url attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for url (can be null)
        Returns:
        A modified copy of the this object
      • withHtmlUrl

        public final ImmutablePullRequest withHtmlUrl​(@Nullable
                                                      URI value)
        Copy the current immutable object by setting a value for the htmlUrl attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for htmlUrl (can be null)
        Returns:
        A modified copy of the this object
      • withDiffUrl

        public final ImmutablePullRequest withDiffUrl​(@Nullable
                                                      URI value)
        Copy the current immutable object by setting a value for the diffUrl attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for diffUrl (can be null)
        Returns:
        A modified copy of the this object
      • withPatchUrl

        public final ImmutablePullRequest withPatchUrl​(@Nullable
                                                       URI value)
        Copy the current immutable object by setting a value for the patchUrl attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for patchUrl (can be null)
        Returns:
        A modified copy of the this object
      • withIssueUrl

        public final ImmutablePullRequest withIssueUrl​(@Nullable
                                                       URI value)
        Copy the current immutable object by setting a value for the issueUrl attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for issueUrl (can be null)
        Returns:
        A modified copy of the this object
      • withCommitsUrl

        public final ImmutablePullRequest withCommitsUrl​(@Nullable
                                                         URI value)
        Copy the current immutable object by setting a value for the commitsUrl attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for commitsUrl (can be null)
        Returns:
        A modified copy of the this object
      • withNumber

        public final ImmutablePullRequest withNumber​(@Nullable
                                                     Integer value)
        Copy the current immutable object by setting a value for the number attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for number (can be null)
        Returns:
        A modified copy of the this object
      • withState

        public final ImmutablePullRequest withState​(@Nullable
                                                    String value)
        Copy the current immutable object by setting a value for the state attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for state (can be null)
        Returns:
        A modified copy of the this object
      • withTitle

        public final ImmutablePullRequest withTitle​(@Nullable
                                                    String value)
        Copy the current immutable object by setting a value for the title attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for title (can be null)
        Returns:
        A modified copy of the this object
      • withBody

        public final ImmutablePullRequest withBody​(String value)
        Copy the current immutable object by setting a present value for the optional body attribute.
        Parameters:
        value - The value for body
        Returns:
        A modified copy of this object
      • withBody

        public final ImmutablePullRequest withBody​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the body 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 body
        Returns:
        A modified copy of this object
      • withAssignee

        public final ImmutablePullRequest withAssignee​(User value)
        Copy the current immutable object by setting a present value for the optional assignee attribute.
        Parameters:
        value - The value for assignee
        Returns:
        A modified copy of this object
      • withAssignee

        public final ImmutablePullRequest withAssignee​(Optional<? extends User> optional)
        Copy the current immutable object by setting an optional value for the assignee 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 assignee
        Returns:
        A modified copy of this object
      • withAssignees

        public final ImmutablePullRequest withAssignees​(List<User> value)
        Copy the current immutable object by setting a present value for the optional assignees attribute.
        Parameters:
        value - The value for assignees
        Returns:
        A modified copy of this object
      • withAssignees

        public final ImmutablePullRequest withAssignees​(Optional<? extends List<User>> optional)
        Copy the current immutable object by setting an optional value for the assignees 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 assignees
        Returns:
        A modified copy of this object
      • withMilestone

        public final ImmutablePullRequest withMilestone​(Milestone value)
        Copy the current immutable object by setting a present value for the optional milestone attribute.
        Parameters:
        value - The value for milestone
        Returns:
        A modified copy of this object
      • withMilestone

        public final ImmutablePullRequest withMilestone​(Optional<? extends Milestone> optional)
        Copy the current immutable object by setting an optional value for the milestone 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 milestone
        Returns:
        A modified copy of this object
      • withLocked

        public final ImmutablePullRequest withLocked​(@Nullable
                                                     Boolean value)
        Copy the current immutable object by setting a value for the locked attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for locked (can be null)
        Returns:
        A modified copy of the this object
      • withMergedAt

        public final ImmutablePullRequest withMergedAt​(GitHubInstant value)
        Copy the current immutable object by setting a present value for the optional mergedAt attribute.
        Parameters:
        value - The value for mergedAt
        Returns:
        A modified copy of this object
      • withMergedAt

        public final ImmutablePullRequest withMergedAt​(Optional<? extends GitHubInstant> optional)
        Copy the current immutable object by setting an optional value for the mergedAt 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 mergedAt
        Returns:
        A modified copy of this object
      • withHead

        public final ImmutablePullRequest withHead​(@Nullable
                                                   PullRequestRef value)
        Copy the current immutable object by setting a value for the head attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for head (can be null)
        Returns:
        A modified copy of the this object
      • withBase

        public final ImmutablePullRequest withBase​(@Nullable
                                                   PullRequestRef value)
        Copy the current immutable object by setting a value for the base attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for base (can be null)
        Returns:
        A modified copy of the this object
      • withUser

        public final ImmutablePullRequest withUser​(@Nullable
                                                   User value)
        Copy the current immutable object by setting a value for the user attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for user (can be null)
        Returns:
        A modified copy of the this object
      • withStatusesUrl

        public final ImmutablePullRequest withStatusesUrl​(@Nullable
                                                          URI value)
        Copy the current immutable object by setting a value for the statusesUrl attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for statusesUrl (can be null)
        Returns:
        A modified copy of the this object
      • withReviewCommentsUrl

        public final ImmutablePullRequest withReviewCommentsUrl​(@Nullable
                                                                URI value)
        Copy the current immutable object by setting a value for the reviewCommentsUrl attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for reviewCommentsUrl (can be null)
        Returns:
        A modified copy of the this object
      • withReviewCommentUrl

        public final ImmutablePullRequest withReviewCommentUrl​(@Nullable
                                                               String value)
        Copy the current immutable object by setting a value for the reviewCommentUrl attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for reviewCommentUrl (can be null)
        Returns:
        A modified copy of the this object
      • withCommentsUrl

        public final ImmutablePullRequest withCommentsUrl​(@Nullable
                                                          URI value)
        Copy the current immutable object by setting a value for the commentsUrl attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for commentsUrl (can be null)
        Returns:
        A modified copy of the this object
      • withLinks

        public final ImmutablePullRequest withLinks​(@Nullable
                                                    PullRequestLinks value)
        Copy the current immutable object by setting a value for the links attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for links (can be null)
        Returns:
        A modified copy of the this object
      • withMergeCommitSha

        public final ImmutablePullRequest withMergeCommitSha​(String value)
        Copy the current immutable object by setting a present value for the optional mergeCommitSha attribute.
        Parameters:
        value - The value for mergeCommitSha
        Returns:
        A modified copy of this object
      • withMergeCommitSha

        public final ImmutablePullRequest withMergeCommitSha​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the mergeCommitSha 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 mergeCommitSha
        Returns:
        A modified copy of this object
      • withMerged

        public final ImmutablePullRequest withMerged​(@Nullable
                                                     Boolean value)
        Copy the current immutable object by setting a value for the merged attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for merged (can be null)
        Returns:
        A modified copy of the this object
      • withMergeable

        public final ImmutablePullRequest withMergeable​(boolean value)
        Copy the current immutable object by setting a present value for the optional mergeable attribute.
        Parameters:
        value - The value for mergeable
        Returns:
        A modified copy of this object
      • withMergeable

        public final ImmutablePullRequest withMergeable​(Optional<Boolean> optional)
        Copy the current immutable object by setting an optional value for the mergeable 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 mergeable
        Returns:
        A modified copy of this object
      • withMergedBy

        public final ImmutablePullRequest withMergedBy​(User value)
        Copy the current immutable object by setting a present value for the optional mergedBy attribute.
        Parameters:
        value - The value for mergedBy
        Returns:
        A modified copy of this object
      • withMergedBy

        public final ImmutablePullRequest withMergedBy​(Optional<? extends User> optional)
        Copy the current immutable object by setting an optional value for the mergedBy 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 mergedBy
        Returns:
        A modified copy of this object
      • withComments

        public final ImmutablePullRequest withComments​(@Nullable
                                                       Integer value)
        Copy the current immutable object by setting a value for the comments attribute. An equals check 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
      • withReviewComments

        public final ImmutablePullRequest withReviewComments​(@Nullable
                                                             Integer value)
        Copy the current immutable object by setting a value for the reviewComments attribute. An equals check 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 ImmutablePullRequest withCommits​(@Nullable
                                                      Integer value)
        Copy the current immutable object by setting a value for the commits attribute. An equals check 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
      • withAdditions

        public final ImmutablePullRequest withAdditions​(@Nullable
                                                        Integer value)
        Copy the current immutable object by setting a value for the additions attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for additions (can be null)
        Returns:
        A modified copy of the this object
      • withDeletions

        public final ImmutablePullRequest withDeletions​(@Nullable
                                                        Integer value)
        Copy the current immutable object by setting a value for the deletions attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for deletions (can be null)
        Returns:
        A modified copy of the this object
      • withChangedFiles

        public final ImmutablePullRequest withChangedFiles​(@Nullable
                                                           Integer value)
        Copy the current immutable object by setting a value for the changedFiles attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for changedFiles (can be null)
        Returns:
        A modified copy of the this object
      • withMergeableState

        public final ImmutablePullRequest withMergeableState​(@Nullable
                                                             String value)
        Copy the current immutable object by setting a value for the mergeableState attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for mergeableState (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 ImmutablePullRequest 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: createdAt, updatedAt, closedAt, id, url, htmlUrl, diffUrl, patchUrl, issueUrl, commitsUrl, number, state, title, body, assignee, assignees, milestone, locked, mergedAt, head, base, user, statusesUrl, reviewCommentsUrl, reviewCommentUrl, commentsUrl, links, mergeCommitSha, merged, mergeable, mergedBy, comments, reviewComments, commits, additions, deletions, changedFiles, mergeableState.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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

        public static ImmutablePullRequest.Builder builder()
        Creates a builder for ImmutablePullRequest.
         ImmutablePullRequest.builder()
            .createdAt(com.spotify.github.GitHubInstant | null) // nullable createdAt
            .updatedAt(com.spotify.github.GitHubInstant | null) // nullable updatedAt
            .closedAt(com.spotify.github.GitHubInstant) // optional closedAt
            .id(Integer | null) // nullable id
            .url(java.net.URI | null) // nullable url
            .htmlUrl(java.net.URI | null) // nullable htmlUrl
            .diffUrl(java.net.URI | null) // nullable diffUrl
            .patchUrl(java.net.URI | null) // nullable patchUrl
            .issueUrl(java.net.URI | null) // nullable issueUrl
            .commitsUrl(java.net.URI | null) // nullable commitsUrl
            .number(Integer | null) // nullable number
            .state(String | null) // nullable state
            .title(String | null) // nullable title
            .body(String) // optional body
            .assignee(com.spotify.github.v3.User) // optional assignee
            .assignees(List&lt;com.spotify.github.v3.User&gt;) // optional assignees
            .milestone(com.spotify.github.v3.Milestone) // optional milestone
            .locked(Boolean | null) // nullable locked
            .mergedAt(com.spotify.github.GitHubInstant) // optional mergedAt
            .head(com.spotify.github.v3.prs.PullRequestRef | null) // nullable head
            .base(com.spotify.github.v3.prs.PullRequestRef | null) // nullable base
            .user(com.spotify.github.v3.User | null) // nullable user
            .statusesUrl(java.net.URI | null) // nullable statusesUrl
            .reviewCommentsUrl(java.net.URI | null) // nullable reviewCommentsUrl
            .reviewCommentUrl(String | null) // nullable reviewCommentUrl
            .commentsUrl(java.net.URI | null) // nullable commentsUrl
            .links(com.spotify.github.v3.prs.PullRequestLinks | null) // nullable links
            .mergeCommitSha(String) // optional mergeCommitSha
            .merged(Boolean | null) // nullable merged
            .mergeable(Boolean) // optional mergeable
            .mergedBy(com.spotify.github.v3.User) // optional mergedBy
            .comments(Integer | null) // nullable comments
            .reviewComments(Integer | null) // nullable reviewComments
            .commits(Integer | null) // nullable commits
            .additions(Integer | null) // nullable additions
            .deletions(Integer | null) // nullable deletions
            .changedFiles(Integer | null) // nullable changedFiles
            .mergeableState(String | null) // nullable mergeableState
            .build();
         
        Returns:
        A new ImmutablePullRequest builder