public static final class

SingleAddInsightAnnotationRequest.Builder

extends AbstractInsightsBuilder
java.lang.Object
   ↳ com.atlassian.bitbucket.util.BuilderSupport
     ↳ com.atlassian.bitbucket.codeinsights.AbstractInsightsBuilder
       ↳ com.atlassian.bitbucket.codeinsights.annotation.SingleAddInsightAnnotationRequest.Builder

Summary

[Expand]
Inherited Fields
From class com.atlassian.bitbucket.util.BuilderSupport
Public Constructors
Builder(int line, String message, String path)
Create 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 annotation
Public Methods
SingleAddInsightAnnotationRequest build()
@Nonnull SingleAddInsightAnnotationRequest.Builder externalId(String value)
Id in the external system.
@Nonnull SingleAddInsightAnnotationRequest.Builder line(int value)
Set the line for this annotation
@Nonnull SingleAddInsightAnnotationRequest.Builder link(URI value)
Deep-link to the annotation in the application that produced it.
@Nonnull SingleAddInsightAnnotationRequest.Builder message(String value)
Set the message for this annotation
@Nonnull SingleAddInsightAnnotationRequest.Builder path(String value)
Set the path for this annotation.
@Nonnull SingleAddInsightAnnotationRequest.Builder severity(AnnotationSeverity value)
Set the severity for this annotation.
@Nonnull SingleAddInsightAnnotationRequest.Builder type(AnnotationType value)
Set the type for this annotation
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.codeinsights.AbstractInsightsBuilder
From class com.atlassian.bitbucket.util.BuilderSupport
From class java.lang.Object

Public Constructors

public Builder (int line, String message, String path)

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 annotation
path relative path to the file for this this annotation applies

public Builder (InsightAnnotation annotation)

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

Public Methods

@Nonnull public SingleAddInsightAnnotationRequest.Builder externalId (String value)

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

@Nonnull public SingleAddInsightAnnotationRequest.Builder line (int value)

Set the line for this annotation

Parameters
value the new line
Returns
  • the builder

@Nonnull public SingleAddInsightAnnotationRequest.Builder link (URI value)

Deep-link to the annotation in the application that produced it.

Parameters
value full link to the remote tool
Returns
  • the builder

@Nonnull public SingleAddInsightAnnotationRequest.Builder message (String value)

Set the message for this annotation

Parameters
value the new message
Returns
  • the builder

@Nonnull public SingleAddInsightAnnotationRequest.Builder path (String value)

Set the path for this annotation.

Parameters
value the new path
Returns
  • the builder

@Nonnull public SingleAddInsightAnnotationRequest.Builder severity (AnnotationSeverity value)

Set the severity for this annotation.

Parameters
value the new severity
Returns
  • the builder

@Nonnull public SingleAddInsightAnnotationRequest.Builder type (AnnotationType value)

Set the type for this annotation

Parameters
value the new type
Returns
  • the builder