Class ImmutablePullRequestCreate.Builder

  • Enclosing class:
    ImmutablePullRequestCreate

    @NotThreadSafe
    public static final class ImmutablePullRequestCreate.Builder
    extends Object
    Builds instances of type ImmutablePullRequestCreate. 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 ImmutablePullRequestCreate.Builder from​(PullRequestCreate instance)
        Fill a builder with attribute values from the provided PullRequestCreate instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • title

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

        @CanIgnoreReturnValue
        public final ImmutablePullRequestCreate.Builder head​(@Nullable
                                                             String 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 ImmutablePullRequestCreate.Builder base​(@Nullable
                                                             String 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
      • draft

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