AWS SDK for C++

AWS SDK for C++ Version 1.11.844

Loading...
Searching...
No Matches
Resource.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/securityhub/SecurityHub_EXPORTS.h>
10#include <aws/securityhub/model/CloudProviderName.h>
11#include <aws/securityhub/model/DataClassificationDetails.h>
12#include <aws/securityhub/model/Partition.h>
13#include <aws/securityhub/model/ResourceDetails.h>
14#include <aws/securityhub/model/ResourceOwner.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace SecurityHub {
26namespace Model {
27
33class Resource {
34 public:
35 AWS_SECURITYHUB_API Resource() = default;
36 AWS_SECURITYHUB_API Resource(Aws::Utils::Json::JsonView jsonValue);
37 AWS_SECURITYHUB_API Resource& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
49 inline const Aws::String& GetType() const { return m_type; }
50 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
51 template <typename TypeT = Aws::String>
52 void SetType(TypeT&& value) {
53 m_typeHasBeenSet = true;
54 m_type = std::forward<TypeT>(value);
55 }
56 template <typename TypeT = Aws::String>
57 Resource& WithType(TypeT&& value) {
58 SetType(std::forward<TypeT>(value));
59 return *this;
60 }
62
64
67 inline const Aws::String& GetId() const { return m_id; }
68 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
69 template <typename IdT = Aws::String>
70 void SetId(IdT&& value) {
71 m_idHasBeenSet = true;
72 m_id = std::forward<IdT>(value);
73 }
74 template <typename IdT = Aws::String>
75 Resource& WithId(IdT&& value) {
76 SetId(std::forward<IdT>(value));
77 return *this;
78 }
80
82
86 inline Partition GetPartition() const { return m_partition; }
87 inline bool PartitionHasBeenSet() const { return m_partitionHasBeenSet; }
88 inline void SetPartition(Partition value) {
89 m_partitionHasBeenSet = true;
90 m_partition = value;
91 }
93 SetPartition(value);
94 return *this;
95 }
97
99
104 inline const Aws::String& GetRegion() const { return m_region; }
105 inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
106 template <typename RegionT = Aws::String>
107 void SetRegion(RegionT&& value) {
108 m_regionHasBeenSet = true;
109 m_region = std::forward<RegionT>(value);
110 }
111 template <typename RegionT = Aws::String>
112 Resource& WithRegion(RegionT&& value) {
113 SetRegion(std::forward<RegionT>(value));
114 return *this;
115 }
117
119
123 inline CloudProviderName GetProvider() const { return m_provider; }
124 inline bool ProviderHasBeenSet() const { return m_providerHasBeenSet; }
125 inline void SetProvider(CloudProviderName value) {
126 m_providerHasBeenSet = true;
127 m_provider = value;
128 }
130 SetProvider(value);
131 return *this;
132 }
134
136
139 inline const ResourceOwner& GetOwner() const { return m_owner; }
140 inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; }
141 template <typename OwnerT = ResourceOwner>
142 void SetOwner(OwnerT&& value) {
143 m_ownerHasBeenSet = true;
144 m_owner = std::forward<OwnerT>(value);
145 }
146 template <typename OwnerT = ResourceOwner>
147 Resource& WithOwner(OwnerT&& value) {
148 SetOwner(std::forward<OwnerT>(value));
149 return *this;
150 }
152
154
158 inline const Aws::String& GetResourceRole() const { return m_resourceRole; }
159 inline bool ResourceRoleHasBeenSet() const { return m_resourceRoleHasBeenSet; }
160 template <typename ResourceRoleT = Aws::String>
161 void SetResourceRole(ResourceRoleT&& value) {
162 m_resourceRoleHasBeenSet = true;
163 m_resourceRole = std::forward<ResourceRoleT>(value);
164 }
165 template <typename ResourceRoleT = Aws::String>
166 Resource& WithResourceRole(ResourceRoleT&& value) {
167 SetResourceRole(std::forward<ResourceRoleT>(value));
168 return *this;
169 }
171
173
179 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
180 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
181 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
182 void SetTags(TagsT&& value) {
183 m_tagsHasBeenSet = true;
184 m_tags = std::forward<TagsT>(value);
185 }
186 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
187 Resource& WithTags(TagsT&& value) {
188 SetTags(std::forward<TagsT>(value));
189 return *this;
190 }
191 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
192 Resource& AddTags(TagsKeyT&& key, TagsValueT&& value) {
193 m_tagsHasBeenSet = true;
194 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
195 return *this;
196 }
198
200
204 inline const DataClassificationDetails& GetDataClassification() const { return m_dataClassification; }
205 inline bool DataClassificationHasBeenSet() const { return m_dataClassificationHasBeenSet; }
206 template <typename DataClassificationT = DataClassificationDetails>
207 void SetDataClassification(DataClassificationT&& value) {
208 m_dataClassificationHasBeenSet = true;
209 m_dataClassification = std::forward<DataClassificationT>(value);
210 }
211 template <typename DataClassificationT = DataClassificationDetails>
212 Resource& WithDataClassification(DataClassificationT&& value) {
213 SetDataClassification(std::forward<DataClassificationT>(value));
214 return *this;
215 }
217
219
222 inline const ResourceDetails& GetDetails() const { return m_details; }
223 inline bool DetailsHasBeenSet() const { return m_detailsHasBeenSet; }
224 template <typename DetailsT = ResourceDetails>
225 void SetDetails(DetailsT&& value) {
226 m_detailsHasBeenSet = true;
227 m_details = std::forward<DetailsT>(value);
228 }
229 template <typename DetailsT = ResourceDetails>
230 Resource& WithDetails(DetailsT&& value) {
231 SetDetails(std::forward<DetailsT>(value));
232 return *this;
233 }
235
237
240 inline const Aws::String& GetApplicationName() const { return m_applicationName; }
241 inline bool ApplicationNameHasBeenSet() const { return m_applicationNameHasBeenSet; }
242 template <typename ApplicationNameT = Aws::String>
243 void SetApplicationName(ApplicationNameT&& value) {
244 m_applicationNameHasBeenSet = true;
245 m_applicationName = std::forward<ApplicationNameT>(value);
246 }
247 template <typename ApplicationNameT = Aws::String>
248 Resource& WithApplicationName(ApplicationNameT&& value) {
249 SetApplicationName(std::forward<ApplicationNameT>(value));
250 return *this;
251 }
253
255
259 inline const Aws::String& GetApplicationArn() const { return m_applicationArn; }
260 inline bool ApplicationArnHasBeenSet() const { return m_applicationArnHasBeenSet; }
261 template <typename ApplicationArnT = Aws::String>
262 void SetApplicationArn(ApplicationArnT&& value) {
263 m_applicationArnHasBeenSet = true;
264 m_applicationArn = std::forward<ApplicationArnT>(value);
265 }
266 template <typename ApplicationArnT = Aws::String>
267 Resource& WithApplicationArn(ApplicationArnT&& value) {
268 SetApplicationArn(std::forward<ApplicationArnT>(value));
269 return *this;
270 }
272 private:
273 Aws::String m_type;
274
275 Aws::String m_id;
276
277 Partition m_partition{Partition::NOT_SET};
278
279 Aws::String m_region;
280
282
283 ResourceOwner m_owner;
284
285 Aws::String m_resourceRole;
286
288
289 DataClassificationDetails m_dataClassification;
290
291 ResourceDetails m_details;
292
293 Aws::String m_applicationName;
294
295 Aws::String m_applicationArn;
296 bool m_typeHasBeenSet = false;
297 bool m_idHasBeenSet = false;
298 bool m_partitionHasBeenSet = false;
299 bool m_regionHasBeenSet = false;
300 bool m_providerHasBeenSet = false;
301 bool m_ownerHasBeenSet = false;
302 bool m_resourceRoleHasBeenSet = false;
303 bool m_tagsHasBeenSet = false;
304 bool m_dataClassificationHasBeenSet = false;
305 bool m_detailsHasBeenSet = false;
306 bool m_applicationNameHasBeenSet = false;
307 bool m_applicationArnHasBeenSet = false;
308};
309
310} // namespace Model
311} // namespace SecurityHub
312} // namespace Aws
Resource & WithType(TypeT &&value)
Definition Resource.h:57
const Aws::String & GetApplicationArn() const
Definition Resource.h:259
Partition GetPartition() const
Definition Resource.h:86
Resource & WithResourceRole(ResourceRoleT &&value)
Definition Resource.h:166
void SetProvider(CloudProviderName value)
Definition Resource.h:125
AWS_SECURITYHUB_API Resource()=default
void SetResourceRole(ResourceRoleT &&value)
Definition Resource.h:161
void SetDetails(DetailsT &&value)
Definition Resource.h:225
Resource & WithApplicationArn(ApplicationArnT &&value)
Definition Resource.h:267
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition Resource.h:179
void SetOwner(OwnerT &&value)
Definition Resource.h:142
Resource & WithId(IdT &&value)
Definition Resource.h:75
void SetDataClassification(DataClassificationT &&value)
Definition Resource.h:207
Resource & AddTags(TagsKeyT &&key, TagsValueT &&value)
Definition Resource.h:192
void SetRegion(RegionT &&value)
Definition Resource.h:107
Resource & WithApplicationName(ApplicationNameT &&value)
Definition Resource.h:248
Resource & WithProvider(CloudProviderName value)
Definition Resource.h:129
Resource & WithTags(TagsT &&value)
Definition Resource.h:187
const DataClassificationDetails & GetDataClassification() const
Definition Resource.h:204
Resource & WithOwner(OwnerT &&value)
Definition Resource.h:147
void SetApplicationName(ApplicationNameT &&value)
Definition Resource.h:243
AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const
const ResourceOwner & GetOwner() const
Definition Resource.h:139
const Aws::String & GetResourceRole() const
Definition Resource.h:158
const Aws::String & GetId() const
Definition Resource.h:67
Resource & WithDataClassification(DataClassificationT &&value)
Definition Resource.h:212
Resource & WithRegion(RegionT &&value)
Definition Resource.h:112
CloudProviderName GetProvider() const
Definition Resource.h:123
const Aws::String & GetApplicationName() const
Definition Resource.h:240
void SetType(TypeT &&value)
Definition Resource.h:52
Resource & WithDetails(DetailsT &&value)
Definition Resource.h:230
void SetTags(TagsT &&value)
Definition Resource.h:182
AWS_SECURITYHUB_API Resource & operator=(Aws::Utils::Json::JsonView jsonValue)
bool DataClassificationHasBeenSet() const
Definition Resource.h:205
const Aws::String & GetType() const
Definition Resource.h:49
AWS_SECURITYHUB_API Resource(Aws::Utils::Json::JsonView jsonValue)
void SetPartition(Partition value)
Definition Resource.h:88
const ResourceDetails & GetDetails() const
Definition Resource.h:222
const Aws::String & GetRegion() const
Definition Resource.h:104
Resource & WithPartition(Partition value)
Definition Resource.h:92
void SetApplicationArn(ApplicationArnT &&value)
Definition Resource.h:262
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue