Class ImmutableComment.Builder

  • Enclosing class:
    ImmutableComment

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

        @CanIgnoreReturnValue
        public final ImmutableComment.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 ImmutableComment.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 ImmutableComment.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
      • url

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

        @CanIgnoreReturnValue
        public final ImmutableComment.Builder id​(int id)
        Initializes the value for the id attribute.
        Parameters:
        id - The value for id
        Returns:
        this builder for use in a chained invocation
      • user

        @CanIgnoreReturnValue
        public final ImmutableComment.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
      • position

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

        @CanIgnoreReturnValue
        public final ImmutableComment.Builder position​(Optional<Integer> position)
        Initializes the optional value position to position.
        Parameters:
        position - The value for position
        Returns:
        this builder for use in a chained invocation
      • line

        @CanIgnoreReturnValue
        @Deprecated
        public final ImmutableComment.Builder line​(int line)
        Deprecated.
        Initializes the optional value line to line.
        Parameters:
        line - The value for line
        Returns:
        this builder for chained invocation
      • path

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

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

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

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

        @CanIgnoreReturnValue
        public final ImmutableComment.Builder body​(@Nullable
                                                   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
      • issueUrl

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

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