public static class PullRequestDiffRequest.Builder extends AbstractPullRequestRequest.AbstractBuilder<PullRequestDiffRequest.Builder>
NOT_BLANK
Constructor and Description |
---|
Builder(int repositoryId,
long pullRequestId,
String path) |
Builder(PullRequestDiffRequest request) |
Builder(PullRequest pullRequest,
String path) |
Modifier and Type | Method and Description |
---|---|
PullRequestDiffRequest |
build() |
PullRequestDiffRequest.Builder |
contextLines(int value)
Specifies the number of context lines to include around added/removed lines.
|
PullRequestDiffRequest.Builder |
diffType(CommentThreadDiffAnchorType value) |
PullRequestDiffRequest.Builder |
filter(DiffContentFilter value) |
protected PullRequestDiffRequest.Builder |
self() |
PullRequestDiffRequest.Builder |
sinceId(String value) |
PullRequestDiffRequest.Builder |
srcPath(String value) |
PullRequestDiffRequest.Builder |
untilId(String value) |
PullRequestDiffRequest.Builder |
whitespace(DiffWhitespace value) |
PullRequestDiffRequest.Builder |
withComments(boolean value)
Specifies whether comments should be provided to the callback when streaming the diff.
|
addIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlank
public Builder(@Nonnull PullRequestDiffRequest request)
public Builder(@Nonnull PullRequest pullRequest, @Nullable String path)
@Nonnull public PullRequestDiffRequest build()
@Nonnull public PullRequestDiffRequest.Builder contextLines(int value)
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)
.
value
- the number of context lines to include around added and removed lines in the diff, which may
be PullRequestDiffRequest.DEFAULT_CONTEXT_LINES
to use the default numberthis
@Nonnull public PullRequestDiffRequest.Builder diffType(@Nullable CommentThreadDiffAnchorType value)
value
- the new comment thread diff anchor typethis
@Nonnull public PullRequestDiffRequest.Builder filter(@Nullable DiffContentFilter value)
@Nonnull public PullRequestDiffRequest.Builder sinceId(@Nullable String value)
value
- the since IDthis
@Nonnull public PullRequestDiffRequest.Builder srcPath(@Nullable String value)
@Nonnull public PullRequestDiffRequest.Builder untilId(@Nonnull String value)
value
- the new until IDthis
@Nonnull public PullRequestDiffRequest.Builder whitespace(@Nonnull DiffWhitespace value)
@Nonnull public PullRequestDiffRequest.Builder withComments(boolean value)
offered by thread
to allow them
to be matched to paths and line numbers in the diff as it is streamed.value
- true
to request comments (and their threads) be provided to the callback when streaming
the diff (the default); otherwise, false
to omit commentsthis
@Nonnull protected PullRequestDiffRequest.Builder self()
self
in class AbstractPullRequestRequest.AbstractBuilder<PullRequestDiffRequest.Builder>
Copyright © 2022 Atlassian. All rights reserved.