Class ImmutablePullRequestRef.Builder

  • Enclosing class:
    ImmutablePullRequestRef

    @NotThreadSafe
    public static final class ImmutablePullRequestRef.Builder
    extends Object
    Builds instances of type ImmutablePullRequestRef. 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 ImmutablePullRequestRef.Builder from​(PullRequestRef instance)
        Fill a builder with attribute values from the provided PullRequestRef 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
      • label

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

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

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

        @CanIgnoreReturnValue
        public final ImmutablePullRequestRef.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
      • user

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

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

        @CanIgnoreReturnValue
        public final ImmutablePullRequestRef.Builder repo​(Repository repo)
        Initializes the optional value repo to repo.
        Parameters:
        repo - The value for repo
        Returns:
        this builder for chained invocation