public static class

PullRequestDiffRequest.Builder

extends AbstractPullRequestRequest.AbstractBuilder<T extends AbstractBuilder<T>>
java.lang.Object
   ↳ com.atlassian.stash.util.BuilderSupport
     ↳ com.atlassian.stash.pull.AbstractPullRequestRequest.AbstractBuilder<T extends com.atlassian.stash.pull.AbstractPullRequestRequest.AbstractBuilder<T>>
       ↳ com.atlassian.stash.pull.PullRequestDiffRequest.Builder

Summary

[Expand]
Inherited Fields
From class com.atlassian.stash.pull.AbstractPullRequestRequest.AbstractBuilder
From class com.atlassian.stash.util.BuilderSupport
Public Constructors
PullRequestDiffRequest.Builder(PullRequestDiffRequest request)
PullRequestDiffRequest.Builder(PullRequest pullRequest, String path)
PullRequestDiffRequest.Builder(int repositoryId, long pullRequestId, String path)
Public Methods
@Nonnull PullRequestDiffRequest build()
@Nonnull PullRequestDiffRequest.Builder contextLines(int value)
Specifies the number of context lines to include around added/removed lines.
@Nonnull PullRequestDiffRequest.Builder srcPath(String value)
@Nonnull PullRequestDiffRequest.Builder whitespace(DiffWhitespace value)
@Nonnull PullRequestDiffRequest.Builder withComments(boolean value)
Specifies whether comments should be provided to the callback when streaming the diff.
Protected Methods
PullRequestDiffRequest.Builder self()
[Expand]
Inherited Methods
From class com.atlassian.stash.pull.AbstractPullRequestRequest.AbstractBuilder
From class com.atlassian.stash.util.BuilderSupport
From class java.lang.Object

Public Constructors

public PullRequestDiffRequest.Builder (PullRequestDiffRequest request)

public PullRequestDiffRequest.Builder (PullRequest pullRequest, String path)

public PullRequestDiffRequest.Builder (int repositoryId, long pullRequestId, String path)

Public Methods

@Nonnull public PullRequestDiffRequest build ()

@Nonnull public PullRequestDiffRequest.Builder contextLines (int value)

Specifies the number of context lines to include around added/removed lines. 0 and positive values are treated as the number of lines to request. Any negative value is treated as a request for the system-configured default number of lines.

When requesting the default number of context lines, it is encouraged to use DEFAULT_CONTEXT_LINES for clarity: contextLines(DiffRequest.DEFAULT_CONTEXT_LINES).

Parameters
value the number of context lines to include around added and removed lines in the diff, which may be DEFAULT_CONTEXT_LINES to use the default number
Returns
  • this

@Nonnull public PullRequestDiffRequest.Builder srcPath (String value)

@Nonnull public PullRequestDiffRequest.Builder whitespace (DiffWhitespace value)

@Nonnull public PullRequestDiffRequest.Builder withComments (boolean value)

Specifies whether comments should be provided to the callback when streaming the diff. When requested, comments are offered by anchor to allow them to be matched to paths and line numbers in the diff as it is streamed.

Parameters
value true to request comments (and their anchors) be provided to the callback when streaming the diff (the default); otherwise, false to omit comments
Returns
  • this

Protected Methods

protected PullRequestDiffRequest.Builder self ()