AWS SDK for C++

AWS SDK for C++ Version 1.11.937

Loading...
Searching...
No Matches
Cluster.h
1
6#pragma once
7#include <aws/cloudhsmv2/CloudHSMV2_EXPORTS.h>
8#include <aws/cloudhsmv2/model/BackupPolicy.h>
9#include <aws/cloudhsmv2/model/BackupRetentionPolicy.h>
10#include <aws/cloudhsmv2/model/Certificates.h>
11#include <aws/cloudhsmv2/model/ClusterMode.h>
12#include <aws/cloudhsmv2/model/ClusterState.h>
13#include <aws/cloudhsmv2/model/Hsm.h>
14#include <aws/cloudhsmv2/model/NetworkType.h>
15#include <aws/cloudhsmv2/model/Tag.h>
16#include <aws/core/utils/DateTime.h>
17#include <aws/core/utils/memory/stl/AWSMap.h>
18#include <aws/core/utils/memory/stl/AWSString.h>
19#include <aws/core/utils/memory/stl/AWSVector.h>
20#include <aws/crt/cbor/Cbor.h>
21
22#include <utility>
23
24namespace Aws {
25namespace Utils {
26namespace Cbor {
27class CborValue;
28} // namespace Cbor
29} // namespace Utils
30namespace CloudHSMV2 {
31namespace Model {
32
38class Cluster {
39 public:
40 AWS_CLOUDHSMV2_API Cluster() = default;
41 AWS_CLOUDHSMV2_API Cluster(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
42 AWS_CLOUDHSMV2_API Cluster& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
43 AWS_CLOUDHSMV2_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
44
46
49 inline BackupPolicy GetBackupPolicy() const { return m_backupPolicy; }
50 inline bool BackupPolicyHasBeenSet() const { return m_backupPolicyHasBeenSet; }
51 inline void SetBackupPolicy(BackupPolicy value) {
52 m_backupPolicyHasBeenSet = true;
53 m_backupPolicy = value;
54 }
56 SetBackupPolicy(value);
57 return *this;
58 }
60
62
65 inline const BackupRetentionPolicy& GetBackupRetentionPolicy() const { return m_backupRetentionPolicy; }
66 inline bool BackupRetentionPolicyHasBeenSet() const { return m_backupRetentionPolicyHasBeenSet; }
67 template <typename BackupRetentionPolicyT = BackupRetentionPolicy>
68 void SetBackupRetentionPolicy(BackupRetentionPolicyT&& value) {
69 m_backupRetentionPolicyHasBeenSet = true;
70 m_backupRetentionPolicy = std::forward<BackupRetentionPolicyT>(value);
71 }
72 template <typename BackupRetentionPolicyT = BackupRetentionPolicy>
73 Cluster& WithBackupRetentionPolicy(BackupRetentionPolicyT&& value) {
74 SetBackupRetentionPolicy(std::forward<BackupRetentionPolicyT>(value));
75 return *this;
76 }
78
80
83 inline const Aws::String& GetClusterId() const { return m_clusterId; }
84 inline bool ClusterIdHasBeenSet() const { return m_clusterIdHasBeenSet; }
85 template <typename ClusterIdT = Aws::String>
86 void SetClusterId(ClusterIdT&& value) {
87 m_clusterIdHasBeenSet = true;
88 m_clusterId = std::forward<ClusterIdT>(value);
89 }
90 template <typename ClusterIdT = Aws::String>
91 Cluster& WithClusterId(ClusterIdT&& value) {
92 SetClusterId(std::forward<ClusterIdT>(value));
93 return *this;
94 }
96
98
101 inline const Aws::Utils::DateTime& GetCreateTimestamp() const { return m_createTimestamp; }
102 inline bool CreateTimestampHasBeenSet() const { return m_createTimestampHasBeenSet; }
103 template <typename CreateTimestampT = Aws::Utils::DateTime>
104 void SetCreateTimestamp(CreateTimestampT&& value) {
105 m_createTimestampHasBeenSet = true;
106 m_createTimestamp = std::forward<CreateTimestampT>(value);
107 }
108 template <typename CreateTimestampT = Aws::Utils::DateTime>
109 Cluster& WithCreateTimestamp(CreateTimestampT&& value) {
110 SetCreateTimestamp(std::forward<CreateTimestampT>(value));
111 return *this;
112 }
114
116
119 inline const Aws::Vector<Hsm>& GetHsms() const { return m_hsms; }
120 inline bool HsmsHasBeenSet() const { return m_hsmsHasBeenSet; }
121 template <typename HsmsT = Aws::Vector<Hsm>>
122 void SetHsms(HsmsT&& value) {
123 m_hsmsHasBeenSet = true;
124 m_hsms = std::forward<HsmsT>(value);
125 }
126 template <typename HsmsT = Aws::Vector<Hsm>>
127 Cluster& WithHsms(HsmsT&& value) {
128 SetHsms(std::forward<HsmsT>(value));
129 return *this;
130 }
131 template <typename HsmsT = Hsm>
132 Cluster& AddHsms(HsmsT&& value) {
133 m_hsmsHasBeenSet = true;
134 m_hsms.emplace_back(std::forward<HsmsT>(value));
135 return *this;
136 }
138
140
143 inline const Aws::String& GetHsmType() const { return m_hsmType; }
144 inline bool HsmTypeHasBeenSet() const { return m_hsmTypeHasBeenSet; }
145 template <typename HsmTypeT = Aws::String>
146 void SetHsmType(HsmTypeT&& value) {
147 m_hsmTypeHasBeenSet = true;
148 m_hsmType = std::forward<HsmTypeT>(value);
149 }
150 template <typename HsmTypeT = Aws::String>
151 Cluster& WithHsmType(HsmTypeT&& value) {
152 SetHsmType(std::forward<HsmTypeT>(value));
153 return *this;
154 }
156
158
162 inline const Aws::Utils::DateTime& GetHsmTypeRollbackExpiration() const { return m_hsmTypeRollbackExpiration; }
163 inline bool HsmTypeRollbackExpirationHasBeenSet() const { return m_hsmTypeRollbackExpirationHasBeenSet; }
164 template <typename HsmTypeRollbackExpirationT = Aws::Utils::DateTime>
165 void SetHsmTypeRollbackExpiration(HsmTypeRollbackExpirationT&& value) {
166 m_hsmTypeRollbackExpirationHasBeenSet = true;
167 m_hsmTypeRollbackExpiration = std::forward<HsmTypeRollbackExpirationT>(value);
168 }
169 template <typename HsmTypeRollbackExpirationT = Aws::Utils::DateTime>
170 Cluster& WithHsmTypeRollbackExpiration(HsmTypeRollbackExpirationT&& value) {
171 SetHsmTypeRollbackExpiration(std::forward<HsmTypeRollbackExpirationT>(value));
172 return *this;
173 }
175
177
180 inline const Aws::String& GetPreCoPassword() const { return m_preCoPassword; }
181 inline bool PreCoPasswordHasBeenSet() const { return m_preCoPasswordHasBeenSet; }
182 template <typename PreCoPasswordT = Aws::String>
183 void SetPreCoPassword(PreCoPasswordT&& value) {
184 m_preCoPasswordHasBeenSet = true;
185 m_preCoPassword = std::forward<PreCoPasswordT>(value);
186 }
187 template <typename PreCoPasswordT = Aws::String>
188 Cluster& WithPreCoPassword(PreCoPasswordT&& value) {
189 SetPreCoPassword(std::forward<PreCoPasswordT>(value));
190 return *this;
191 }
193
195
198 inline const Aws::String& GetSecurityGroup() const { return m_securityGroup; }
199 inline bool SecurityGroupHasBeenSet() const { return m_securityGroupHasBeenSet; }
200 template <typename SecurityGroupT = Aws::String>
201 void SetSecurityGroup(SecurityGroupT&& value) {
202 m_securityGroupHasBeenSet = true;
203 m_securityGroup = std::forward<SecurityGroupT>(value);
204 }
205 template <typename SecurityGroupT = Aws::String>
206 Cluster& WithSecurityGroup(SecurityGroupT&& value) {
207 SetSecurityGroup(std::forward<SecurityGroupT>(value));
208 return *this;
209 }
211
213
217 inline const Aws::String& GetSourceBackupId() const { return m_sourceBackupId; }
218 inline bool SourceBackupIdHasBeenSet() const { return m_sourceBackupIdHasBeenSet; }
219 template <typename SourceBackupIdT = Aws::String>
220 void SetSourceBackupId(SourceBackupIdT&& value) {
221 m_sourceBackupIdHasBeenSet = true;
222 m_sourceBackupId = std::forward<SourceBackupIdT>(value);
223 }
224 template <typename SourceBackupIdT = Aws::String>
225 Cluster& WithSourceBackupId(SourceBackupIdT&& value) {
226 SetSourceBackupId(std::forward<SourceBackupIdT>(value));
227 return *this;
228 }
230
232
235 inline ClusterState GetState() const { return m_state; }
236 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
237 inline void SetState(ClusterState value) {
238 m_stateHasBeenSet = true;
239 m_state = value;
240 }
242 SetState(value);
243 return *this;
244 }
246
248
251 inline const Aws::String& GetStateMessage() const { return m_stateMessage; }
252 inline bool StateMessageHasBeenSet() const { return m_stateMessageHasBeenSet; }
253 template <typename StateMessageT = Aws::String>
254 void SetStateMessage(StateMessageT&& value) {
255 m_stateMessageHasBeenSet = true;
256 m_stateMessage = std::forward<StateMessageT>(value);
257 }
258 template <typename StateMessageT = Aws::String>
259 Cluster& WithStateMessage(StateMessageT&& value) {
260 SetStateMessage(std::forward<StateMessageT>(value));
261 return *this;
262 }
264
266
270 inline const Aws::Map<Aws::String, Aws::String>& GetSubnetMapping() const { return m_subnetMapping; }
271 inline bool SubnetMappingHasBeenSet() const { return m_subnetMappingHasBeenSet; }
272 template <typename SubnetMappingT = Aws::Map<Aws::String, Aws::String>>
273 void SetSubnetMapping(SubnetMappingT&& value) {
274 m_subnetMappingHasBeenSet = true;
275 m_subnetMapping = std::forward<SubnetMappingT>(value);
276 }
277 template <typename SubnetMappingT = Aws::Map<Aws::String, Aws::String>>
278 Cluster& WithSubnetMapping(SubnetMappingT&& value) {
279 SetSubnetMapping(std::forward<SubnetMappingT>(value));
280 return *this;
281 }
282 template <typename SubnetMappingKeyT = Aws::String, typename SubnetMappingValueT = Aws::String>
283 Cluster& AddSubnetMapping(SubnetMappingKeyT&& key, SubnetMappingValueT&& value) {
284 m_subnetMappingHasBeenSet = true;
285 m_subnetMapping.emplace(std::forward<SubnetMappingKeyT>(key), std::forward<SubnetMappingValueT>(value));
286 return *this;
287 }
289
291
295 inline const Aws::String& GetVpcId() const { return m_vpcId; }
296 inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }
297 template <typename VpcIdT = Aws::String>
298 void SetVpcId(VpcIdT&& value) {
299 m_vpcIdHasBeenSet = true;
300 m_vpcId = std::forward<VpcIdT>(value);
301 }
302 template <typename VpcIdT = Aws::String>
303 Cluster& WithVpcId(VpcIdT&& value) {
304 SetVpcId(std::forward<VpcIdT>(value));
305 return *this;
306 }
308
310
321 inline NetworkType GetNetworkType() const { return m_networkType; }
322 inline bool NetworkTypeHasBeenSet() const { return m_networkTypeHasBeenSet; }
323 inline void SetNetworkType(NetworkType value) {
324 m_networkTypeHasBeenSet = true;
325 m_networkType = value;
326 }
328 SetNetworkType(value);
329 return *this;
330 }
332
334
337 inline const Certificates& GetCertificates() const { return m_certificates; }
338 inline bool CertificatesHasBeenSet() const { return m_certificatesHasBeenSet; }
339 template <typename CertificatesT = Certificates>
340 void SetCertificates(CertificatesT&& value) {
341 m_certificatesHasBeenSet = true;
342 m_certificates = std::forward<CertificatesT>(value);
343 }
344 template <typename CertificatesT = Certificates>
345 Cluster& WithCertificates(CertificatesT&& value) {
346 SetCertificates(std::forward<CertificatesT>(value));
347 return *this;
348 }
350
352
355 inline const Aws::Vector<Tag>& GetTagList() const { return m_tagList; }
356 inline bool TagListHasBeenSet() const { return m_tagListHasBeenSet; }
357 template <typename TagListT = Aws::Vector<Tag>>
358 void SetTagList(TagListT&& value) {
359 m_tagListHasBeenSet = true;
360 m_tagList = std::forward<TagListT>(value);
361 }
362 template <typename TagListT = Aws::Vector<Tag>>
363 Cluster& WithTagList(TagListT&& value) {
364 SetTagList(std::forward<TagListT>(value));
365 return *this;
366 }
367 template <typename TagListT = Tag>
368 Cluster& AddTagList(TagListT&& value) {
369 m_tagListHasBeenSet = true;
370 m_tagList.emplace_back(std::forward<TagListT>(value));
371 return *this;
372 }
374
376
379 inline ClusterMode GetMode() const { return m_mode; }
380 inline bool ModeHasBeenSet() const { return m_modeHasBeenSet; }
381 inline void SetMode(ClusterMode value) {
382 m_modeHasBeenSet = true;
383 m_mode = value;
384 }
385 inline Cluster& WithMode(ClusterMode value) {
386 SetMode(value);
387 return *this;
388 }
390 private:
391 BackupPolicy m_backupPolicy{BackupPolicy::NOT_SET};
392
393 BackupRetentionPolicy m_backupRetentionPolicy;
394
395 Aws::String m_clusterId;
396
397 Aws::Utils::DateTime m_createTimestamp{};
398
399 Aws::Vector<Hsm> m_hsms;
400
401 Aws::String m_hsmType;
402
403 Aws::Utils::DateTime m_hsmTypeRollbackExpiration{};
404
405 Aws::String m_preCoPassword;
406
407 Aws::String m_securityGroup;
408
409 Aws::String m_sourceBackupId;
410
412
413 Aws::String m_stateMessage;
414
416
417 Aws::String m_vpcId;
418
419 NetworkType m_networkType{NetworkType::NOT_SET};
420
421 Certificates m_certificates;
422
423 Aws::Vector<Tag> m_tagList;
424
426 bool m_backupPolicyHasBeenSet = false;
427 bool m_backupRetentionPolicyHasBeenSet = false;
428 bool m_clusterIdHasBeenSet = false;
429 bool m_createTimestampHasBeenSet = false;
430 bool m_hsmsHasBeenSet = false;
431 bool m_hsmTypeHasBeenSet = false;
432 bool m_hsmTypeRollbackExpirationHasBeenSet = false;
433 bool m_preCoPasswordHasBeenSet = false;
434 bool m_securityGroupHasBeenSet = false;
435 bool m_sourceBackupIdHasBeenSet = false;
436 bool m_stateHasBeenSet = false;
437 bool m_stateMessageHasBeenSet = false;
438 bool m_subnetMappingHasBeenSet = false;
439 bool m_vpcIdHasBeenSet = false;
440 bool m_networkTypeHasBeenSet = false;
441 bool m_certificatesHasBeenSet = false;
442 bool m_tagListHasBeenSet = false;
443 bool m_modeHasBeenSet = false;
444};
445
446} // namespace Model
447} // namespace CloudHSMV2
448} // namespace Aws
bool NetworkTypeHasBeenSet() const
Definition Cluster.h:322
const Aws::String & GetStateMessage() const
Definition Cluster.h:251
Cluster & WithHsms(HsmsT &&value)
Definition Cluster.h:127
Cluster & WithVpcId(VpcIdT &&value)
Definition Cluster.h:303
Cluster & WithHsmTypeRollbackExpiration(HsmTypeRollbackExpirationT &&value)
Definition Cluster.h:170
void SetSubnetMapping(SubnetMappingT &&value)
Definition Cluster.h:273
void SetCertificates(CertificatesT &&value)
Definition Cluster.h:340
const BackupRetentionPolicy & GetBackupRetentionPolicy() const
Definition Cluster.h:65
void SetMode(ClusterMode value)
Definition Cluster.h:381
void SetSourceBackupId(SourceBackupIdT &&value)
Definition Cluster.h:220
const Aws::String & GetHsmType() const
Definition Cluster.h:143
Cluster & WithBackupRetentionPolicy(BackupRetentionPolicyT &&value)
Definition Cluster.h:73
ClusterState GetState() const
Definition Cluster.h:235
BackupPolicy GetBackupPolicy() const
Definition Cluster.h:49
NetworkType GetNetworkType() const
Definition Cluster.h:321
AWS_CLOUDHSMV2_API Cluster & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
bool ClusterIdHasBeenSet() const
Definition Cluster.h:84
AWS_CLOUDHSMV2_API Cluster()=default
void SetClusterId(ClusterIdT &&value)
Definition Cluster.h:86
Cluster & WithCreateTimestamp(CreateTimestampT &&value)
Definition Cluster.h:109
const Aws::Utils::DateTime & GetHsmTypeRollbackExpiration() const
Definition Cluster.h:162
Cluster & WithMode(ClusterMode value)
Definition Cluster.h:385
const Aws::Vector< Tag > & GetTagList() const
Definition Cluster.h:355
bool BackupPolicyHasBeenSet() const
Definition Cluster.h:50
bool StateMessageHasBeenSet() const
Definition Cluster.h:252
void SetPreCoPassword(PreCoPasswordT &&value)
Definition Cluster.h:183
const Aws::Utils::DateTime & GetCreateTimestamp() const
Definition Cluster.h:101
Cluster & WithNetworkType(NetworkType value)
Definition Cluster.h:327
const Aws::String & GetPreCoPassword() const
Definition Cluster.h:180
void SetBackupPolicy(BackupPolicy value)
Definition Cluster.h:51
void SetBackupRetentionPolicy(BackupRetentionPolicyT &&value)
Definition Cluster.h:68
bool SourceBackupIdHasBeenSet() const
Definition Cluster.h:218
void SetCreateTimestamp(CreateTimestampT &&value)
Definition Cluster.h:104
const Aws::String & GetSourceBackupId() const
Definition Cluster.h:217
Cluster & WithSecurityGroup(SecurityGroupT &&value)
Definition Cluster.h:206
Cluster & WithClusterId(ClusterIdT &&value)
Definition Cluster.h:91
AWS_CLOUDHSMV2_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
Cluster & WithSubnetMapping(SubnetMappingT &&value)
Definition Cluster.h:278
Cluster & WithCertificates(CertificatesT &&value)
Definition Cluster.h:345
void SetSecurityGroup(SecurityGroupT &&value)
Definition Cluster.h:201
Cluster & WithState(ClusterState value)
Definition Cluster.h:241
Cluster & WithTagList(TagListT &&value)
Definition Cluster.h:363
void SetHsms(HsmsT &&value)
Definition Cluster.h:122
bool CreateTimestampHasBeenSet() const
Definition Cluster.h:102
bool SecurityGroupHasBeenSet() const
Definition Cluster.h:199
const Aws::String & GetSecurityGroup() const
Definition Cluster.h:198
bool SubnetMappingHasBeenSet() const
Definition Cluster.h:271
bool PreCoPasswordHasBeenSet() const
Definition Cluster.h:181
Cluster & WithSourceBackupId(SourceBackupIdT &&value)
Definition Cluster.h:225
bool HsmTypeRollbackExpirationHasBeenSet() const
Definition Cluster.h:163
Cluster & WithBackupPolicy(BackupPolicy value)
Definition Cluster.h:55
Cluster & AddSubnetMapping(SubnetMappingKeyT &&key, SubnetMappingValueT &&value)
Definition Cluster.h:283
Cluster & AddHsms(HsmsT &&value)
Definition Cluster.h:132
const Aws::String & GetVpcId() const
Definition Cluster.h:295
Cluster & WithStateMessage(StateMessageT &&value)
Definition Cluster.h:259
bool BackupRetentionPolicyHasBeenSet() const
Definition Cluster.h:66
bool CertificatesHasBeenSet() const
Definition Cluster.h:338
void SetState(ClusterState value)
Definition Cluster.h:237
Cluster & WithHsmType(HsmTypeT &&value)
Definition Cluster.h:151
const Aws::Map< Aws::String, Aws::String > & GetSubnetMapping() const
Definition Cluster.h:270
void SetHsmType(HsmTypeT &&value)
Definition Cluster.h:146
void SetNetworkType(NetworkType value)
Definition Cluster.h:323
AWS_CLOUDHSMV2_API Cluster(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
void SetStateMessage(StateMessageT &&value)
Definition Cluster.h:254
ClusterMode GetMode() const
Definition Cluster.h:379
Cluster & AddTagList(TagListT &&value)
Definition Cluster.h:368
const Certificates & GetCertificates() const
Definition Cluster.h:337
void SetVpcId(VpcIdT &&value)
Definition Cluster.h:298
const Aws::Vector< Hsm > & GetHsms() const
Definition Cluster.h:119
void SetTagList(TagListT &&value)
Definition Cluster.h:358
Cluster & WithPreCoPassword(PreCoPasswordT &&value)
Definition Cluster.h:188
void SetHsmTypeRollbackExpiration(HsmTypeRollbackExpirationT &&value)
Definition Cluster.h:165
const Aws::String & GetClusterId() const
Definition Cluster.h:83
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
std::vector< T, Aws::Allocator< T > > Vector