AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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() = default;
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
89 inline const Aws::String& GetBucket() const { return m_bucket; }
90 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
91 template<typename BucketT = Aws::String>
92 void SetBucket(BucketT&& value) { m_bucketHasBeenSet = true; m_bucket = std::forward<BucketT>(value); }
93 template<typename BucketT = Aws::String>
94 ListObjectsRequest& WithBucket(BucketT&& value) { SetBucket(std::forward<BucketT>(value)); return *this;}
96
98
103 inline const Aws::String& GetDelimiter() const { return m_delimiter; }
104 inline bool DelimiterHasBeenSet() const { return m_delimiterHasBeenSet; }
105 template<typename DelimiterT = Aws::String>
106 void SetDelimiter(DelimiterT&& value) { m_delimiterHasBeenSet = true; m_delimiter = std::forward<DelimiterT>(value); }
107 template<typename DelimiterT = Aws::String>
108 ListObjectsRequest& WithDelimiter(DelimiterT&& value) { SetDelimiter(std::forward<DelimiterT>(value)); return *this;}
110
112
113 inline EncodingType GetEncodingType() const { return m_encodingType; }
114 inline bool EncodingTypeHasBeenSet() const { return m_encodingTypeHasBeenSet; }
115 inline void SetEncodingType(EncodingType value) { m_encodingTypeHasBeenSet = true; m_encodingType = value; }
116 inline ListObjectsRequest& WithEncodingType(EncodingType value) { SetEncodingType(value); return *this;}
118
120
124 inline const Aws::String& GetMarker() const { return m_marker; }
125 inline bool MarkerHasBeenSet() const { return m_markerHasBeenSet; }
126 template<typename MarkerT = Aws::String>
127 void SetMarker(MarkerT&& value) { m_markerHasBeenSet = true; m_marker = std::forward<MarkerT>(value); }
128 template<typename MarkerT = Aws::String>
129 ListObjectsRequest& WithMarker(MarkerT&& value) { SetMarker(std::forward<MarkerT>(value)); return *this;}
131
133
138 inline int GetMaxKeys() const { return m_maxKeys; }
139 inline bool MaxKeysHasBeenSet() const { return m_maxKeysHasBeenSet; }
140 inline void SetMaxKeys(int value) { m_maxKeysHasBeenSet = true; m_maxKeys = value; }
141 inline ListObjectsRequest& WithMaxKeys(int value) { SetMaxKeys(value); return *this;}
143
145
148 inline const Aws::String& GetPrefix() const { return m_prefix; }
149 inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; }
150 template<typename PrefixT = Aws::String>
151 void SetPrefix(PrefixT&& value) { m_prefixHasBeenSet = true; m_prefix = std::forward<PrefixT>(value); }
152 template<typename PrefixT = Aws::String>
153 ListObjectsRequest& WithPrefix(PrefixT&& value) { SetPrefix(std::forward<PrefixT>(value)); return *this;}
155
157
162 inline RequestPayer GetRequestPayer() const { return m_requestPayer; }
163 inline bool RequestPayerHasBeenSet() const { return m_requestPayerHasBeenSet; }
164 inline void SetRequestPayer(RequestPayer value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
165 inline ListObjectsRequest& WithRequestPayer(RequestPayer value) { SetRequestPayer(value); return *this;}
167
169
174 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
175 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
176 template<typename ExpectedBucketOwnerT = Aws::String>
177 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value); }
178 template<typename ExpectedBucketOwnerT = Aws::String>
179 ListObjectsRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) { SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value)); return *this;}
181
183
187 inline const Aws::Vector<OptionalObjectAttributes>& GetOptionalObjectAttributes() const { return m_optionalObjectAttributes; }
188 inline bool OptionalObjectAttributesHasBeenSet() const { return m_optionalObjectAttributesHasBeenSet; }
189 template<typename OptionalObjectAttributesT = Aws::Vector<OptionalObjectAttributes>>
190 void SetOptionalObjectAttributes(OptionalObjectAttributesT&& value) { m_optionalObjectAttributesHasBeenSet = true; m_optionalObjectAttributes = std::forward<OptionalObjectAttributesT>(value); }
191 template<typename OptionalObjectAttributesT = Aws::Vector<OptionalObjectAttributes>>
192 ListObjectsRequest& WithOptionalObjectAttributes(OptionalObjectAttributesT&& value) { SetOptionalObjectAttributes(std::forward<OptionalObjectAttributesT>(value)); return *this;}
193 inline ListObjectsRequest& AddOptionalObjectAttributes(OptionalObjectAttributes value) { m_optionalObjectAttributesHasBeenSet = true; m_optionalObjectAttributes.push_back(value); return *this; }
195
197
198 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
199 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
200 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
201 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value); }
202 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
203 ListObjectsRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value)); return *this;}
204 template<typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
205 ListObjectsRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
206 m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value)); return *this;
207 }
209 private:
210
211 Aws::String m_bucket;
212 bool m_bucketHasBeenSet = false;
213
214 Aws::String m_delimiter;
215 bool m_delimiterHasBeenSet = false;
216
217 EncodingType m_encodingType{EncodingType::NOT_SET};
218 bool m_encodingTypeHasBeenSet = false;
219
220 Aws::String m_marker;
221 bool m_markerHasBeenSet = false;
222
223 int m_maxKeys{0};
224 bool m_maxKeysHasBeenSet = false;
225
226 Aws::String m_prefix;
227 bool m_prefixHasBeenSet = false;
228
229 RequestPayer m_requestPayer{RequestPayer::NOT_SET};
230 bool m_requestPayerHasBeenSet = false;
231
232 Aws::String m_expectedBucketOwner;
233 bool m_expectedBucketOwnerHasBeenSet = false;
234
235 Aws::Vector<OptionalObjectAttributes> m_optionalObjectAttributes;
236 bool m_optionalObjectAttributesHasBeenSet = false;
237
238 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
239 bool m_customizedAccessLogTagHasBeenSet = false;
240 };
241
242} // namespace Model
243} // namespace S3
244} // namespace Aws
ListObjectsRequest & WithOptionalObjectAttributes(OptionalObjectAttributesT &&value)
ListObjectsRequest & WithPrefix(PrefixT &&value)
const Aws::String & GetDelimiter() const
ListObjectsRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
const Aws::String & GetExpectedBucketOwner() const
ListObjectsRequest & WithEncodingType(EncodingType value)
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
void SetOptionalObjectAttributes(OptionalObjectAttributesT &&value)
AWS_S3_API Aws::String SerializePayload() const override
ListObjectsRequest & WithMarker(MarkerT &&value)
virtual const char * GetServiceRequestName() const override
ListObjectsRequest & WithDelimiter(DelimiterT &&value)
const Aws::Vector< OptionalObjectAttributes > & GetOptionalObjectAttributes() const
AWS_S3_API ListObjectsRequest()=default
void SetRequestPayer(RequestPayer value)
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
ListObjectsRequest & WithRequestPayer(RequestPayer value)
ListObjectsRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
void SetDelimiter(DelimiterT &&value)
ListObjectsRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
const Aws::String & GetMarker() const
const Aws::String & GetBucket() const
const Aws::String & GetPrefix() const
void SetEncodingType(EncodingType value)
ListObjectsRequest & AddOptionalObjectAttributes(OptionalObjectAttributes value)
ListObjectsRequest & WithMaxKeys(int value)
ListObjectsRequest & WithBucket(BucketT &&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