Class ImmutablePullRequest.Builder

  • Enclosing class:
    ImmutablePullRequest

    @NotThreadSafe
    public static final class ImmutablePullRequest.Builder
    extends Object
    Builds instances of type ImmutablePullRequest. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder from​(PullRequestItem instance)
        Fill a builder with attribute values from the provided com.spotify.github.v3.prs.PullRequestItem instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder from​(CloseTracking instance)
        Fill a builder with attribute values from the provided com.spotify.github.CloseTracking instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder from​(UpdateTracking instance)
        Fill a builder with attribute values from the provided com.spotify.github.UpdateTracking instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder from​(PullRequest instance)
        Fill a builder with attribute values from the provided com.spotify.github.v3.prs.PullRequest instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • createdAt

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder createdAt​(@Nullable
                                                            GitHubInstant createdAt)
        Initializes the value for the createdAt attribute.
        Parameters:
        createdAt - The value for createdAt (can be null)
        Returns:
        this builder for use in a chained invocation
      • updatedAt

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder updatedAt​(@Nullable
                                                            GitHubInstant updatedAt)
        Initializes the value for the updatedAt attribute.
        Parameters:
        updatedAt - The value for updatedAt (can be null)
        Returns:
        this builder for use in a chained invocation
      • closedAt

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder closedAt​(GitHubInstant closedAt)
        Initializes the optional value closedAt to closedAt.
        Parameters:
        closedAt - The value for closedAt
        Returns:
        this builder for chained invocation
      • closedAt

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder closedAt​(Optional<? extends GitHubInstant> closedAt)
        Initializes the optional value closedAt to closedAt.
        Parameters:
        closedAt - The value for closedAt
        Returns:
        this builder for use in a chained invocation
      • id

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder id​(@Nullable
                                                     Integer id)
        Initializes the value for the id attribute.
        Parameters:
        id - The value for id (can be null)
        Returns:
        this builder for use in a chained invocation
      • url

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder url​(@Nullable
                                                      URI url)
        Initializes the value for the url attribute.
        Parameters:
        url - The value for url (can be null)
        Returns:
        this builder for use in a chained invocation
      • htmlUrl

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder htmlUrl​(@Nullable
                                                          URI htmlUrl)
        Initializes the value for the htmlUrl attribute.
        Parameters:
        htmlUrl - The value for htmlUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • diffUrl

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder diffUrl​(@Nullable
                                                          URI diffUrl)
        Initializes the value for the diffUrl attribute.
        Parameters:
        diffUrl - The value for diffUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • patchUrl

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder patchUrl​(@Nullable
                                                           URI patchUrl)
        Initializes the value for the patchUrl attribute.
        Parameters:
        patchUrl - The value for patchUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • issueUrl

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder issueUrl​(@Nullable
                                                           URI issueUrl)
        Initializes the value for the issueUrl attribute.
        Parameters:
        issueUrl - The value for issueUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • commitsUrl

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder commitsUrl​(@Nullable
                                                             URI commitsUrl)
        Initializes the value for the commitsUrl attribute.
        Parameters:
        commitsUrl - The value for commitsUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • number

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder number​(@Nullable
                                                         Integer number)
        Initializes the value for the number attribute.
        Parameters:
        number - The value for number (can be null)
        Returns:
        this builder for use in a chained invocation
      • state

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder state​(@Nullable
                                                        String state)
        Initializes the value for the state attribute.
        Parameters:
        state - The value for state (can be null)
        Returns:
        this builder for use in a chained invocation
      • title

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder title​(@Nullable
                                                        String title)
        Initializes the value for the title attribute.
        Parameters:
        title - The value for title (can be null)
        Returns:
        this builder for use in a chained invocation
      • body

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder body​(String body)
        Initializes the optional value body to body.
        Parameters:
        body - The value for body
        Returns:
        this builder for chained invocation
      • body

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder body​(Optional<String> body)
        Initializes the optional value body to body.
        Parameters:
        body - The value for body
        Returns:
        this builder for use in a chained invocation
      • assignee

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder assignee​(User assignee)
        Initializes the optional value assignee to assignee.
        Parameters:
        assignee - The value for assignee
        Returns:
        this builder for chained invocation
      • assignee

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder assignee​(Optional<? extends User> assignee)
        Initializes the optional value assignee to assignee.
        Parameters:
        assignee - The value for assignee
        Returns:
        this builder for use in a chained invocation
      • assignees

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder assignees​(List<User> assignees)
        Initializes the optional value assignees to assignees.
        Parameters:
        assignees - The value for assignees
        Returns:
        this builder for chained invocation
      • assignees

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder assignees​(Optional<? extends List<User>> assignees)
        Initializes the optional value assignees to assignees.
        Parameters:
        assignees - The value for assignees
        Returns:
        this builder for use in a chained invocation
      • milestone

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder milestone​(Milestone milestone)
        Initializes the optional value milestone to milestone.
        Parameters:
        milestone - The value for milestone
        Returns:
        this builder for chained invocation
      • milestone

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder milestone​(Optional<? extends Milestone> milestone)
        Initializes the optional value milestone to milestone.
        Parameters:
        milestone - The value for milestone
        Returns:
        this builder for use in a chained invocation
      • locked

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder locked​(@Nullable
                                                         Boolean locked)
        Initializes the value for the locked attribute.
        Parameters:
        locked - The value for locked (can be null)
        Returns:
        this builder for use in a chained invocation
      • mergedAt

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder mergedAt​(GitHubInstant mergedAt)
        Initializes the optional value mergedAt to mergedAt.
        Parameters:
        mergedAt - The value for mergedAt
        Returns:
        this builder for chained invocation
      • mergedAt

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder mergedAt​(Optional<? extends GitHubInstant> mergedAt)
        Initializes the optional value mergedAt to mergedAt.
        Parameters:
        mergedAt - The value for mergedAt
        Returns:
        this builder for use in a chained invocation
      • head

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder head​(@Nullable
                                                       PullRequestRef head)
        Initializes the value for the head attribute.
        Parameters:
        head - The value for head (can be null)
        Returns:
        this builder for use in a chained invocation
      • base

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder base​(@Nullable
                                                       PullRequestRef base)
        Initializes the value for the base attribute.
        Parameters:
        base - The value for base (can be null)
        Returns:
        this builder for use in a chained invocation
      • user

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder user​(@Nullable
                                                       User user)
        Initializes the value for the user attribute.
        Parameters:
        user - The value for user (can be null)
        Returns:
        this builder for use in a chained invocation
      • statusesUrl

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder statusesUrl​(@Nullable
                                                              URI statusesUrl)
        Initializes the value for the statusesUrl attribute.
        Parameters:
        statusesUrl - The value for statusesUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • reviewCommentsUrl

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder reviewCommentsUrl​(@Nullable
                                                                    URI reviewCommentsUrl)
        Initializes the value for the reviewCommentsUrl attribute.
        Parameters:
        reviewCommentsUrl - The value for reviewCommentsUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • reviewCommentUrl

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder reviewCommentUrl​(@Nullable
                                                                   String reviewCommentUrl)
        Initializes the value for the reviewCommentUrl attribute.
        Parameters:
        reviewCommentUrl - The value for reviewCommentUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • commentsUrl

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder commentsUrl​(@Nullable
                                                              URI commentsUrl)
        Initializes the value for the commentsUrl attribute.
        Parameters:
        commentsUrl - The value for commentsUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • links

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder links​(@Nullable
                                                        PullRequestLinks links)
        Initializes the value for the links attribute.
        Parameters:
        links - The value for links (can be null)
        Returns:
        this builder for use in a chained invocation
      • addRequestedReviewers

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder addRequestedReviewers​(User element)
        Adds one element to requestedReviewers list.
        Parameters:
        element - A requestedReviewers element
        Returns:
        this builder for use in a chained invocation
      • addRequestedReviewers

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder addRequestedReviewers​(User... elements)
        Adds elements to requestedReviewers list.
        Parameters:
        elements - An array of requestedReviewers elements
        Returns:
        this builder for use in a chained invocation
      • requestedReviewers

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder requestedReviewers​(@Nullable
                                                                     Iterable<? extends User> elements)
        Sets or replaces all elements for requestedReviewers list.
        Parameters:
        elements - An iterable of requestedReviewers elements
        Returns:
        this builder for use in a chained invocation
      • addAllRequestedReviewers

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder addAllRequestedReviewers​(Iterable<? extends User> elements)
        Adds elements to requestedReviewers list.
        Parameters:
        elements - An iterable of requestedReviewers elements
        Returns:
        this builder for use in a chained invocation
      • addRequestedTeams

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder addRequestedTeams​(User element)
        Adds one element to requestedTeams list.
        Parameters:
        element - A requestedTeams element
        Returns:
        this builder for use in a chained invocation
      • addRequestedTeams

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder addRequestedTeams​(User... elements)
        Adds elements to requestedTeams list.
        Parameters:
        elements - An array of requestedTeams elements
        Returns:
        this builder for use in a chained invocation
      • requestedTeams

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder requestedTeams​(@Nullable
                                                                 Iterable<? extends User> elements)
        Sets or replaces all elements for requestedTeams list.
        Parameters:
        elements - An iterable of requestedTeams elements
        Returns:
        this builder for use in a chained invocation
      • addAllRequestedTeams

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder addAllRequestedTeams​(Iterable<? extends User> elements)
        Adds elements to requestedTeams list.
        Parameters:
        elements - An iterable of requestedTeams elements
        Returns:
        this builder for use in a chained invocation
      • mergeCommitSha

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder mergeCommitSha​(String mergeCommitSha)
        Initializes the optional value mergeCommitSha to mergeCommitSha.
        Parameters:
        mergeCommitSha - The value for mergeCommitSha
        Returns:
        this builder for chained invocation
      • mergeCommitSha

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder mergeCommitSha​(Optional<String> mergeCommitSha)
        Initializes the optional value mergeCommitSha to mergeCommitSha.
        Parameters:
        mergeCommitSha - The value for mergeCommitSha
        Returns:
        this builder for use in a chained invocation
      • merged

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder merged​(@Nullable
                                                         Boolean merged)
        Initializes the value for the merged attribute.
        Parameters:
        merged - The value for merged (can be null)
        Returns:
        this builder for use in a chained invocation
      • mergeable

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder mergeable​(boolean mergeable)
        Initializes the optional value mergeable to mergeable.
        Parameters:
        mergeable - The value for mergeable
        Returns:
        this builder for chained invocation
      • mergeable

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder mergeable​(Optional<Boolean> mergeable)
        Initializes the optional value mergeable to mergeable.
        Parameters:
        mergeable - The value for mergeable
        Returns:
        this builder for use in a chained invocation
      • mergedBy

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder mergedBy​(User mergedBy)
        Initializes the optional value mergedBy to mergedBy.
        Parameters:
        mergedBy - The value for mergedBy
        Returns:
        this builder for chained invocation
      • mergedBy

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder mergedBy​(Optional<? extends User> mergedBy)
        Initializes the optional value mergedBy to mergedBy.
        Parameters:
        mergedBy - The value for mergedBy
        Returns:
        this builder for use in a chained invocation
      • comments

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder comments​(@Nullable
                                                           Integer comments)
        Initializes the value for the comments attribute.
        Parameters:
        comments - The value for comments (can be null)
        Returns:
        this builder for use in a chained invocation
      • reviewComments

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder reviewComments​(@Nullable
                                                                 Integer reviewComments)
        Initializes the value for the reviewComments attribute.
        Parameters:
        reviewComments - The value for reviewComments (can be null)
        Returns:
        this builder for use in a chained invocation
      • commits

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder commits​(@Nullable
                                                          Integer commits)
        Initializes the value for the commits attribute.
        Parameters:
        commits - The value for commits (can be null)
        Returns:
        this builder for use in a chained invocation
      • additions

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder additions​(@Nullable
                                                            Integer additions)
        Initializes the value for the additions attribute.
        Parameters:
        additions - The value for additions (can be null)
        Returns:
        this builder for use in a chained invocation
      • deletions

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder deletions​(@Nullable
                                                            Integer deletions)
        Initializes the value for the deletions attribute.
        Parameters:
        deletions - The value for deletions (can be null)
        Returns:
        this builder for use in a chained invocation
      • changedFiles

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder changedFiles​(@Nullable
                                                               Integer changedFiles)
        Initializes the value for the changedFiles attribute.
        Parameters:
        changedFiles - The value for changedFiles (can be null)
        Returns:
        this builder for use in a chained invocation
      • mergeableState

        @CanIgnoreReturnValue
        public final ImmutablePullRequest.Builder mergeableState​(@Nullable
                                                                 String mergeableState)
        Initializes the value for the mergeableState attribute.
        Parameters:
        mergeableState - The value for mergeableState (can be null)
        Returns:
        this builder for use in a chained invocation