Class ImmutablePullRequestItem

    • 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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 ImmutablePullRequestItem 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
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutablePullRequestItem 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.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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

        public static ImmutablePullRequestItem.Builder builder()
        Creates a builder for ImmutablePullRequestItem.
         ImmutablePullRequestItem.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
            .build();
         
        Returns:
        A new ImmutablePullRequestItem builder