/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Inspector2 { namespace Model { /** *

Contains information on a code snippet retrieved by Amazon Inspector from a * code vulnerability finding.

See Also:

AWS * API Reference

*/ class CodeSnippetResult { public: AWS_INSPECTOR2_API CodeSnippetResult(); AWS_INSPECTOR2_API CodeSnippetResult(Aws::Utils::Json::JsonView jsonValue); AWS_INSPECTOR2_API CodeSnippetResult& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Contains information on the retrieved code snippet.

*/ inline const Aws::Vector& GetCodeSnippet() const{ return m_codeSnippet; } /** *

Contains information on the retrieved code snippet.

*/ inline bool CodeSnippetHasBeenSet() const { return m_codeSnippetHasBeenSet; } /** *

Contains information on the retrieved code snippet.

*/ inline void SetCodeSnippet(const Aws::Vector& value) { m_codeSnippetHasBeenSet = true; m_codeSnippet = value; } /** *

Contains information on the retrieved code snippet.

*/ inline void SetCodeSnippet(Aws::Vector&& value) { m_codeSnippetHasBeenSet = true; m_codeSnippet = std::move(value); } /** *

Contains information on the retrieved code snippet.

*/ inline CodeSnippetResult& WithCodeSnippet(const Aws::Vector& value) { SetCodeSnippet(value); return *this;} /** *

Contains information on the retrieved code snippet.

*/ inline CodeSnippetResult& WithCodeSnippet(Aws::Vector&& value) { SetCodeSnippet(std::move(value)); return *this;} /** *

Contains information on the retrieved code snippet.

*/ inline CodeSnippetResult& AddCodeSnippet(const CodeLine& value) { m_codeSnippetHasBeenSet = true; m_codeSnippet.push_back(value); return *this; } /** *

Contains information on the retrieved code snippet.

*/ inline CodeSnippetResult& AddCodeSnippet(CodeLine&& value) { m_codeSnippetHasBeenSet = true; m_codeSnippet.push_back(std::move(value)); return *this; } /** *

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

*/ inline int GetEndLine() const{ return m_endLine; } /** *

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

*/ inline bool EndLineHasBeenSet() const { return m_endLineHasBeenSet; } /** *

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

*/ inline void SetEndLine(int value) { m_endLineHasBeenSet = true; m_endLine = value; } /** *

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

*/ inline CodeSnippetResult& WithEndLine(int value) { SetEndLine(value); return *this;} /** *

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

*/ inline const Aws::String& GetFindingArn() const{ return m_findingArn; } /** *

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

*/ inline bool FindingArnHasBeenSet() const { return m_findingArnHasBeenSet; } /** *

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

*/ inline void SetFindingArn(const Aws::String& value) { m_findingArnHasBeenSet = true; m_findingArn = value; } /** *

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

*/ inline void SetFindingArn(Aws::String&& value) { m_findingArnHasBeenSet = true; m_findingArn = std::move(value); } /** *

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

*/ inline void SetFindingArn(const char* value) { m_findingArnHasBeenSet = true; m_findingArn.assign(value); } /** *

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

*/ inline CodeSnippetResult& WithFindingArn(const Aws::String& value) { SetFindingArn(value); return *this;} /** *

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

*/ inline CodeSnippetResult& WithFindingArn(Aws::String&& value) { SetFindingArn(std::move(value)); return *this;} /** *

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

*/ inline CodeSnippetResult& WithFindingArn(const char* value) { SetFindingArn(value); return *this;} /** *

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

*/ inline int GetStartLine() const{ return m_startLine; } /** *

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

*/ inline bool StartLineHasBeenSet() const { return m_startLineHasBeenSet; } /** *

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

*/ inline void SetStartLine(int value) { m_startLineHasBeenSet = true; m_startLine = value; } /** *

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

*/ inline CodeSnippetResult& WithStartLine(int value) { SetStartLine(value); return *this;} /** *

Details of a suggested code fix.

*/ inline const Aws::Vector& GetSuggestedFixes() const{ return m_suggestedFixes; } /** *

Details of a suggested code fix.

*/ inline bool SuggestedFixesHasBeenSet() const { return m_suggestedFixesHasBeenSet; } /** *

Details of a suggested code fix.

*/ inline void SetSuggestedFixes(const Aws::Vector& value) { m_suggestedFixesHasBeenSet = true; m_suggestedFixes = value; } /** *

Details of a suggested code fix.

*/ inline void SetSuggestedFixes(Aws::Vector&& value) { m_suggestedFixesHasBeenSet = true; m_suggestedFixes = std::move(value); } /** *

Details of a suggested code fix.

*/ inline CodeSnippetResult& WithSuggestedFixes(const Aws::Vector& value) { SetSuggestedFixes(value); return *this;} /** *

Details of a suggested code fix.

*/ inline CodeSnippetResult& WithSuggestedFixes(Aws::Vector&& value) { SetSuggestedFixes(std::move(value)); return *this;} /** *

Details of a suggested code fix.

*/ inline CodeSnippetResult& AddSuggestedFixes(const SuggestedFix& value) { m_suggestedFixesHasBeenSet = true; m_suggestedFixes.push_back(value); return *this; } /** *

Details of a suggested code fix.

*/ inline CodeSnippetResult& AddSuggestedFixes(SuggestedFix&& value) { m_suggestedFixesHasBeenSet = true; m_suggestedFixes.push_back(std::move(value)); return *this; } private: Aws::Vector m_codeSnippet; bool m_codeSnippetHasBeenSet = false; int m_endLine; bool m_endLineHasBeenSet = false; Aws::String m_findingArn; bool m_findingArnHasBeenSet = false; int m_startLine; bool m_startLineHasBeenSet = false; Aws::Vector m_suggestedFixes; bool m_suggestedFixesHasBeenSet = false; }; } // namespace Model } // namespace Inspector2 } // namespace Aws