Class BulkAddInsightAnnotationRequest.Builder
java.lang.Object
com.atlassian.bitbucket.util.BuilderSupport
com.atlassian.bitbucket.codeinsights.annotation.BulkAddInsightAnnotationRequest.Builder
- Enclosing class:
- BulkAddInsightAnnotationRequest
public static final class BulkAddInsightAnnotationRequest.Builder
extends com.atlassian.bitbucket.util.BuilderSupport
-
Field Summary
Fields inherited from class com.atlassian.bitbucket.util.BuilderSupport
NOT_BLANK -
Constructor Summary
ConstructorsConstructorDescriptionBuilder(InsightReport report) Construct a builder to add annotations to a report. -
Method Summary
Modifier and TypeMethodDescriptionAdd a single annotation to the existing collection of annotations.Add annotation requests to be stored with the report.build()Build the request.Methods inherited from class com.atlassian.bitbucket.util.BuilderSupport
addIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlank
-
Constructor Details
-
Builder
Construct a builder to add annotations to a report.- Parameters:
report- report to which the annotations belong.
-
-
Method Details
-
annotationRequest
@Nonnull public BulkAddInsightAnnotationRequest.Builder annotationRequest(@Nonnull SingleAddInsightAnnotationRequest value) Add a single annotation to the existing collection of annotations.- Parameters:
value- annotation to add- Returns:
- the builder
-
annotationRequests
@Nonnull public BulkAddInsightAnnotationRequest.Builder annotationRequests(@Nullable Iterable<SingleAddInsightAnnotationRequest> values) Add annotation requests to be stored with the report.- Parameters:
values- annotations to be stored- Returns:
- the builder
-
build
Build the request.- Returns:
- the newly constructed request
- Throws:
IllegalArgumentException- if duplicate external ids are present in the collection of AnnotationRequests
-