AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
FilePath.h
1
6#pragma once
7#include <aws/codeguru-security/CodeGuruSecurity_EXPORTS.h>
8#include <aws/codeguru-security/model/CodeLine.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace CodeGuruSecurity {
22namespace Model {
23
30class FilePath {
31 public:
32 AWS_CODEGURUSECURITY_API FilePath() = default;
33 AWS_CODEGURUSECURITY_API FilePath(Aws::Utils::Json::JsonView jsonValue);
34 AWS_CODEGURUSECURITY_API FilePath& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_CODEGURUSECURITY_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::String& GetName() const { return m_name; }
42 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
43 template <typename NameT = Aws::String>
44 void SetName(NameT&& value) {
45 m_nameHasBeenSet = true;
46 m_name = std::forward<NameT>(value);
47 }
48 template <typename NameT = Aws::String>
49 FilePath& WithName(NameT&& value) {
50 SetName(std::forward<NameT>(value));
51 return *this;
52 }
54
56
59 inline const Aws::String& GetPath() const { return m_path; }
60 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
61 template <typename PathT = Aws::String>
62 void SetPath(PathT&& value) {
63 m_pathHasBeenSet = true;
64 m_path = std::forward<PathT>(value);
65 }
66 template <typename PathT = Aws::String>
67 FilePath& WithPath(PathT&& value) {
68 SetPath(std::forward<PathT>(value));
69 return *this;
70 }
72
74
78 inline int GetStartLine() const { return m_startLine; }
79 inline bool StartLineHasBeenSet() const { return m_startLineHasBeenSet; }
80 inline void SetStartLine(int value) {
81 m_startLineHasBeenSet = true;
82 m_startLine = value;
83 }
84 inline FilePath& WithStartLine(int value) {
85 SetStartLine(value);
86 return *this;
87 }
89
91
95 inline int GetEndLine() const { return m_endLine; }
96 inline bool EndLineHasBeenSet() const { return m_endLineHasBeenSet; }
97 inline void SetEndLine(int value) {
98 m_endLineHasBeenSet = true;
99 m_endLine = value;
100 }
101 inline FilePath& WithEndLine(int value) {
102 SetEndLine(value);
103 return *this;
104 }
106
108
112 inline const Aws::Vector<CodeLine>& GetCodeSnippet() const { return m_codeSnippet; }
113 inline bool CodeSnippetHasBeenSet() const { return m_codeSnippetHasBeenSet; }
114 template <typename CodeSnippetT = Aws::Vector<CodeLine>>
115 void SetCodeSnippet(CodeSnippetT&& value) {
116 m_codeSnippetHasBeenSet = true;
117 m_codeSnippet = std::forward<CodeSnippetT>(value);
118 }
119 template <typename CodeSnippetT = Aws::Vector<CodeLine>>
120 FilePath& WithCodeSnippet(CodeSnippetT&& value) {
121 SetCodeSnippet(std::forward<CodeSnippetT>(value));
122 return *this;
123 }
124 template <typename CodeSnippetT = CodeLine>
125 FilePath& AddCodeSnippet(CodeSnippetT&& value) {
126 m_codeSnippetHasBeenSet = true;
127 m_codeSnippet.emplace_back(std::forward<CodeSnippetT>(value));
128 return *this;
129 }
131 private:
132 Aws::String m_name;
133
134 Aws::String m_path;
135
136 int m_startLine{0};
137
138 int m_endLine{0};
139
140 Aws::Vector<CodeLine> m_codeSnippet;
141 bool m_nameHasBeenSet = false;
142 bool m_pathHasBeenSet = false;
143 bool m_startLineHasBeenSet = false;
144 bool m_endLineHasBeenSet = false;
145 bool m_codeSnippetHasBeenSet = false;
146};
147
148} // namespace Model
149} // namespace CodeGuruSecurity
150} // namespace Aws
AWS_CODEGURUSECURITY_API FilePath & operator=(Aws::Utils::Json::JsonView jsonValue)
FilePath & WithStartLine(int value)
Definition FilePath.h:84
AWS_CODEGURUSECURITY_API FilePath()=default
FilePath & AddCodeSnippet(CodeSnippetT &&value)
Definition FilePath.h:125
AWS_CODEGURUSECURITY_API FilePath(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetName() const
Definition FilePath.h:41
FilePath & WithEndLine(int value)
Definition FilePath.h:101
const Aws::Vector< CodeLine > & GetCodeSnippet() const
Definition FilePath.h:112
void SetCodeSnippet(CodeSnippetT &&value)
Definition FilePath.h:115
FilePath & WithName(NameT &&value)
Definition FilePath.h:49
FilePath & WithPath(PathT &&value)
Definition FilePath.h:67
const Aws::String & GetPath() const
Definition FilePath.h:59
AWS_CODEGURUSECURITY_API Aws::Utils::Json::JsonValue Jsonize() const
FilePath & WithCodeSnippet(CodeSnippetT &&value)
Definition FilePath.h:120
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue