AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
ListObjectsRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/s3-crt/S3CrtRequest.h>
11#include <aws/s3-crt/S3Crt_EXPORTS.h>
12#include <aws/s3-crt/model/EncodingType.h>
13#include <aws/s3-crt/model/OptionalObjectAttributes.h>
14#include <aws/s3-crt/model/RequestPayer.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Http {
20class URI;
21} // namespace Http
22namespace S3Crt {
23namespace Model {
24
28 public:
29 AWS_S3CRT_API ListObjectsRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "ListObjects"; }
36
37 AWS_S3CRT_API Aws::String SerializePayload() const override;
38
39 AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
40
42
43 AWS_S3CRT_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
47 AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override;
48
50
85 inline const Aws::String& GetBucket() const { return m_bucket; }
86 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
87 template <typename BucketT = Aws::String>
88 void SetBucket(BucketT&& value) {
89 m_bucketHasBeenSet = true;
90 m_bucket = std::forward<BucketT>(value);
91 }
92 template <typename BucketT = Aws::String>
93 ListObjectsRequest& WithBucket(BucketT&& value) {
94 SetBucket(std::forward<BucketT>(value));
95 return *this;
96 }
98
100
105 inline const Aws::String& GetDelimiter() const { return m_delimiter; }
106 inline bool DelimiterHasBeenSet() const { return m_delimiterHasBeenSet; }
107 template <typename DelimiterT = Aws::String>
108 void SetDelimiter(DelimiterT&& value) {
109 m_delimiterHasBeenSet = true;
110 m_delimiter = std::forward<DelimiterT>(value);
111 }
112 template <typename DelimiterT = Aws::String>
113 ListObjectsRequest& WithDelimiter(DelimiterT&& value) {
114 SetDelimiter(std::forward<DelimiterT>(value));
115 return *this;
116 }
118
120
121 inline EncodingType GetEncodingType() const { return m_encodingType; }
122 inline bool EncodingTypeHasBeenSet() const { return m_encodingTypeHasBeenSet; }
123 inline void SetEncodingType(EncodingType value) {
124 m_encodingTypeHasBeenSet = true;
125 m_encodingType = value;
126 }
128 SetEncodingType(value);
129 return *this;
130 }
132
134
138 inline const Aws::String& GetMarker() const { return m_marker; }
139 inline bool MarkerHasBeenSet() const { return m_markerHasBeenSet; }
140 template <typename MarkerT = Aws::String>
141 void SetMarker(MarkerT&& value) {
142 m_markerHasBeenSet = true;
143 m_marker = std::forward<MarkerT>(value);
144 }
145 template <typename MarkerT = Aws::String>
146 ListObjectsRequest& WithMarker(MarkerT&& value) {
147 SetMarker(std::forward<MarkerT>(value));
148 return *this;
149 }
151
153
158 inline int GetMaxKeys() const { return m_maxKeys; }
159 inline bool MaxKeysHasBeenSet() const { return m_maxKeysHasBeenSet; }
160 inline void SetMaxKeys(int value) {
161 m_maxKeysHasBeenSet = true;
162 m_maxKeys = value;
163 }
164 inline ListObjectsRequest& WithMaxKeys(int value) {
165 SetMaxKeys(value);
166 return *this;
167 }
169
171
174 inline const Aws::String& GetPrefix() const { return m_prefix; }
175 inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; }
176 template <typename PrefixT = Aws::String>
177 void SetPrefix(PrefixT&& value) {
178 m_prefixHasBeenSet = true;
179 m_prefix = std::forward<PrefixT>(value);
180 }
181 template <typename PrefixT = Aws::String>
182 ListObjectsRequest& WithPrefix(PrefixT&& value) {
183 SetPrefix(std::forward<PrefixT>(value));
184 return *this;
185 }
187
189
194 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
195 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
196 inline void SetRequestPayer(RequestPayer value) {
197 m_requestPayerHasBeenSet = true;
198 m_requestPayer = value;
199 }
201 SetRequestPayer(value);
202 return *this;
203 }
205
207
212 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
213 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
214 template <typename ExpectedBucketOwnerT = Aws::String>
215 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
216 m_expectedBucketOwnerHasBeenSet = true;
217 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
218 }
219 template <typename ExpectedBucketOwnerT = Aws::String>
220 ListObjectsRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
221 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
222 return *this;
223 }
225
227
231 inline const Aws::Vector<OptionalObjectAttributes>& GetOptionalObjectAttributes() const { return m_optionalObjectAttributes; }
232 inline bool OptionalObjectAttributesHasBeenSet() const { return m_optionalObjectAttributesHasBeenSet; }
233 template <typename OptionalObjectAttributesT = Aws::Vector<OptionalObjectAttributes>>
234 void SetOptionalObjectAttributes(OptionalObjectAttributesT&& value) {
235 m_optionalObjectAttributesHasBeenSet = true;
236 m_optionalObjectAttributes = std::forward<OptionalObjectAttributesT>(value);
237 }
238 template <typename OptionalObjectAttributesT = Aws::Vector<OptionalObjectAttributes>>
239 ListObjectsRequest& WithOptionalObjectAttributes(OptionalObjectAttributesT&& value) {
240 SetOptionalObjectAttributes(std::forward<OptionalObjectAttributesT>(value));
241 return *this;
242 }
244 m_optionalObjectAttributesHasBeenSet = true;
245 m_optionalObjectAttributes.push_back(value);
246 return *this;
247 }
249
251
252 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
253 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
254 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
255 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
256 m_customizedAccessLogTagHasBeenSet = true;
257 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
258 }
259 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
260 ListObjectsRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
261 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
262 return *this;
263 }
264 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
265 ListObjectsRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
266 m_customizedAccessLogTagHasBeenSet = true;
267 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
268 return *this;
269 }
271 private:
272 Aws::String m_bucket;
273
274 Aws::String m_delimiter;
275
276 EncodingType m_encodingType{EncodingType::NOT_SET};
277
278 Aws::String m_marker;
279
280 int m_maxKeys{0};
281
282 Aws::String m_prefix;
283
284 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
285
286 Aws::String m_expectedBucketOwner;
287
288 Aws::Vector<OptionalObjectAttributes> m_optionalObjectAttributes;
289
290 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
291 bool m_bucketHasBeenSet = false;
292 bool m_delimiterHasBeenSet = false;
293 bool m_encodingTypeHasBeenSet = false;
294 bool m_markerHasBeenSet = false;
295 bool m_maxKeysHasBeenSet = false;
296 bool m_prefixHasBeenSet = false;
297 bool m_requestPayerHasBeenSet = false;
298 bool m_expectedBucketOwnerHasBeenSet = false;
299 bool m_optionalObjectAttributesHasBeenSet = false;
300 bool m_customizedAccessLogTagHasBeenSet = false;
301};
302
303} // namespace Model
304} // namespace S3Crt
305} // namespace Aws
ListObjectsRequest & WithDelimiter(DelimiterT &&value)
const Aws::Vector< OptionalObjectAttributes > & GetOptionalObjectAttributes() const
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
const Aws::String & GetDelimiter() const
AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override
ListObjectsRequest & WithOptionalObjectAttributes(OptionalObjectAttributesT &&value)
ListObjectsRequest & WithPrefix(PrefixT &&value)
AWS_S3CRT_API Aws::String SerializePayload() const override
ListObjectsRequest & WithMaxKeys(int value)
ListObjectsRequest & WithBucket(BucketT &&value)
void SetOptionalObjectAttributes(OptionalObjectAttributesT &&value)
ListObjectsRequest & WithEncodingType(EncodingType value)
const Aws::String & GetPrefix() const
ListObjectsRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
const Aws::String & GetBucket() const
ListObjectsRequest & AddOptionalObjectAttributes(OptionalObjectAttributes value)
const Aws::String & GetExpectedBucketOwner() const
AWS_S3CRT_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
ListObjectsRequest & WithRequestPayer(RequestPayer value)
AWS_S3CRT_API ListObjectsRequest()=default
AWS_S3CRT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::String & GetMarker() const
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
virtual const char * GetServiceRequestName() const override
ListObjectsRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
ListObjectsRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
ListObjectsRequest & WithMarker(MarkerT &&value)
Aws::Endpoint::EndpointParameters EndpointParameters
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_iostream< char, std::char_traits< char > > IOStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector