AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CreateKeyPairRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/ec2/EC2Request.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/KeyFormat.h>
12#include <aws/ec2/model/KeyType.h>
13#include <aws/ec2/model/TagSpecification.h>
14
15#include <utility>
16
17namespace Aws {
18namespace EC2 {
19namespace Model {
20
24 public:
25 AWS_EC2_API CreateKeyPairRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "CreateKeyPair"; }
32
33 AWS_EC2_API Aws::String SerializePayload() const override;
34
35 protected:
36 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
37
38 public:
40
44 inline const Aws::String& GetKeyName() const { return m_keyName; }
45 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
46 template <typename KeyNameT = Aws::String>
47 void SetKeyName(KeyNameT&& value) {
48 m_keyNameHasBeenSet = true;
49 m_keyName = std::forward<KeyNameT>(value);
50 }
51 template <typename KeyNameT = Aws::String>
52 CreateKeyPairRequest& WithKeyName(KeyNameT&& value) {
53 SetKeyName(std::forward<KeyNameT>(value));
54 return *this;
55 }
57
59
63 inline KeyType GetKeyType() const { return m_keyType; }
64 inline bool KeyTypeHasBeenSet() const { return m_keyTypeHasBeenSet; }
65 inline void SetKeyType(KeyType value) {
66 m_keyTypeHasBeenSet = true;
67 m_keyType = value;
68 }
70 SetKeyType(value);
71 return *this;
72 }
74
76
79 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
80 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
81 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
82 void SetTagSpecifications(TagSpecificationsT&& value) {
83 m_tagSpecificationsHasBeenSet = true;
84 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
85 }
86 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
87 CreateKeyPairRequest& WithTagSpecifications(TagSpecificationsT&& value) {
88 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
89 return *this;
90 }
91 template <typename TagSpecificationsT = TagSpecification>
92 CreateKeyPairRequest& AddTagSpecifications(TagSpecificationsT&& value) {
93 m_tagSpecificationsHasBeenSet = true;
94 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
95 return *this;
96 }
98
100
103 inline KeyFormat GetKeyFormat() const { return m_keyFormat; }
104 inline bool KeyFormatHasBeenSet() const { return m_keyFormatHasBeenSet; }
105 inline void SetKeyFormat(KeyFormat value) {
106 m_keyFormatHasBeenSet = true;
107 m_keyFormat = value;
108 }
110 SetKeyFormat(value);
111 return *this;
112 }
114
116
122 inline bool GetDryRun() const { return m_dryRun; }
123 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
124 inline void SetDryRun(bool value) {
125 m_dryRunHasBeenSet = true;
126 m_dryRun = value;
127 }
128 inline CreateKeyPairRequest& WithDryRun(bool value) {
129 SetDryRun(value);
130 return *this;
131 }
133 private:
134 Aws::String m_keyName;
135
136 KeyType m_keyType{KeyType::NOT_SET};
137
138 Aws::Vector<TagSpecification> m_tagSpecifications;
139
140 KeyFormat m_keyFormat{KeyFormat::NOT_SET};
141
142 bool m_dryRun{false};
143 bool m_keyNameHasBeenSet = false;
144 bool m_keyTypeHasBeenSet = false;
145 bool m_tagSpecificationsHasBeenSet = false;
146 bool m_keyFormatHasBeenSet = false;
147 bool m_dryRunHasBeenSet = false;
148};
149
150} // namespace Model
151} // namespace EC2
152} // namespace Aws
CreateKeyPairRequest & WithKeyType(KeyType value)
CreateKeyPairRequest & WithKeyFormat(KeyFormat value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
CreateKeyPairRequest & AddTagSpecifications(TagSpecificationsT &&value)
virtual const char * GetServiceRequestName() const override
void SetTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
CreateKeyPairRequest & WithTagSpecifications(TagSpecificationsT &&value)
CreateKeyPairRequest & WithDryRun(bool value)
AWS_EC2_API Aws::String SerializePayload() const override
CreateKeyPairRequest & WithKeyName(KeyNameT &&value)
AWS_EC2_API CreateKeyPairRequest()=default
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector