AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
DescribeKeyPairsRequest.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/Filter.h>
12
13#include <utility>
14
15namespace Aws {
16namespace EC2 {
17namespace Model {
18
22 public:
23 AWS_EC2_API DescribeKeyPairsRequest() = default;
24
25 // Service request name is the Operation name which will send this request out,
26 // each operation should has unique request name, so that we can get operation's name from this request.
27 // Note: this is not true for response, multiple operations may have the same response name,
28 // so we can not get operation's name from response.
29 inline virtual const char* GetServiceRequestName() const override { return "DescribeKeyPairs"; }
30
31 AWS_EC2_API Aws::String SerializePayload() const override;
32
33 protected:
34 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
35
36 public:
38
41 inline const Aws::Vector<Aws::String>& GetKeyNames() const { return m_keyNames; }
42 inline bool KeyNamesHasBeenSet() const { return m_keyNamesHasBeenSet; }
43 template <typename KeyNamesT = Aws::Vector<Aws::String>>
44 void SetKeyNames(KeyNamesT&& value) {
45 m_keyNamesHasBeenSet = true;
46 m_keyNames = std::forward<KeyNamesT>(value);
47 }
48 template <typename KeyNamesT = Aws::Vector<Aws::String>>
50 SetKeyNames(std::forward<KeyNamesT>(value));
51 return *this;
52 }
53 template <typename KeyNamesT = Aws::String>
55 m_keyNamesHasBeenSet = true;
56 m_keyNames.emplace_back(std::forward<KeyNamesT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::Vector<Aws::String>& GetKeyPairIds() const { return m_keyPairIds; }
66 inline bool KeyPairIdsHasBeenSet() const { return m_keyPairIdsHasBeenSet; }
67 template <typename KeyPairIdsT = Aws::Vector<Aws::String>>
68 void SetKeyPairIds(KeyPairIdsT&& value) {
69 m_keyPairIdsHasBeenSet = true;
70 m_keyPairIds = std::forward<KeyPairIdsT>(value);
71 }
72 template <typename KeyPairIdsT = Aws::Vector<Aws::String>>
74 SetKeyPairIds(std::forward<KeyPairIdsT>(value));
75 return *this;
76 }
77 template <typename KeyPairIdsT = Aws::String>
78 DescribeKeyPairsRequest& AddKeyPairIds(KeyPairIdsT&& value) {
79 m_keyPairIdsHasBeenSet = true;
80 m_keyPairIds.emplace_back(std::forward<KeyPairIdsT>(value));
81 return *this;
82 }
84
86
90 inline bool GetIncludePublicKey() const { return m_includePublicKey; }
91 inline bool IncludePublicKeyHasBeenSet() const { return m_includePublicKeyHasBeenSet; }
92 inline void SetIncludePublicKey(bool value) {
93 m_includePublicKeyHasBeenSet = true;
94 m_includePublicKey = value;
95 }
98 return *this;
99 }
101
103
109 inline bool GetDryRun() const { return m_dryRun; }
110 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
111 inline void SetDryRun(bool value) {
112 m_dryRunHasBeenSet = true;
113 m_dryRun = value;
114 }
116 SetDryRun(value);
117 return *this;
118 }
120
122
135 inline const Aws::Vector<Filter>& GetFilters() const { return m_filters; }
136 inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
137 template <typename FiltersT = Aws::Vector<Filter>>
138 void SetFilters(FiltersT&& value) {
139 m_filtersHasBeenSet = true;
140 m_filters = std::forward<FiltersT>(value);
141 }
142 template <typename FiltersT = Aws::Vector<Filter>>
144 SetFilters(std::forward<FiltersT>(value));
145 return *this;
146 }
147 template <typename FiltersT = Filter>
149 m_filtersHasBeenSet = true;
150 m_filters.emplace_back(std::forward<FiltersT>(value));
151 return *this;
152 }
154 private:
155 Aws::Vector<Aws::String> m_keyNames;
156
157 Aws::Vector<Aws::String> m_keyPairIds;
158
159 bool m_includePublicKey{false};
160
161 bool m_dryRun{false};
162
163 Aws::Vector<Filter> m_filters;
164 bool m_keyNamesHasBeenSet = false;
165 bool m_keyPairIdsHasBeenSet = false;
166 bool m_includePublicKeyHasBeenSet = false;
167 bool m_dryRunHasBeenSet = false;
168 bool m_filtersHasBeenSet = false;
169};
170
171} // namespace Model
172} // namespace EC2
173} // namespace Aws
const Aws::Vector< Aws::String > & GetKeyPairIds() const
DescribeKeyPairsRequest & WithFilters(FiltersT &&value)
DescribeKeyPairsRequest & WithKeyNames(KeyNamesT &&value)
const Aws::Vector< Aws::String > & GetKeyNames() const
DescribeKeyPairsRequest & WithIncludePublicKey(bool value)
DescribeKeyPairsRequest & AddKeyPairIds(KeyPairIdsT &&value)
DescribeKeyPairsRequest & WithDryRun(bool value)
AWS_EC2_API DescribeKeyPairsRequest()=default
DescribeKeyPairsRequest & WithKeyPairIds(KeyPairIdsT &&value)
const Aws::Vector< Filter > & GetFilters() const
AWS_EC2_API Aws::String SerializePayload() const override
virtual const char * GetServiceRequestName() const override
DescribeKeyPairsRequest & AddKeyNames(KeyNamesT &&value)
DescribeKeyPairsRequest & AddFilters(FiltersT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector