Class ImmutableCommitItem.Builder

  • Enclosing class:
    ImmutableCommitItem

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

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

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

        @CanIgnoreReturnValue
        public final ImmutableCommitItem.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
      • commit

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

        @CanIgnoreReturnValue
        public final ImmutableCommitItem.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
      • commentsUrl

        @CanIgnoreReturnValue
        public final ImmutableCommitItem.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
      • author

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

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

        @CanIgnoreReturnValue
        public final ImmutableCommitItem.Builder addParents​(ShaLink element)
        Adds one element to parents list.
        Parameters:
        element - A parents element
        Returns:
        this builder for use in a chained invocation
      • addParents

        @CanIgnoreReturnValue
        public final ImmutableCommitItem.Builder addParents​(ShaLink... elements)
        Adds elements to parents list.
        Parameters:
        elements - An array of parents elements
        Returns:
        this builder for use in a chained invocation
      • parents

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

        @CanIgnoreReturnValue
        public final ImmutableCommitItem.Builder addAllParents​(Iterable<? extends ShaLink> elements)
        Adds elements to parents list.
        Parameters:
        elements - An iterable of parents elements
        Returns:
        this builder for use in a chained invocation