AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
KeyPairInfo.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/KeyType.h>
13#include <aws/ec2/model/Tag.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Xml {
20class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace EC2 {
24namespace Model {
25
32 public:
33 AWS_EC2_API KeyPairInfo() = default;
34 AWS_EC2_API KeyPairInfo(const Aws::Utils::Xml::XmlNode& xmlNode);
35 AWS_EC2_API KeyPairInfo& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
36
37 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
38 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
39
41
44 inline const Aws::String& GetKeyPairId() const { return m_keyPairId; }
45 inline bool KeyPairIdHasBeenSet() const { return m_keyPairIdHasBeenSet; }
46 template <typename KeyPairIdT = Aws::String>
47 void SetKeyPairId(KeyPairIdT&& value) {
48 m_keyPairIdHasBeenSet = true;
49 m_keyPairId = std::forward<KeyPairIdT>(value);
50 }
51 template <typename KeyPairIdT = Aws::String>
52 KeyPairInfo& WithKeyPairId(KeyPairIdT&& value) {
53 SetKeyPairId(std::forward<KeyPairIdT>(value));
54 return *this;
55 }
57
59
62 inline KeyType GetKeyType() const { return m_keyType; }
63 inline bool KeyTypeHasBeenSet() const { return m_keyTypeHasBeenSet; }
64 inline void SetKeyType(KeyType value) {
65 m_keyTypeHasBeenSet = true;
66 m_keyType = value;
67 }
69 SetKeyType(value);
70 return *this;
71 }
73
75
78 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
79 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
80 template <typename TagsT = Aws::Vector<Tag>>
81 void SetTags(TagsT&& value) {
82 m_tagsHasBeenSet = true;
83 m_tags = std::forward<TagsT>(value);
84 }
85 template <typename TagsT = Aws::Vector<Tag>>
86 KeyPairInfo& WithTags(TagsT&& value) {
87 SetTags(std::forward<TagsT>(value));
88 return *this;
89 }
90 template <typename TagsT = Tag>
91 KeyPairInfo& AddTags(TagsT&& value) {
92 m_tagsHasBeenSet = true;
93 m_tags.emplace_back(std::forward<TagsT>(value));
94 return *this;
95 }
97
99
102 inline const Aws::String& GetPublicKey() const { return m_publicKey; }
103 inline bool PublicKeyHasBeenSet() const { return m_publicKeyHasBeenSet; }
104 template <typename PublicKeyT = Aws::String>
105 void SetPublicKey(PublicKeyT&& value) {
106 m_publicKeyHasBeenSet = true;
107 m_publicKey = std::forward<PublicKeyT>(value);
108 }
109 template <typename PublicKeyT = Aws::String>
110 KeyPairInfo& WithPublicKey(PublicKeyT&& value) {
111 SetPublicKey(std::forward<PublicKeyT>(value));
112 return *this;
113 }
115
117
126 inline const Aws::Utils::DateTime& GetCreateTime() const { return m_createTime; }
127 inline bool CreateTimeHasBeenSet() const { return m_createTimeHasBeenSet; }
128 template <typename CreateTimeT = Aws::Utils::DateTime>
129 void SetCreateTime(CreateTimeT&& value) {
130 m_createTimeHasBeenSet = true;
131 m_createTime = std::forward<CreateTimeT>(value);
132 }
133 template <typename CreateTimeT = Aws::Utils::DateTime>
134 KeyPairInfo& WithCreateTime(CreateTimeT&& value) {
135 SetCreateTime(std::forward<CreateTimeT>(value));
136 return *this;
137 }
139
141
144 inline const Aws::String& GetKeyName() const { return m_keyName; }
145 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
146 template <typename KeyNameT = Aws::String>
147 void SetKeyName(KeyNameT&& value) {
148 m_keyNameHasBeenSet = true;
149 m_keyName = std::forward<KeyNameT>(value);
150 }
151 template <typename KeyNameT = Aws::String>
152 KeyPairInfo& WithKeyName(KeyNameT&& value) {
153 SetKeyName(std::forward<KeyNameT>(value));
154 return *this;
155 }
157
159
172 inline const Aws::String& GetKeyFingerprint() const { return m_keyFingerprint; }
173 inline bool KeyFingerprintHasBeenSet() const { return m_keyFingerprintHasBeenSet; }
174 template <typename KeyFingerprintT = Aws::String>
175 void SetKeyFingerprint(KeyFingerprintT&& value) {
176 m_keyFingerprintHasBeenSet = true;
177 m_keyFingerprint = std::forward<KeyFingerprintT>(value);
178 }
179 template <typename KeyFingerprintT = Aws::String>
180 KeyPairInfo& WithKeyFingerprint(KeyFingerprintT&& value) {
181 SetKeyFingerprint(std::forward<KeyFingerprintT>(value));
182 return *this;
183 }
185 private:
186 Aws::String m_keyPairId;
187
188 KeyType m_keyType{KeyType::NOT_SET};
189
190 Aws::Vector<Tag> m_tags;
191
192 Aws::String m_publicKey;
193
194 Aws::Utils::DateTime m_createTime{};
195
196 Aws::String m_keyName;
197
198 Aws::String m_keyFingerprint;
199 bool m_keyPairIdHasBeenSet = false;
200 bool m_keyTypeHasBeenSet = false;
201 bool m_tagsHasBeenSet = false;
202 bool m_publicKeyHasBeenSet = false;
203 bool m_createTimeHasBeenSet = false;
204 bool m_keyNameHasBeenSet = false;
205 bool m_keyFingerprintHasBeenSet = false;
206};
207
208} // namespace Model
209} // namespace EC2
210} // namespace Aws
KeyPairInfo & WithPublicKey(PublicKeyT &&value)
AWS_EC2_API KeyPairInfo(const Aws::Utils::Xml::XmlNode &xmlNode)
bool KeyFingerprintHasBeenSet() const
void SetTags(TagsT &&value)
Definition KeyPairInfo.h:81
const Aws::Utils::DateTime & GetCreateTime() const
const Aws::String & GetKeyFingerprint() const
AWS_EC2_API KeyPairInfo & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
KeyPairInfo & WithKeyPairId(KeyPairIdT &&value)
Definition KeyPairInfo.h:52
const Aws::String & GetKeyPairId() const
Definition KeyPairInfo.h:44
const Aws::String & GetKeyName() const
KeyPairInfo & WithKeyFingerprint(KeyFingerprintT &&value)
void SetKeyName(KeyNameT &&value)
void SetCreateTime(CreateTimeT &&value)
KeyPairInfo & AddTags(TagsT &&value)
Definition KeyPairInfo.h:91
AWS_EC2_API KeyPairInfo()=default
KeyPairInfo & WithCreateTime(CreateTimeT &&value)
void SetKeyPairId(KeyPairIdT &&value)
Definition KeyPairInfo.h:47
KeyPairInfo & WithKeyType(KeyType value)
Definition KeyPairInfo.h:68
KeyPairInfo & WithKeyName(KeyNameT &&value)
const Aws::String & GetPublicKey() const
void SetKeyFingerprint(KeyFingerprintT &&value)
void SetPublicKey(PublicKeyT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetKeyType(KeyType value)
Definition KeyPairInfo.h:64
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
KeyPairInfo & WithTags(TagsT &&value)
Definition KeyPairInfo.h:86
const Aws::Vector< Tag > & GetTags() const
Definition KeyPairInfo.h:78
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream