AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
ListObjectsRequest.h
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/s3/S3Request.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/s3/model/EncodingType.h>
11#include <aws/s3/model/RequestPayer.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <aws/s3/model/OptionalObjectAttributes.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Http
20{
21 class URI;
22} //namespace Http
23namespace S3
24{
25namespace Model
26{
27
31 {
32 public:
33 AWS_S3_API ListObjectsRequest();
34
35 // Service request name is the Operation name which will send this request out,
36 // each operation should has unique request name, so that we can get operation's name from this request.
37 // Note: this is not true for response, multiple operations may have the same response name,
38 // so we can not get operation's name from response.
39 inline virtual const char* GetServiceRequestName() const override { return "ListObjects"; }
40
41 AWS_S3_API Aws::String SerializePayload() const override;
42
43 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
44
46
47 AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override;
51 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
52
54
87 inline const Aws::String& GetBucket() const{ return m_bucket; }
88 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
89 inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
90 inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
91 inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
92 inline ListObjectsRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
93 inline ListObjectsRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
94 inline ListObjectsRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
96
98
101 inline const Aws::String& GetDelimiter() const{ return m_delimiter; }
102 inline bool DelimiterHasBeenSet() const { return m_delimiterHasBeenSet; }
103 inline void SetDelimiter(const Aws::String& value) { m_delimiterHasBeenSet = true; m_delimiter = value; }
104 inline void SetDelimiter(Aws::String&& value) { m_delimiterHasBeenSet = true; m_delimiter = std::move(value); }
105 inline void SetDelimiter(const char* value) { m_delimiterHasBeenSet = true; m_delimiter.assign(value); }
106 inline ListObjectsRequest& WithDelimiter(const Aws::String& value) { SetDelimiter(value); return *this;}
107 inline ListObjectsRequest& WithDelimiter(Aws::String&& value) { SetDelimiter(std::move(value)); return *this;}
108 inline ListObjectsRequest& WithDelimiter(const char* value) { SetDelimiter(value); return *this;}
110
112
113 inline const EncodingType& GetEncodingType() const{ return m_encodingType; }
114 inline bool EncodingTypeHasBeenSet() const { return m_encodingTypeHasBeenSet; }
115 inline void SetEncodingType(const EncodingType& value) { m_encodingTypeHasBeenSet = true; m_encodingType = value; }
116 inline void SetEncodingType(EncodingType&& value) { m_encodingTypeHasBeenSet = true; m_encodingType = std::move(value); }
117 inline ListObjectsRequest& WithEncodingType(const EncodingType& value) { SetEncodingType(value); return *this;}
118 inline ListObjectsRequest& WithEncodingType(EncodingType&& value) { SetEncodingType(std::move(value)); return *this;}
120
122
126 inline const Aws::String& GetMarker() const{ return m_marker; }
127 inline bool MarkerHasBeenSet() const { return m_markerHasBeenSet; }
128 inline void SetMarker(const Aws::String& value) { m_markerHasBeenSet = true; m_marker = value; }
129 inline void SetMarker(Aws::String&& value) { m_markerHasBeenSet = true; m_marker = std::move(value); }
130 inline void SetMarker(const char* value) { m_markerHasBeenSet = true; m_marker.assign(value); }
131 inline ListObjectsRequest& WithMarker(const Aws::String& value) { SetMarker(value); return *this;}
132 inline ListObjectsRequest& WithMarker(Aws::String&& value) { SetMarker(std::move(value)); return *this;}
133 inline ListObjectsRequest& WithMarker(const char* value) { SetMarker(value); return *this;}
135
137
142 inline int GetMaxKeys() const{ return m_maxKeys; }
143 inline bool MaxKeysHasBeenSet() const { return m_maxKeysHasBeenSet; }
144 inline void SetMaxKeys(int value) { m_maxKeysHasBeenSet = true; m_maxKeys = value; }
145 inline ListObjectsRequest& WithMaxKeys(int value) { SetMaxKeys(value); return *this;}
147
149
152 inline const Aws::String& GetPrefix() const{ return m_prefix; }
153 inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; }
154 inline void SetPrefix(const Aws::String& value) { m_prefixHasBeenSet = true; m_prefix = value; }
155 inline void SetPrefix(Aws::String&& value) { m_prefixHasBeenSet = true; m_prefix = std::move(value); }
156 inline void SetPrefix(const char* value) { m_prefixHasBeenSet = true; m_prefix.assign(value); }
157 inline ListObjectsRequest& WithPrefix(const Aws::String& value) { SetPrefix(value); return *this;}
158 inline ListObjectsRequest& WithPrefix(Aws::String&& value) { SetPrefix(std::move(value)); return *this;}
159 inline ListObjectsRequest& WithPrefix(const char* value) { SetPrefix(value); return *this;}
161
163
168 inline const RequestPayer& GetRequestPayer() const{ return m_requestPayer; }
169 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
170 inline void SetRequestPayer(const RequestPayer& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
171 inline void SetRequestPayer(RequestPayer&& value) { m_requestPayerHasBeenSet = true; m_requestPayer = std::move(value); }
172 inline ListObjectsRequest& WithRequestPayer(const RequestPayer& value) { SetRequestPayer(value); return *this;}
173 inline ListObjectsRequest& WithRequestPayer(RequestPayer&& value) { SetRequestPayer(std::move(value)); return *this;}
175
177
182 inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; }
183 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
184 inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; }
185 inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); }
186 inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); }
188 inline ListObjectsRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;}
189 inline ListObjectsRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;}
191
193
197 inline const Aws::Vector<OptionalObjectAttributes>& GetOptionalObjectAttributes() const{ return m_optionalObjectAttributes; }
198 inline bool OptionalObjectAttributesHasBeenSet() const { return m_optionalObjectAttributesHasBeenSet; }
199 inline void SetOptionalObjectAttributes(const Aws::Vector<OptionalObjectAttributes>& value) { m_optionalObjectAttributesHasBeenSet = true; m_optionalObjectAttributes = value; }
200 inline void SetOptionalObjectAttributes(Aws::Vector<OptionalObjectAttributes>&& value) { m_optionalObjectAttributesHasBeenSet = true; m_optionalObjectAttributes = std::move(value); }
203 inline ListObjectsRequest& AddOptionalObjectAttributes(const OptionalObjectAttributes& value) { m_optionalObjectAttributesHasBeenSet = true; m_optionalObjectAttributes.push_back(value); return *this; }
204 inline ListObjectsRequest& AddOptionalObjectAttributes(OptionalObjectAttributes&& value) { m_optionalObjectAttributesHasBeenSet = true; m_optionalObjectAttributes.push_back(std::move(value)); return *this; }
206
208
209 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; }
210 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
211 inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; }
212 inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); }
215 inline ListObjectsRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
216 inline ListObjectsRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
217 inline ListObjectsRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
218 inline ListObjectsRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; }
219 inline ListObjectsRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
220 inline ListObjectsRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
221 inline ListObjectsRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
223 private:
224
225 Aws::String m_bucket;
226 bool m_bucketHasBeenSet = false;
227
228 Aws::String m_delimiter;
229 bool m_delimiterHasBeenSet = false;
230
231 EncodingType m_encodingType;
232 bool m_encodingTypeHasBeenSet = false;
233
234 Aws::String m_marker;
235 bool m_markerHasBeenSet = false;
236
237 int m_maxKeys;
238 bool m_maxKeysHasBeenSet = false;
239
240 Aws::String m_prefix;
241 bool m_prefixHasBeenSet = false;
242
243 RequestPayer m_requestPayer;
244 bool m_requestPayerHasBeenSet = false;
245
246 Aws::String m_expectedBucketOwner;
247 bool m_expectedBucketOwnerHasBeenSet = false;
248
249 Aws::Vector<OptionalObjectAttributes> m_optionalObjectAttributes;
250 bool m_optionalObjectAttributesHasBeenSet = false;
251
252 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
253 bool m_customizedAccessLogTagHasBeenSet = false;
254 };
255
256} // namespace Model
257} // namespace S3
258} // namespace Aws
ListObjectsRequest & WithRequestPayer(RequestPayer &&value)
ListObjectsRequest & WithMarker(const char *value)
ListObjectsRequest & WithDelimiter(Aws::String &&value)
const Aws::String & GetDelimiter() const
void SetBucket(Aws::String &&value)
void SetCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
const Aws::String & GetExpectedBucketOwner() const
ListObjectsRequest & WithMarker(Aws::String &&value)
ListObjectsRequest & AddCustomizedAccessLogTag(const Aws::String &key, Aws::String &&value)
void SetExpectedBucketOwner(Aws::String &&value)
ListObjectsRequest & WithPrefix(const char *value)
ListObjectsRequest & WithExpectedBucketOwner(const Aws::String &value)
AWS_S3_API Aws::String SerializePayload() const override
void SetCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
virtual const char * GetServiceRequestName() const override
void SetEncodingType(EncodingType &&value)
ListObjectsRequest & WithEncodingType(EncodingType &&value)
const Aws::Vector< OptionalObjectAttributes > & GetOptionalObjectAttributes() const
ListObjectsRequest & AddCustomizedAccessLogTag(Aws::String &&key, const char *value)
ListObjectsRequest & WithMarker(const Aws::String &value)
ListObjectsRequest & AddCustomizedAccessLogTag(const Aws::String &key, const Aws::String &value)
ListObjectsRequest & AddOptionalObjectAttributes(const OptionalObjectAttributes &value)
ListObjectsRequest & AddOptionalObjectAttributes(OptionalObjectAttributes &&value)
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
ListObjectsRequest & AddCustomizedAccessLogTag(Aws::String &&key, Aws::String &&value)
void SetMarker(Aws::String &&value)
ListObjectsRequest & WithExpectedBucketOwner(Aws::String &&value)
void SetExpectedBucketOwner(const char *value)
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
ListObjectsRequest & WithEncodingType(const EncodingType &value)
void SetOptionalObjectAttributes(Aws::Vector< OptionalObjectAttributes > &&value)
ListObjectsRequest & WithBucket(Aws::String &&value)
void SetExpectedBucketOwner(const Aws::String &value)
void SetMarker(const Aws::String &value)
void SetDelimiter(Aws::String &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
void SetBucket(const Aws::String &value)
ListObjectsRequest & WithExpectedBucketOwner(const char *value)
ListObjectsRequest & WithDelimiter(const Aws::String &value)
void SetRequestPayer(RequestPayer &&value)
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
ListObjectsRequest & WithDelimiter(const char *value)
ListObjectsRequest & WithOptionalObjectAttributes(Aws::Vector< OptionalObjectAttributes > &&value)
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
ListObjectsRequest & AddCustomizedAccessLogTag(const char *key, Aws::String &&value)
void SetPrefix(const Aws::String &value)
ListObjectsRequest & WithPrefix(Aws::String &&value)
const RequestPayer & GetRequestPayer() const
const Aws::String & GetMarker() const
const Aws::String & GetBucket() const
ListObjectsRequest & WithOptionalObjectAttributes(const Aws::Vector< OptionalObjectAttributes > &value)
const Aws::String & GetPrefix() const
void SetPrefix(Aws::String &&value)
const EncodingType & GetEncodingType() const
ListObjectsRequest & WithBucket(const Aws::String &value)
ListObjectsRequest & WithPrefix(const Aws::String &value)
ListObjectsRequest & WithCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
void SetDelimiter(const Aws::String &value)
void SetEncodingType(const EncodingType &value)
ListObjectsRequest & WithCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
ListObjectsRequest & WithBucket(const char *value)
ListObjectsRequest & WithRequestPayer(const RequestPayer &value)
void SetRequestPayer(const RequestPayer &value)
ListObjectsRequest & AddCustomizedAccessLogTag(const char *key, const char *value)
void SetOptionalObjectAttributes(const Aws::Vector< OptionalObjectAttributes > &value)
ListObjectsRequest & AddCustomizedAccessLogTag(Aws::String &&key, const Aws::String &value)
ListObjectsRequest & WithMaxKeys(int value)
Aws::Endpoint::EndpointParameters EndpointParameters
Definition S3Request.h:22
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