Package com.atlassian.bitbucket.pull
Class PullRequestDiffRequest.Builder
java.lang.Object
com.atlassian.bitbucket.util.BuilderSupport
com.atlassian.bitbucket.pull.AbstractPullRequestRequest.AbstractBuilder<PullRequestDiffRequest.Builder>
com.atlassian.bitbucket.pull.PullRequestDiffRequest.Builder
- Enclosing class:
- PullRequestDiffRequest
public static class PullRequestDiffRequest.Builder
extends AbstractPullRequestRequest.AbstractBuilder<PullRequestDiffRequest.Builder>
-
Field Summary
Fields inherited from class com.atlassian.bitbucket.util.BuilderSupport
NOT_BLANK
-
Constructor Summary
ConstructorDescriptionBuilder
(PullRequestDiffRequest request) Builder
(PullRequest pullRequest, String path) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
contextLines
(int value) Specifies the number of context lines to include around added/removed lines.filter
(DiffContentFilter value) protected PullRequestDiffRequest.Builder
self()
whitespace
(DiffWhitespace value) withComments
(boolean value) Specifies whether comments should be provided to the callback when streaming the diff.Methods inherited from class com.atlassian.bitbucket.util.BuilderSupport
addIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlank
-
Constructor Details
-
Builder
-
Builder
-
Builder
-
-
Method Details
-
build
-
contextLines
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
PullRequestDiffRequest.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 bePullRequestDiffRequest.DEFAULT_CONTEXT_LINES
to use the default number- Returns:
this
-
diffType
@Nonnull public PullRequestDiffRequest.Builder diffType(@Nullable CommentThreadDiffAnchorType value) - Parameters:
value
- the new comment thread diff anchor type- Returns:
this
- Since:
- 5.0
-
filter
-
sinceId
- Parameters:
value
- the since ID- Returns:
this
- Since:
- 5.0
-
srcPath
-
untilId
- Parameters:
value
- the new until ID- Returns:
this
- Since:
- 5.0
-
whitespace
-
withComments
Specifies whether comments should be provided to the callback when streaming the diff. When requested, comments areoffered by thread
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 threads) be provided to the callback when streaming the diff (the default); otherwise,false
to omit comments- Returns:
this
-
self
- Specified by:
self
in classAbstractPullRequestRequest.AbstractBuilder<PullRequestDiffRequest.Builder>
-