AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
CodeSnippetResult.h
1
6#pragma once
7#include <aws/inspector2/Inspector2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/inspector2/model/CodeLine.h>
11#include <aws/inspector2/model/SuggestedFix.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace Inspector2
25{
26namespace Model
27{
28
36 {
37 public:
38 AWS_INSPECTOR2_API CodeSnippetResult();
39 AWS_INSPECTOR2_API CodeSnippetResult(Aws::Utils::Json::JsonView jsonValue);
41 AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
48 inline const Aws::Vector<CodeLine>& GetCodeSnippet() const{ return m_codeSnippet; }
49 inline bool CodeSnippetHasBeenSet() const { return m_codeSnippetHasBeenSet; }
50 inline void SetCodeSnippet(const Aws::Vector<CodeLine>& value) { m_codeSnippetHasBeenSet = true; m_codeSnippet = value; }
51 inline void SetCodeSnippet(Aws::Vector<CodeLine>&& value) { m_codeSnippetHasBeenSet = true; m_codeSnippet = std::move(value); }
52 inline CodeSnippetResult& WithCodeSnippet(const Aws::Vector<CodeLine>& value) { SetCodeSnippet(value); return *this;}
53 inline CodeSnippetResult& WithCodeSnippet(Aws::Vector<CodeLine>&& value) { SetCodeSnippet(std::move(value)); return *this;}
54 inline CodeSnippetResult& AddCodeSnippet(const CodeLine& value) { m_codeSnippetHasBeenSet = true; m_codeSnippet.push_back(value); return *this; }
55 inline CodeSnippetResult& AddCodeSnippet(CodeLine&& value) { m_codeSnippetHasBeenSet = true; m_codeSnippet.push_back(std::move(value)); return *this; }
57
59
62 inline int GetEndLine() const{ return m_endLine; }
63 inline bool EndLineHasBeenSet() const { return m_endLineHasBeenSet; }
64 inline void SetEndLine(int value) { m_endLineHasBeenSet = true; m_endLine = value; }
65 inline CodeSnippetResult& WithEndLine(int value) { SetEndLine(value); return *this;}
67
69
72 inline const Aws::String& GetFindingArn() const{ return m_findingArn; }
73 inline bool FindingArnHasBeenSet() const { return m_findingArnHasBeenSet; }
74 inline void SetFindingArn(const Aws::String& value) { m_findingArnHasBeenSet = true; m_findingArn = value; }
75 inline void SetFindingArn(Aws::String&& value) { m_findingArnHasBeenSet = true; m_findingArn = std::move(value); }
76 inline void SetFindingArn(const char* value) { m_findingArnHasBeenSet = true; m_findingArn.assign(value); }
77 inline CodeSnippetResult& WithFindingArn(const Aws::String& value) { SetFindingArn(value); return *this;}
78 inline CodeSnippetResult& WithFindingArn(Aws::String&& value) { SetFindingArn(std::move(value)); return *this;}
79 inline CodeSnippetResult& WithFindingArn(const char* value) { SetFindingArn(value); return *this;}
81
83
86 inline int GetStartLine() const{ return m_startLine; }
87 inline bool StartLineHasBeenSet() const { return m_startLineHasBeenSet; }
88 inline void SetStartLine(int value) { m_startLineHasBeenSet = true; m_startLine = value; }
89 inline CodeSnippetResult& WithStartLine(int value) { SetStartLine(value); return *this;}
91
93
96 inline const Aws::Vector<SuggestedFix>& GetSuggestedFixes() const{ return m_suggestedFixes; }
97 inline bool SuggestedFixesHasBeenSet() const { return m_suggestedFixesHasBeenSet; }
98 inline void SetSuggestedFixes(const Aws::Vector<SuggestedFix>& value) { m_suggestedFixesHasBeenSet = true; m_suggestedFixes = value; }
99 inline void SetSuggestedFixes(Aws::Vector<SuggestedFix>&& value) { m_suggestedFixesHasBeenSet = true; m_suggestedFixes = std::move(value); }
101 inline CodeSnippetResult& WithSuggestedFixes(Aws::Vector<SuggestedFix>&& value) { SetSuggestedFixes(std::move(value)); return *this;}
102 inline CodeSnippetResult& AddSuggestedFixes(const SuggestedFix& value) { m_suggestedFixesHasBeenSet = true; m_suggestedFixes.push_back(value); return *this; }
103 inline CodeSnippetResult& AddSuggestedFixes(SuggestedFix&& value) { m_suggestedFixesHasBeenSet = true; m_suggestedFixes.push_back(std::move(value)); return *this; }
105 private:
106
107 Aws::Vector<CodeLine> m_codeSnippet;
108 bool m_codeSnippetHasBeenSet = false;
109
110 int m_endLine;
111 bool m_endLineHasBeenSet = false;
112
113 Aws::String m_findingArn;
114 bool m_findingArnHasBeenSet = false;
115
116 int m_startLine;
117 bool m_startLineHasBeenSet = false;
118
119 Aws::Vector<SuggestedFix> m_suggestedFixes;
120 bool m_suggestedFixesHasBeenSet = false;
121 };
122
123} // namespace Model
124} // namespace Inspector2
125} // namespace Aws
AWS_INSPECTOR2_API CodeSnippetResult(Aws::Utils::Json::JsonView jsonValue)
CodeSnippetResult & WithStartLine(int value)
CodeSnippetResult & WithCodeSnippet(const Aws::Vector< CodeLine > &value)
void SetCodeSnippet(const Aws::Vector< CodeLine > &value)
CodeSnippetResult & WithEndLine(int value)
CodeSnippetResult & WithFindingArn(const char *value)
CodeSnippetResult & AddSuggestedFixes(const SuggestedFix &value)
void SetFindingArn(const Aws::String &value)
void SetSuggestedFixes(Aws::Vector< SuggestedFix > &&value)
CodeSnippetResult & AddCodeSnippet(CodeLine &&value)
CodeSnippetResult & WithCodeSnippet(Aws::Vector< CodeLine > &&value)
const Aws::String & GetFindingArn() const
CodeSnippetResult & WithFindingArn(const Aws::String &value)
AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const
void SetCodeSnippet(Aws::Vector< CodeLine > &&value)
CodeSnippetResult & AddSuggestedFixes(SuggestedFix &&value)
const Aws::Vector< SuggestedFix > & GetSuggestedFixes() const
CodeSnippetResult & AddCodeSnippet(const CodeLine &value)
CodeSnippetResult & WithFindingArn(Aws::String &&value)
void SetSuggestedFixes(const Aws::Vector< SuggestedFix > &value)
const Aws::Vector< CodeLine > & GetCodeSnippet() const
AWS_INSPECTOR2_API CodeSnippetResult & operator=(Aws::Utils::Json::JsonView jsonValue)
CodeSnippetResult & WithSuggestedFixes(const Aws::Vector< SuggestedFix > &value)
CodeSnippetResult & WithSuggestedFixes(Aws::Vector< SuggestedFix > &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue