AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
DescribeSnapshotsRequest.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 DescribeSnapshotsRequest() = 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 "DescribeSnapshots"; }
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
44 inline int GetMaxResults() const { return m_maxResults; }
45 inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
46 inline void SetMaxResults(int value) {
47 m_maxResultsHasBeenSet = true;
48 m_maxResults = value;
49 }
51 SetMaxResults(value);
52 return *this;
53 }
55
57
61 inline const Aws::String& GetNextToken() const { return m_nextToken; }
62 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
63 template <typename NextTokenT = Aws::String>
64 void SetNextToken(NextTokenT&& value) {
65 m_nextTokenHasBeenSet = true;
66 m_nextToken = std::forward<NextTokenT>(value);
67 }
68 template <typename NextTokenT = Aws::String>
70 SetNextToken(std::forward<NextTokenT>(value));
71 return *this;
72 }
74
76
81 inline const Aws::Vector<Aws::String>& GetOwnerIds() const { return m_ownerIds; }
82 inline bool OwnerIdsHasBeenSet() const { return m_ownerIdsHasBeenSet; }
83 template <typename OwnerIdsT = Aws::Vector<Aws::String>>
84 void SetOwnerIds(OwnerIdsT&& value) {
85 m_ownerIdsHasBeenSet = true;
86 m_ownerIds = std::forward<OwnerIdsT>(value);
87 }
88 template <typename OwnerIdsT = Aws::Vector<Aws::String>>
90 SetOwnerIds(std::forward<OwnerIdsT>(value));
91 return *this;
92 }
93 template <typename OwnerIdsT = Aws::String>
95 m_ownerIdsHasBeenSet = true;
96 m_ownerIds.emplace_back(std::forward<OwnerIdsT>(value));
97 return *this;
98 }
100
102
106 inline const Aws::Vector<Aws::String>& GetRestorableByUserIds() const { return m_restorableByUserIds; }
107 inline bool RestorableByUserIdsHasBeenSet() const { return m_restorableByUserIdsHasBeenSet; }
108 template <typename RestorableByUserIdsT = Aws::Vector<Aws::String>>
109 void SetRestorableByUserIds(RestorableByUserIdsT&& value) {
110 m_restorableByUserIdsHasBeenSet = true;
111 m_restorableByUserIds = std::forward<RestorableByUserIdsT>(value);
112 }
113 template <typename RestorableByUserIdsT = Aws::Vector<Aws::String>>
114 DescribeSnapshotsRequest& WithRestorableByUserIds(RestorableByUserIdsT&& value) {
115 SetRestorableByUserIds(std::forward<RestorableByUserIdsT>(value));
116 return *this;
117 }
118 template <typename RestorableByUserIdsT = Aws::String>
119 DescribeSnapshotsRequest& AddRestorableByUserIds(RestorableByUserIdsT&& value) {
120 m_restorableByUserIdsHasBeenSet = true;
121 m_restorableByUserIds.emplace_back(std::forward<RestorableByUserIdsT>(value));
122 return *this;
123 }
125
127
131 inline const Aws::Vector<Aws::String>& GetSnapshotIds() const { return m_snapshotIds; }
132 inline bool SnapshotIdsHasBeenSet() const { return m_snapshotIdsHasBeenSet; }
133 template <typename SnapshotIdsT = Aws::Vector<Aws::String>>
134 void SetSnapshotIds(SnapshotIdsT&& value) {
135 m_snapshotIdsHasBeenSet = true;
136 m_snapshotIds = std::forward<SnapshotIdsT>(value);
137 }
138 template <typename SnapshotIdsT = Aws::Vector<Aws::String>>
140 SetSnapshotIds(std::forward<SnapshotIdsT>(value));
141 return *this;
142 }
143 template <typename SnapshotIdsT = Aws::String>
145 m_snapshotIdsHasBeenSet = true;
146 m_snapshotIds.emplace_back(std::forward<SnapshotIdsT>(value));
147 return *this;
148 }
150
152
158 inline bool GetDryRun() const { return m_dryRun; }
159 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
160 inline void SetDryRun(bool value) {
161 m_dryRunHasBeenSet = true;
162 m_dryRun = value;
163 }
165 SetDryRun(value);
166 return *this;
167 }
169
171
202 inline const Aws::Vector<Filter>& GetFilters() const { return m_filters; }
203 inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
204 template <typename FiltersT = Aws::Vector<Filter>>
205 void SetFilters(FiltersT&& value) {
206 m_filtersHasBeenSet = true;
207 m_filters = std::forward<FiltersT>(value);
208 }
209 template <typename FiltersT = Aws::Vector<Filter>>
211 SetFilters(std::forward<FiltersT>(value));
212 return *this;
213 }
214 template <typename FiltersT = Filter>
216 m_filtersHasBeenSet = true;
217 m_filters.emplace_back(std::forward<FiltersT>(value));
218 return *this;
219 }
221 private:
222 int m_maxResults{0};
223
224 Aws::String m_nextToken;
225
226 Aws::Vector<Aws::String> m_ownerIds;
227
228 Aws::Vector<Aws::String> m_restorableByUserIds;
229
230 Aws::Vector<Aws::String> m_snapshotIds;
231
232 bool m_dryRun{false};
233
234 Aws::Vector<Filter> m_filters;
235 bool m_maxResultsHasBeenSet = false;
236 bool m_nextTokenHasBeenSet = false;
237 bool m_ownerIdsHasBeenSet = false;
238 bool m_restorableByUserIdsHasBeenSet = false;
239 bool m_snapshotIdsHasBeenSet = false;
240 bool m_dryRunHasBeenSet = false;
241 bool m_filtersHasBeenSet = false;
242};
243
244} // namespace Model
245} // namespace EC2
246} // namespace Aws
DescribeSnapshotsRequest & WithFilters(FiltersT &&value)
DescribeSnapshotsRequest & WithMaxResults(int value)
DescribeSnapshotsRequest & WithNextToken(NextTokenT &&value)
DescribeSnapshotsRequest & WithRestorableByUserIds(RestorableByUserIdsT &&value)
DescribeSnapshotsRequest & WithSnapshotIds(SnapshotIdsT &&value)
DescribeSnapshotsRequest & AddRestorableByUserIds(RestorableByUserIdsT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
virtual const char * GetServiceRequestName() const override
const Aws::Vector< Aws::String > & GetRestorableByUserIds() const
const Aws::Vector< Aws::String > & GetSnapshotIds() const
AWS_EC2_API DescribeSnapshotsRequest()=default
DescribeSnapshotsRequest & AddSnapshotIds(SnapshotIdsT &&value)
DescribeSnapshotsRequest & WithDryRun(bool value)
AWS_EC2_API Aws::String SerializePayload() const override
const Aws::Vector< Aws::String > & GetOwnerIds() const
DescribeSnapshotsRequest & AddOwnerIds(OwnerIdsT &&value)
DescribeSnapshotsRequest & AddFilters(FiltersT &&value)
void SetRestorableByUserIds(RestorableByUserIdsT &&value)
const Aws::Vector< Filter > & GetFilters() const
DescribeSnapshotsRequest & WithOwnerIds(OwnerIdsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector