AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
DescribeKeyPairsRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/ec2/model/Filter.h>
12#include <utility>
13
14namespace Aws
15{
16namespace EC2
17{
18namespace Model
19{
20
24 {
25 public:
26 AWS_EC2_API DescribeKeyPairsRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "DescribeKeyPairs"; }
33
34 AWS_EC2_API Aws::String SerializePayload() const override;
35
36 protected:
37 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38
39 public:
40
42
45 inline const Aws::Vector<Aws::String>& GetKeyNames() const { return m_keyNames; }
46 inline bool KeyNamesHasBeenSet() const { return m_keyNamesHasBeenSet; }
47 template<typename KeyNamesT = Aws::Vector<Aws::String>>
48 void SetKeyNames(KeyNamesT&& value) { m_keyNamesHasBeenSet = true; m_keyNames = std::forward<KeyNamesT>(value); }
49 template<typename KeyNamesT = Aws::Vector<Aws::String>>
50 DescribeKeyPairsRequest& WithKeyNames(KeyNamesT&& value) { SetKeyNames(std::forward<KeyNamesT>(value)); return *this;}
51 template<typename KeyNamesT = Aws::String>
52 DescribeKeyPairsRequest& AddKeyNames(KeyNamesT&& value) { m_keyNamesHasBeenSet = true; m_keyNames.emplace_back(std::forward<KeyNamesT>(value)); return *this; }
54
56
59 inline const Aws::Vector<Aws::String>& GetKeyPairIds() const { return m_keyPairIds; }
60 inline bool KeyPairIdsHasBeenSet() const { return m_keyPairIdsHasBeenSet; }
61 template<typename KeyPairIdsT = Aws::Vector<Aws::String>>
62 void SetKeyPairIds(KeyPairIdsT&& value) { m_keyPairIdsHasBeenSet = true; m_keyPairIds = std::forward<KeyPairIdsT>(value); }
63 template<typename KeyPairIdsT = Aws::Vector<Aws::String>>
64 DescribeKeyPairsRequest& WithKeyPairIds(KeyPairIdsT&& value) { SetKeyPairIds(std::forward<KeyPairIdsT>(value)); return *this;}
65 template<typename KeyPairIdsT = Aws::String>
66 DescribeKeyPairsRequest& AddKeyPairIds(KeyPairIdsT&& value) { m_keyPairIdsHasBeenSet = true; m_keyPairIds.emplace_back(std::forward<KeyPairIdsT>(value)); return *this; }
68
70
74 inline bool GetIncludePublicKey() const { return m_includePublicKey; }
75 inline bool IncludePublicKeyHasBeenSet() const { return m_includePublicKeyHasBeenSet; }
76 inline void SetIncludePublicKey(bool value) { m_includePublicKeyHasBeenSet = true; m_includePublicKey = value; }
77 inline DescribeKeyPairsRequest& WithIncludePublicKey(bool value) { SetIncludePublicKey(value); return *this;}
79
81
87 inline bool GetDryRun() const { return m_dryRun; }
88 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
89 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
90 inline DescribeKeyPairsRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
92
94
107 inline const Aws::Vector<Filter>& GetFilters() const { return m_filters; }
108 inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
109 template<typename FiltersT = Aws::Vector<Filter>>
110 void SetFilters(FiltersT&& value) { m_filtersHasBeenSet = true; m_filters = std::forward<FiltersT>(value); }
111 template<typename FiltersT = Aws::Vector<Filter>>
112 DescribeKeyPairsRequest& WithFilters(FiltersT&& value) { SetFilters(std::forward<FiltersT>(value)); return *this;}
113 template<typename FiltersT = Filter>
114 DescribeKeyPairsRequest& AddFilters(FiltersT&& value) { m_filtersHasBeenSet = true; m_filters.emplace_back(std::forward<FiltersT>(value)); return *this; }
116 private:
117
118 Aws::Vector<Aws::String> m_keyNames;
119 bool m_keyNamesHasBeenSet = false;
120
121 Aws::Vector<Aws::String> m_keyPairIds;
122 bool m_keyPairIdsHasBeenSet = false;
123
124 bool m_includePublicKey{false};
125 bool m_includePublicKeyHasBeenSet = false;
126
127 bool m_dryRun{false};
128 bool m_dryRunHasBeenSet = false;
129
130 Aws::Vector<Filter> m_filters;
131 bool m_filtersHasBeenSet = false;
132 };
133
134} // namespace Model
135} // namespace EC2
136} // 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