Class ImmutableIssue.Builder

  • Enclosing class:
    ImmutableIssue

    @NotThreadSafe
    public static final class ImmutableIssue.Builder
    extends Object
    Builds instances of type ImmutableIssue. 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 ImmutableIssue.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 ImmutableIssue.Builder from​(Issue instance)
        Fill a builder with attribute values from the provided com.spotify.github.v3.issues.Issue instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        @CanIgnoreReturnValue
        public final ImmutableIssue.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 ImmutableIssue.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 ImmutableIssue.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 ImmutableIssue.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 ImmutableIssue.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 ImmutableIssue.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 ImmutableIssue.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
      • eventsUrl

        @CanIgnoreReturnValue
        public final ImmutableIssue.Builder eventsUrl​(@Nullable
                                                      Optional<URI> eventsUrl)
        Initializes the value for the eventsUrl attribute.
        Parameters:
        eventsUrl - The value for eventsUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • repositoryUrl

        @CanIgnoreReturnValue
        public final ImmutableIssue.Builder repositoryUrl​(@Nullable
                                                          Optional<URI> repositoryUrl)
        Initializes the value for the repositoryUrl attribute.
        Parameters:
        repositoryUrl - The value for repositoryUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • labelsUrl

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

        @CanIgnoreReturnValue
        public final ImmutableIssue.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
      • htmlUrl

        @CanIgnoreReturnValue
        public final ImmutableIssue.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
      • number

        @CanIgnoreReturnValue
        public final ImmutableIssue.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 ImmutableIssue.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 ImmutableIssue.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 ImmutableIssue.Builder body​(@Nullable
                                                 Optional<String> body)
        Initializes the value for the body attribute.
        Parameters:
        body - The value for body (can be null)
        Returns:
        this builder for use in a chained invocation
      • user

        @CanIgnoreReturnValue
        public final ImmutableIssue.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
      • addLabels

        @CanIgnoreReturnValue
        public final ImmutableIssue.Builder addLabels​(Label element)
        Adds one element to labels list.
        Parameters:
        element - A labels element
        Returns:
        this builder for use in a chained invocation
      • addLabels

        @CanIgnoreReturnValue
        public final ImmutableIssue.Builder addLabels​(Label... elements)
        Adds elements to labels list.
        Parameters:
        elements - An array of labels elements
        Returns:
        this builder for use in a chained invocation
      • labels

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

        @CanIgnoreReturnValue
        public final ImmutableIssue.Builder addAllLabels​(Iterable<? extends Label> elements)
        Adds elements to labels list.
        Parameters:
        elements - An iterable of labels elements
        Returns:
        this builder for use in a chained invocation
      • assignee

        @CanIgnoreReturnValue
        public final ImmutableIssue.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 ImmutableIssue.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
      • milestone

        @CanIgnoreReturnValue
        public final ImmutableIssue.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 ImmutableIssue.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 ImmutableIssue.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
      • comments

        @CanIgnoreReturnValue
        public final ImmutableIssue.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
      • pullRequest

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

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