Interface CodeSnippetResult.Builder

    • Method Detail

      • codeSnippet

        CodeSnippetResult.Builder codeSnippet​(Collection<CodeLine> codeSnippet)

        Contains information on the retrieved code snippet.

        Parameters:
        codeSnippet - Contains information on the retrieved code snippet.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • codeSnippet

        CodeSnippetResult.Builder codeSnippet​(CodeLine... codeSnippet)

        Contains information on the retrieved code snippet.

        Parameters:
        codeSnippet - Contains information on the retrieved code snippet.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • codeSnippet

        CodeSnippetResult.Builder codeSnippet​(Consumer<CodeLine.Builder>... codeSnippet)

        Contains information on the retrieved code snippet.

        This is a convenience method that creates an instance of the CodeLine.Builder avoiding the need to create one manually via CodeLine.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #codeSnippet(List).

        Parameters:
        codeSnippet - a consumer that will call methods on CodeLine.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #codeSnippet(java.util.Collection)
      • endLine

        CodeSnippetResult.Builder endLine​(Integer endLine)

        The line number of the last line of a code snippet.

        Parameters:
        endLine - The line number of the last line of a code snippet.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • findingArn

        CodeSnippetResult.Builder findingArn​(String findingArn)

        The ARN of a finding that the code snippet is associated with.

        Parameters:
        findingArn - The ARN of a finding that the code snippet is associated with.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • startLine

        CodeSnippetResult.Builder startLine​(Integer startLine)

        The line number of the first line of a code snippet.

        Parameters:
        startLine - The line number of the first line of a code snippet.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • suggestedFixes

        CodeSnippetResult.Builder suggestedFixes​(Collection<SuggestedFix> suggestedFixes)

        Details of a suggested code fix.

        Parameters:
        suggestedFixes - Details of a suggested code fix.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • suggestedFixes

        CodeSnippetResult.Builder suggestedFixes​(SuggestedFix... suggestedFixes)

        Details of a suggested code fix.

        Parameters:
        suggestedFixes - Details of a suggested code fix.
        Returns:
        Returns a reference to this object so that method calls can be chained together.