Class SingleAddInsightAnnotationRequest.Builder
java.lang.Object
com.atlassian.bitbucket.util.BuilderSupport
com.atlassian.bitbucket.codeinsights.AbstractInsightsBuilder
com.atlassian.bitbucket.codeinsights.annotation.SingleAddInsightAnnotationRequest.Builder
- Enclosing class:
- SingleAddInsightAnnotationRequest
-
Field Summary
Fields inherited from class com.atlassian.bitbucket.util.BuilderSupport
NOT_BLANK
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new builder to create a new annotation.Builder
(InsightAnnotation annotation) Create a new builder to create a new annotation, setting all fields to the values of the given annotationCreate a new builder to create a new annotation. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
externalId
(String value) Id in the external system.line
(int value) Set the line for this annotationDeep-link to the annotation in the application that produced it.Set the message for this annotationSet the path for this annotation.severity
(AnnotationSeverity value) Set the severity for this annotation.type
(AnnotationType value) Set the type for this annotationMethods inherited from class com.atlassian.bitbucket.codeinsights.AbstractInsightsBuilder
validate
Methods inherited from class com.atlassian.bitbucket.util.BuilderSupport
addIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlank
-
Constructor Details
-
Builder
Create a new builder to create a new annotation. By default the annotation will be created with a LOW severity.- Parameters:
line
- line in the file that this annotation applies to. Must be a value greater or equal to 0. A value of 0 indicates it is a file level annotation.message
- message for the annotationpath
- relative path to the file for this this annotation applies. A blank path indicates it is a commit-level annotation.- Since:
- 5.15
-
Builder
Create a new builder to create a new annotation. By default the annotation will be created with a LOW severity, a line of 0 and a blank path.- Parameters:
message
- message for the annotation- Since:
- 6.7
-
Builder
Create a new builder to create a new annotation, setting all fields to the values of the given annotation- Parameters:
annotation
- The annotation to create
-
-
Method Details
-
build
-
externalId
Id in the external system. This is optional but if present allows for easy update/delete operations of the annotation.- Parameters:
value
- external id- Returns:
- the builder
-
line
Set the line for this annotation- Parameters:
value
- the new line- Returns:
- the builder
-
link
Deep-link to the annotation in the application that produced it.- Parameters:
value
- full link to the remote tool- Returns:
- the builder
-
message
Set the message for this annotation- Parameters:
value
- the new message- Returns:
- the builder
-
path
Set the path for this annotation.- Parameters:
value
- the new path- Returns:
- the builder
-
severity
@Nonnull public SingleAddInsightAnnotationRequest.Builder severity(@Nonnull AnnotationSeverity value) Set the severity for this annotation.- Parameters:
value
- the new severity- Returns:
- the builder
-
type
Set the type for this annotation- Parameters:
value
- the new type- Returns:
- the builder
-