AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
ImportKeyPairRequest.h
1
6#pragma once
7#include <aws/core/utils/Array.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2Request.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/TagSpecification.h>
13
14#include <utility>
15
16namespace Aws {
17namespace EC2 {
18namespace Model {
19
23 public:
24 AWS_EC2_API ImportKeyPairRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "ImportKeyPair"; }
31
32 AWS_EC2_API Aws::String SerializePayload() const override;
33
34 protected:
35 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
36
37 public:
39
42 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
43 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
44 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
45 void SetTagSpecifications(TagSpecificationsT&& value) {
46 m_tagSpecificationsHasBeenSet = true;
47 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
48 }
49 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
50 ImportKeyPairRequest& WithTagSpecifications(TagSpecificationsT&& value) {
51 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
52 return *this;
53 }
54 template <typename TagSpecificationsT = TagSpecification>
55 ImportKeyPairRequest& AddTagSpecifications(TagSpecificationsT&& value) {
56 m_tagSpecificationsHasBeenSet = true;
57 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
58 return *this;
59 }
61
63
69 inline bool GetDryRun() const { return m_dryRun; }
70 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
71 inline void SetDryRun(bool value) {
72 m_dryRunHasBeenSet = true;
73 m_dryRun = value;
74 }
75 inline ImportKeyPairRequest& WithDryRun(bool value) {
76 SetDryRun(value);
77 return *this;
78 }
80
82
85 inline const Aws::String& GetKeyName() const { return m_keyName; }
86 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
87 template <typename KeyNameT = Aws::String>
88 void SetKeyName(KeyNameT&& value) {
89 m_keyNameHasBeenSet = true;
90 m_keyName = std::forward<KeyNameT>(value);
91 }
92 template <typename KeyNameT = Aws::String>
93 ImportKeyPairRequest& WithKeyName(KeyNameT&& value) {
94 SetKeyName(std::forward<KeyNameT>(value));
95 return *this;
96 }
98
100
103 inline const Aws::Utils::ByteBuffer& GetPublicKeyMaterial() const { return m_publicKeyMaterial; }
104 inline bool PublicKeyMaterialHasBeenSet() const { return m_publicKeyMaterialHasBeenSet; }
105 template <typename PublicKeyMaterialT = Aws::Utils::ByteBuffer>
106 void SetPublicKeyMaterial(PublicKeyMaterialT&& value) {
107 m_publicKeyMaterialHasBeenSet = true;
108 m_publicKeyMaterial = std::forward<PublicKeyMaterialT>(value);
109 }
110 template <typename PublicKeyMaterialT = Aws::Utils::ByteBuffer>
111 ImportKeyPairRequest& WithPublicKeyMaterial(PublicKeyMaterialT&& value) {
112 SetPublicKeyMaterial(std::forward<PublicKeyMaterialT>(value));
113 return *this;
114 }
116 private:
117 Aws::Vector<TagSpecification> m_tagSpecifications;
118
119 bool m_dryRun{false};
120
121 Aws::String m_keyName;
122
123 Aws::Utils::ByteBuffer m_publicKeyMaterial{};
124 bool m_tagSpecificationsHasBeenSet = false;
125 bool m_dryRunHasBeenSet = false;
126 bool m_keyNameHasBeenSet = false;
127 bool m_publicKeyMaterialHasBeenSet = false;
128};
129
130} // namespace Model
131} // namespace EC2
132} // namespace Aws
void SetTagSpecifications(TagSpecificationsT &&value)
const Aws::Utils::ByteBuffer & GetPublicKeyMaterial() const
void SetPublicKeyMaterial(PublicKeyMaterialT &&value)
ImportKeyPairRequest & WithPublicKeyMaterial(PublicKeyMaterialT &&value)
AWS_EC2_API ImportKeyPairRequest()=default
ImportKeyPairRequest & WithDryRun(bool value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
virtual const char * GetServiceRequestName() const override
ImportKeyPairRequest & AddTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
ImportKeyPairRequest & WithKeyName(KeyNameT &&value)
ImportKeyPairRequest & WithTagSpecifications(TagSpecificationsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector