AWS SDK for C++

AWS SDK for C++ Version 1.11.718

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/DataClassificationDetails.h>
11#include <aws/securityhub/model/Partition.h>
12#include <aws/securityhub/model/ResourceDetails.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace SecurityHub {
24namespace Model {
25
31class Resource {
32 public:
33 AWS_SECURITYHUB_API Resource() = default;
34 AWS_SECURITYHUB_API Resource(Aws::Utils::Json::JsonView jsonValue);
35 AWS_SECURITYHUB_API Resource& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
47 inline const Aws::String& GetType() const { return m_type; }
48 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
49 template <typename TypeT = Aws::String>
50 void SetType(TypeT&& value) {
51 m_typeHasBeenSet = true;
52 m_type = std::forward<TypeT>(value);
53 }
54 template <typename TypeT = Aws::String>
55 Resource& WithType(TypeT&& value) {
56 SetType(std::forward<TypeT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::String& GetId() const { return m_id; }
66 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
67 template <typename IdT = Aws::String>
68 void SetId(IdT&& value) {
69 m_idHasBeenSet = true;
70 m_id = std::forward<IdT>(value);
71 }
72 template <typename IdT = Aws::String>
73 Resource& WithId(IdT&& value) {
74 SetId(std::forward<IdT>(value));
75 return *this;
76 }
78
80
84 inline Partition GetPartition() const { return m_partition; }
85 inline bool PartitionHasBeenSet() const { return m_partitionHasBeenSet; }
86 inline void SetPartition(Partition value) {
87 m_partitionHasBeenSet = true;
88 m_partition = value;
89 }
91 SetPartition(value);
92 return *this;
93 }
95
97
102 inline const Aws::String& GetRegion() const { return m_region; }
103 inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
104 template <typename RegionT = Aws::String>
105 void SetRegion(RegionT&& value) {
106 m_regionHasBeenSet = true;
107 m_region = std::forward<RegionT>(value);
108 }
109 template <typename RegionT = Aws::String>
110 Resource& WithRegion(RegionT&& value) {
111 SetRegion(std::forward<RegionT>(value));
112 return *this;
113 }
115
117
121 inline const Aws::String& GetResourceRole() const { return m_resourceRole; }
122 inline bool ResourceRoleHasBeenSet() const { return m_resourceRoleHasBeenSet; }
123 template <typename ResourceRoleT = Aws::String>
124 void SetResourceRole(ResourceRoleT&& value) {
125 m_resourceRoleHasBeenSet = true;
126 m_resourceRole = std::forward<ResourceRoleT>(value);
127 }
128 template <typename ResourceRoleT = Aws::String>
129 Resource& WithResourceRole(ResourceRoleT&& value) {
130 SetResourceRole(std::forward<ResourceRoleT>(value));
131 return *this;
132 }
134
136
142 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
143 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
144 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
145 void SetTags(TagsT&& value) {
146 m_tagsHasBeenSet = true;
147 m_tags = std::forward<TagsT>(value);
148 }
149 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
150 Resource& WithTags(TagsT&& value) {
151 SetTags(std::forward<TagsT>(value));
152 return *this;
153 }
154 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
155 Resource& AddTags(TagsKeyT&& key, TagsValueT&& value) {
156 m_tagsHasBeenSet = true;
157 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
158 return *this;
159 }
161
163
167 inline const DataClassificationDetails& GetDataClassification() const { return m_dataClassification; }
168 inline bool DataClassificationHasBeenSet() const { return m_dataClassificationHasBeenSet; }
169 template <typename DataClassificationT = DataClassificationDetails>
170 void SetDataClassification(DataClassificationT&& value) {
171 m_dataClassificationHasBeenSet = true;
172 m_dataClassification = std::forward<DataClassificationT>(value);
173 }
174 template <typename DataClassificationT = DataClassificationDetails>
175 Resource& WithDataClassification(DataClassificationT&& value) {
176 SetDataClassification(std::forward<DataClassificationT>(value));
177 return *this;
178 }
180
182
185 inline const ResourceDetails& GetDetails() const { return m_details; }
186 inline bool DetailsHasBeenSet() const { return m_detailsHasBeenSet; }
187 template <typename DetailsT = ResourceDetails>
188 void SetDetails(DetailsT&& value) {
189 m_detailsHasBeenSet = true;
190 m_details = std::forward<DetailsT>(value);
191 }
192 template <typename DetailsT = ResourceDetails>
193 Resource& WithDetails(DetailsT&& value) {
194 SetDetails(std::forward<DetailsT>(value));
195 return *this;
196 }
198
200
203 inline const Aws::String& GetApplicationName() const { return m_applicationName; }
204 inline bool ApplicationNameHasBeenSet() const { return m_applicationNameHasBeenSet; }
205 template <typename ApplicationNameT = Aws::String>
206 void SetApplicationName(ApplicationNameT&& value) {
207 m_applicationNameHasBeenSet = true;
208 m_applicationName = std::forward<ApplicationNameT>(value);
209 }
210 template <typename ApplicationNameT = Aws::String>
211 Resource& WithApplicationName(ApplicationNameT&& value) {
212 SetApplicationName(std::forward<ApplicationNameT>(value));
213 return *this;
214 }
216
218
222 inline const Aws::String& GetApplicationArn() const { return m_applicationArn; }
223 inline bool ApplicationArnHasBeenSet() const { return m_applicationArnHasBeenSet; }
224 template <typename ApplicationArnT = Aws::String>
225 void SetApplicationArn(ApplicationArnT&& value) {
226 m_applicationArnHasBeenSet = true;
227 m_applicationArn = std::forward<ApplicationArnT>(value);
228 }
229 template <typename ApplicationArnT = Aws::String>
230 Resource& WithApplicationArn(ApplicationArnT&& value) {
231 SetApplicationArn(std::forward<ApplicationArnT>(value));
232 return *this;
233 }
235 private:
236 Aws::String m_type;
237
238 Aws::String m_id;
239
240 Partition m_partition{Partition::NOT_SET};
241
242 Aws::String m_region;
243
244 Aws::String m_resourceRole;
245
247
248 DataClassificationDetails m_dataClassification;
249
250 ResourceDetails m_details;
251
252 Aws::String m_applicationName;
253
254 Aws::String m_applicationArn;
255 bool m_typeHasBeenSet = false;
256 bool m_idHasBeenSet = false;
257 bool m_partitionHasBeenSet = false;
258 bool m_regionHasBeenSet = false;
259 bool m_resourceRoleHasBeenSet = false;
260 bool m_tagsHasBeenSet = false;
261 bool m_dataClassificationHasBeenSet = false;
262 bool m_detailsHasBeenSet = false;
263 bool m_applicationNameHasBeenSet = false;
264 bool m_applicationArnHasBeenSet = false;
265};
266
267} // namespace Model
268} // namespace SecurityHub
269} // namespace Aws
Resource & WithType(TypeT &&value)
Definition Resource.h:55
const Aws::String & GetApplicationArn() const
Definition Resource.h:222
Partition GetPartition() const
Definition Resource.h:84
Resource & WithResourceRole(ResourceRoleT &&value)
Definition Resource.h:129
AWS_SECURITYHUB_API Resource()=default
void SetResourceRole(ResourceRoleT &&value)
Definition Resource.h:124
void SetDetails(DetailsT &&value)
Definition Resource.h:188
Resource & WithApplicationArn(ApplicationArnT &&value)
Definition Resource.h:230
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition Resource.h:142
Resource & WithId(IdT &&value)
Definition Resource.h:73
void SetDataClassification(DataClassificationT &&value)
Definition Resource.h:170
Resource & AddTags(TagsKeyT &&key, TagsValueT &&value)
Definition Resource.h:155
void SetRegion(RegionT &&value)
Definition Resource.h:105
Resource & WithApplicationName(ApplicationNameT &&value)
Definition Resource.h:211
Resource & WithTags(TagsT &&value)
Definition Resource.h:150
const DataClassificationDetails & GetDataClassification() const
Definition Resource.h:167
void SetApplicationName(ApplicationNameT &&value)
Definition Resource.h:206
AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetResourceRole() const
Definition Resource.h:121
const Aws::String & GetId() const
Definition Resource.h:65
Resource & WithDataClassification(DataClassificationT &&value)
Definition Resource.h:175
Resource & WithRegion(RegionT &&value)
Definition Resource.h:110
const Aws::String & GetApplicationName() const
Definition Resource.h:203
void SetType(TypeT &&value)
Definition Resource.h:50
Resource & WithDetails(DetailsT &&value)
Definition Resource.h:193
void SetTags(TagsT &&value)
Definition Resource.h:145
AWS_SECURITYHUB_API Resource & operator=(Aws::Utils::Json::JsonView jsonValue)
bool DataClassificationHasBeenSet() const
Definition Resource.h:168
const Aws::String & GetType() const
Definition Resource.h:47
AWS_SECURITYHUB_API Resource(Aws::Utils::Json::JsonView jsonValue)
void SetPartition(Partition value)
Definition Resource.h:86
const ResourceDetails & GetDetails() const
Definition Resource.h:185
const Aws::String & GetRegion() const
Definition Resource.h:102
Resource & WithPartition(Partition value)
Definition Resource.h:90
void SetApplicationArn(ApplicationArnT &&value)
Definition Resource.h:225
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