AWS SDK for C++

AWS SDK for C++ Version 1.11.751

Loading...
Searching...
No Matches
ResourceV2.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/guardduty/GuardDuty_EXPORTS.h>
10#include <aws/guardduty/model/FindingResourceType.h>
11#include <aws/guardduty/model/ResourceData.h>
12#include <aws/guardduty/model/Tag.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace GuardDuty {
24namespace Model {
25
33 public:
34 AWS_GUARDDUTY_API ResourceV2() = default;
35 AWS_GUARDDUTY_API ResourceV2(Aws::Utils::Json::JsonView jsonValue);
36 AWS_GUARDDUTY_API ResourceV2& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_GUARDDUTY_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::String& GetUid() const { return m_uid; }
44 inline bool UidHasBeenSet() const { return m_uidHasBeenSet; }
45 template <typename UidT = Aws::String>
46 void SetUid(UidT&& value) {
47 m_uidHasBeenSet = true;
48 m_uid = std::forward<UidT>(value);
49 }
50 template <typename UidT = Aws::String>
51 ResourceV2& WithUid(UidT&& value) {
52 SetUid(std::forward<UidT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetName() const { return m_name; }
62 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
63 template <typename NameT = Aws::String>
64 void SetName(NameT&& value) {
65 m_nameHasBeenSet = true;
66 m_name = std::forward<NameT>(value);
67 }
68 template <typename NameT = Aws::String>
69 ResourceV2& WithName(NameT&& value) {
70 SetName(std::forward<NameT>(value));
71 return *this;
72 }
74
76
79 inline const Aws::String& GetAccountId() const { return m_accountId; }
80 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
81 template <typename AccountIdT = Aws::String>
82 void SetAccountId(AccountIdT&& value) {
83 m_accountIdHasBeenSet = true;
84 m_accountId = std::forward<AccountIdT>(value);
85 }
86 template <typename AccountIdT = Aws::String>
87 ResourceV2& WithAccountId(AccountIdT&& value) {
88 SetAccountId(std::forward<AccountIdT>(value));
89 return *this;
90 }
92
94
97 inline FindingResourceType GetResourceType() const { return m_resourceType; }
98 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
100 m_resourceTypeHasBeenSet = true;
101 m_resourceType = value;
102 }
104 SetResourceType(value);
105 return *this;
106 }
108
110
113 inline const Aws::String& GetRegion() const { return m_region; }
114 inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
115 template <typename RegionT = Aws::String>
116 void SetRegion(RegionT&& value) {
117 m_regionHasBeenSet = true;
118 m_region = std::forward<RegionT>(value);
119 }
120 template <typename RegionT = Aws::String>
121 ResourceV2& WithRegion(RegionT&& value) {
122 SetRegion(std::forward<RegionT>(value));
123 return *this;
124 }
126
128
131 inline const Aws::String& GetService() const { return m_service; }
132 inline bool ServiceHasBeenSet() const { return m_serviceHasBeenSet; }
133 template <typename ServiceT = Aws::String>
134 void SetService(ServiceT&& value) {
135 m_serviceHasBeenSet = true;
136 m_service = std::forward<ServiceT>(value);
137 }
138 template <typename ServiceT = Aws::String>
139 ResourceV2& WithService(ServiceT&& value) {
140 SetService(std::forward<ServiceT>(value));
141 return *this;
142 }
144
146
150 inline const Aws::String& GetCloudPartition() const { return m_cloudPartition; }
151 inline bool CloudPartitionHasBeenSet() const { return m_cloudPartitionHasBeenSet; }
152 template <typename CloudPartitionT = Aws::String>
153 void SetCloudPartition(CloudPartitionT&& value) {
154 m_cloudPartitionHasBeenSet = true;
155 m_cloudPartition = std::forward<CloudPartitionT>(value);
156 }
157 template <typename CloudPartitionT = Aws::String>
158 ResourceV2& WithCloudPartition(CloudPartitionT&& value) {
159 SetCloudPartition(std::forward<CloudPartitionT>(value));
160 return *this;
161 }
163
165
168 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
169 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
170 template <typename TagsT = Aws::Vector<Tag>>
171 void SetTags(TagsT&& value) {
172 m_tagsHasBeenSet = true;
173 m_tags = std::forward<TagsT>(value);
174 }
175 template <typename TagsT = Aws::Vector<Tag>>
176 ResourceV2& WithTags(TagsT&& value) {
177 SetTags(std::forward<TagsT>(value));
178 return *this;
179 }
180 template <typename TagsT = Tag>
181 ResourceV2& AddTags(TagsT&& value) {
182 m_tagsHasBeenSet = true;
183 m_tags.emplace_back(std::forward<TagsT>(value));
184 return *this;
185 }
187
189
193 inline const ResourceData& GetData() const { return m_data; }
194 inline bool DataHasBeenSet() const { return m_dataHasBeenSet; }
195 template <typename DataT = ResourceData>
196 void SetData(DataT&& value) {
197 m_dataHasBeenSet = true;
198 m_data = std::forward<DataT>(value);
199 }
200 template <typename DataT = ResourceData>
201 ResourceV2& WithData(DataT&& value) {
202 SetData(std::forward<DataT>(value));
203 return *this;
204 }
206 private:
207 Aws::String m_uid;
208
209 Aws::String m_name;
210
211 Aws::String m_accountId;
212
214
215 Aws::String m_region;
216
217 Aws::String m_service;
218
219 Aws::String m_cloudPartition;
220
221 Aws::Vector<Tag> m_tags;
222
223 ResourceData m_data;
224 bool m_uidHasBeenSet = false;
225 bool m_nameHasBeenSet = false;
226 bool m_accountIdHasBeenSet = false;
227 bool m_resourceTypeHasBeenSet = false;
228 bool m_regionHasBeenSet = false;
229 bool m_serviceHasBeenSet = false;
230 bool m_cloudPartitionHasBeenSet = false;
231 bool m_tagsHasBeenSet = false;
232 bool m_dataHasBeenSet = false;
233};
234
235} // namespace Model
236} // namespace GuardDuty
237} // namespace Aws
ResourceV2 & WithName(NameT &&value)
Definition ResourceV2.h:69
ResourceV2 & WithTags(TagsT &&value)
Definition ResourceV2.h:176
const Aws::String & GetUid() const
Definition ResourceV2.h:43
AWS_GUARDDUTY_API Aws::Utils::Json::JsonValue Jsonize() const
ResourceV2 & WithAccountId(AccountIdT &&value)
Definition ResourceV2.h:87
const Aws::Vector< Tag > & GetTags() const
Definition ResourceV2.h:168
AWS_GUARDDUTY_API ResourceV2 & operator=(Aws::Utils::Json::JsonView jsonValue)
ResourceV2 & WithResourceType(FindingResourceType value)
Definition ResourceV2.h:103
void SetCloudPartition(CloudPartitionT &&value)
Definition ResourceV2.h:153
const Aws::String & GetName() const
Definition ResourceV2.h:61
const Aws::String & GetCloudPartition() const
Definition ResourceV2.h:150
ResourceV2 & WithUid(UidT &&value)
Definition ResourceV2.h:51
const Aws::String & GetService() const
Definition ResourceV2.h:131
ResourceV2 & WithService(ServiceT &&value)
Definition ResourceV2.h:139
FindingResourceType GetResourceType() const
Definition ResourceV2.h:97
ResourceV2 & WithCloudPartition(CloudPartitionT &&value)
Definition ResourceV2.h:158
const ResourceData & GetData() const
Definition ResourceV2.h:193
const Aws::String & GetAccountId() const
Definition ResourceV2.h:79
ResourceV2 & WithRegion(RegionT &&value)
Definition ResourceV2.h:121
void SetAccountId(AccountIdT &&value)
Definition ResourceV2.h:82
void SetName(NameT &&value)
Definition ResourceV2.h:64
AWS_GUARDDUTY_API ResourceV2(Aws::Utils::Json::JsonView jsonValue)
ResourceV2 & WithData(DataT &&value)
Definition ResourceV2.h:201
const Aws::String & GetRegion() const
Definition ResourceV2.h:113
ResourceV2 & AddTags(TagsT &&value)
Definition ResourceV2.h:181
void SetService(ServiceT &&value)
Definition ResourceV2.h:134
AWS_GUARDDUTY_API ResourceV2()=default
void SetRegion(RegionT &&value)
Definition ResourceV2.h:116
void SetResourceType(FindingResourceType value)
Definition ResourceV2.h:99
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue