AWS SDK for C++  1.9.69
AWS SDK for C++
ImportKeyPairRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/ec2/EC2Request.h>
10 #include <aws/core/utils/Array.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace EC2
18 {
19 namespace Model
20 {
21 
25  {
26  public:
28 
29  // Service request name is the Operation name which will send this request out,
30  // each operation should has unique request name, so that we can get operation's name from this request.
31  // Note: this is not true for response, multiple operations may have the same response name,
32  // so we can not get operation's name from response.
33  inline virtual const char* GetServiceRequestName() const override { return "ImportKeyPair"; }
34 
35  Aws::String SerializePayload() const override;
36 
37  protected:
38  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
39 
40  public:
41 
48  inline bool GetDryRun() const{ return m_dryRun; }
49 
56  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
57 
64  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
65 
72  inline ImportKeyPairRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
73 
74 
78  inline const Aws::String& GetKeyName() const{ return m_keyName; }
79 
83  inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
84 
88  inline void SetKeyName(const Aws::String& value) { m_keyNameHasBeenSet = true; m_keyName = value; }
89 
93  inline void SetKeyName(Aws::String&& value) { m_keyNameHasBeenSet = true; m_keyName = std::move(value); }
94 
98  inline void SetKeyName(const char* value) { m_keyNameHasBeenSet = true; m_keyName.assign(value); }
99 
103  inline ImportKeyPairRequest& WithKeyName(const Aws::String& value) { SetKeyName(value); return *this;}
104 
108  inline ImportKeyPairRequest& WithKeyName(Aws::String&& value) { SetKeyName(std::move(value)); return *this;}
109 
113  inline ImportKeyPairRequest& WithKeyName(const char* value) { SetKeyName(value); return *this;}
114 
115 
120  inline const Aws::Utils::ByteBuffer& GetPublicKeyMaterial() const{ return m_publicKeyMaterial; }
121 
126  inline bool PublicKeyMaterialHasBeenSet() const { return m_publicKeyMaterialHasBeenSet; }
127 
132  inline void SetPublicKeyMaterial(const Aws::Utils::ByteBuffer& value) { m_publicKeyMaterialHasBeenSet = true; m_publicKeyMaterial = value; }
133 
138  inline void SetPublicKeyMaterial(Aws::Utils::ByteBuffer&& value) { m_publicKeyMaterialHasBeenSet = true; m_publicKeyMaterial = std::move(value); }
139 
144  inline ImportKeyPairRequest& WithPublicKeyMaterial(const Aws::Utils::ByteBuffer& value) { SetPublicKeyMaterial(value); return *this;}
145 
150  inline ImportKeyPairRequest& WithPublicKeyMaterial(Aws::Utils::ByteBuffer&& value) { SetPublicKeyMaterial(std::move(value)); return *this;}
151 
152 
156  inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
157 
161  inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
162 
166  inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
167 
171  inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
172 
176  inline ImportKeyPairRequest& WithTagSpecifications(const Aws::Vector<TagSpecification>& value) { SetTagSpecifications(value); return *this;}
177 
181  inline ImportKeyPairRequest& WithTagSpecifications(Aws::Vector<TagSpecification>&& value) { SetTagSpecifications(std::move(value)); return *this;}
182 
186  inline ImportKeyPairRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
187 
191  inline ImportKeyPairRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
192 
193  private:
194 
195  bool m_dryRun;
196  bool m_dryRunHasBeenSet;
197 
198  Aws::String m_keyName;
199  bool m_keyNameHasBeenSet;
200 
201  Aws::Utils::ByteBuffer m_publicKeyMaterial;
202  bool m_publicKeyMaterialHasBeenSet;
203 
204  Aws::Vector<TagSpecification> m_tagSpecifications;
205  bool m_tagSpecificationsHasBeenSet;
206  };
207 
208 } // namespace Model
209 } // namespace EC2
210 } // namespace Aws
TagSpecification.h
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::ImportKeyPairRequest::SetDryRun
void SetDryRun(bool value)
Definition: ImportKeyPairRequest.h:64
Aws::EC2::Model::ImportKeyPairRequest::AddTagSpecifications
ImportKeyPairRequest & AddTagSpecifications(TagSpecification &&value)
Definition: ImportKeyPairRequest.h:191
Aws::EC2::Model::ImportKeyPairRequest::PublicKeyMaterialHasBeenSet
bool PublicKeyMaterialHasBeenSet() const
Definition: ImportKeyPairRequest.h:126
Aws::EC2::Model::ImportKeyPairRequest::SetTagSpecifications
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
Definition: ImportKeyPairRequest.h:166
Aws::EC2::Model::ImportKeyPairRequest::SetKeyName
void SetKeyName(const Aws::String &value)
Definition: ImportKeyPairRequest.h:88
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::ImportKeyPairRequest::WithKeyName
ImportKeyPairRequest & WithKeyName(const char *value)
Definition: ImportKeyPairRequest.h:113
Aws::EC2::Model::ImportKeyPairRequest::WithKeyName
ImportKeyPairRequest & WithKeyName(const Aws::String &value)
Definition: ImportKeyPairRequest.h:103
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::EC2::Model::ImportKeyPairRequest::WithTagSpecifications
ImportKeyPairRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
Definition: ImportKeyPairRequest.h:181
AWSVector.h
Aws::EC2::Model::ImportKeyPairRequest::SetTagSpecifications
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
Definition: ImportKeyPairRequest.h:171
Aws::EC2::Model::ImportKeyPairRequest
Definition: ImportKeyPairRequest.h:25
Aws::EC2::Model::ImportKeyPairRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
Aws::EC2::Model::ImportKeyPairRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: ImportKeyPairRequest.h:33
Aws::EC2::Model::ImportKeyPairRequest::WithPublicKeyMaterial
ImportKeyPairRequest & WithPublicKeyMaterial(Aws::Utils::ByteBuffer &&value)
Definition: ImportKeyPairRequest.h:150
Aws::EC2::Model::ImportKeyPairRequest::TagSpecificationsHasBeenSet
bool TagSpecificationsHasBeenSet() const
Definition: ImportKeyPairRequest.h:161
Aws::EC2::Model::ImportKeyPairRequest::WithPublicKeyMaterial
ImportKeyPairRequest & WithPublicKeyMaterial(const Aws::Utils::ByteBuffer &value)
Definition: ImportKeyPairRequest.h:144
Aws::EC2::Model::ImportKeyPairRequest::GetDryRun
bool GetDryRun() const
Definition: ImportKeyPairRequest.h:48
Aws::EC2::Model::ImportKeyPairRequest::ImportKeyPairRequest
ImportKeyPairRequest()
EC2Request.h
Aws::EC2::Model::ImportKeyPairRequest::GetPublicKeyMaterial
const Aws::Utils::ByteBuffer & GetPublicKeyMaterial() const
Definition: ImportKeyPairRequest.h:120
Aws::EC2::Model::ImportKeyPairRequest::SetKeyName
void SetKeyName(Aws::String &&value)
Definition: ImportKeyPairRequest.h:93
Aws::Utils::Array< unsigned char >
AWSString.h
Aws::EC2::Model::ImportKeyPairRequest::GetTagSpecifications
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
Definition: ImportKeyPairRequest.h:156
Aws::EC2::Model::ImportKeyPairRequest::WithKeyName
ImportKeyPairRequest & WithKeyName(Aws::String &&value)
Definition: ImportKeyPairRequest.h:108
Aws::EC2::Model::ImportKeyPairRequest::KeyNameHasBeenSet
bool KeyNameHasBeenSet() const
Definition: ImportKeyPairRequest.h:83
Aws::EC2::Model::ImportKeyPairRequest::WithDryRun
ImportKeyPairRequest & WithDryRun(bool value)
Definition: ImportKeyPairRequest.h:72
Aws::EC2::Model::ImportKeyPairRequest::SetPublicKeyMaterial
void SetPublicKeyMaterial(Aws::Utils::ByteBuffer &&value)
Definition: ImportKeyPairRequest.h:138
Aws
Definition: AccessManagementClient.h:15
Array.h
Aws::EC2::Model::ImportKeyPairRequest::SetKeyName
void SetKeyName(const char *value)
Definition: ImportKeyPairRequest.h:98
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::ImportKeyPairRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: ImportKeyPairRequest.h:56
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::TagSpecification
Definition: TagSpecification.h:35
Aws::EC2::Model::ImportKeyPairRequest::SerializePayload
Aws::String SerializePayload() const override
EC2_EXPORTS.h
Aws::EC2::Model::ImportKeyPairRequest::SetPublicKeyMaterial
void SetPublicKeyMaterial(const Aws::Utils::ByteBuffer &value)
Definition: ImportKeyPairRequest.h:132
Aws::EC2::Model::ImportKeyPairRequest::GetKeyName
const Aws::String & GetKeyName() const
Definition: ImportKeyPairRequest.h:78
Aws::EC2::Model::ImportKeyPairRequest::WithTagSpecifications
ImportKeyPairRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
Definition: ImportKeyPairRequest.h:176
Aws::EC2::Model::ImportKeyPairRequest::AddTagSpecifications
ImportKeyPairRequest & AddTagSpecifications(const TagSpecification &value)
Definition: ImportKeyPairRequest.h:186