Class ImmutablePullRequestItem.Builder

  • Enclosing class:
    ImmutablePullRequestItem

    @NotThreadSafe
    public static final class ImmutablePullRequestItem.Builder
    extends Object
    Builds instances of type ImmutablePullRequestItem. 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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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
      • createdAt

        @CanIgnoreReturnValue
        public final ImmutablePullRequestItem.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 ImmutablePullRequestItem.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
      • id

        @CanIgnoreReturnValue
        public final ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.Builder body​(String body)
        Initializes the optional value body to body.
        Parameters:
        body - The value for body
        Returns:
        this builder for chained invocation
      • assignee

        @CanIgnoreReturnValue
        public final ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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
      • head

        @CanIgnoreReturnValue
        public final ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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 ImmutablePullRequestItem.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