AWS SDK for C++

AWS SDK for C++ Version 1.11.695

Loading...
Searching...
No Matches
ListBucketsRequest.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/s3/S3Request.h>
10#include <aws/s3/S3_EXPORTS.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Http {
16class URI;
17} // namespace Http
18namespace S3 {
19namespace Model {
20
24 public:
25 AWS_S3_API ListBucketsRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "ListBuckets"; }
32
33 AWS_S3_API Aws::String SerializePayload() const override;
34
35 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
36
37 AWS_S3_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
38
40
45 inline int GetMaxBuckets() const { return m_maxBuckets; }
46 inline bool MaxBucketsHasBeenSet() const { return m_maxBucketsHasBeenSet; }
47 inline void SetMaxBuckets(int value) {
48 m_maxBucketsHasBeenSet = true;
49 m_maxBuckets = value;
50 }
52 SetMaxBuckets(value);
53 return *this;
54 }
56
58
70 inline const Aws::String& GetContinuationToken() const { return m_continuationToken; }
71 inline bool ContinuationTokenHasBeenSet() const { return m_continuationTokenHasBeenSet; }
72 template <typename ContinuationTokenT = Aws::String>
73 void SetContinuationToken(ContinuationTokenT&& value) {
74 m_continuationTokenHasBeenSet = true;
75 m_continuationToken = std::forward<ContinuationTokenT>(value);
76 }
77 template <typename ContinuationTokenT = Aws::String>
78 ListBucketsRequest& WithContinuationToken(ContinuationTokenT&& value) {
79 SetContinuationToken(std::forward<ContinuationTokenT>(value));
80 return *this;
81 }
83
85
89 inline const Aws::String& GetPrefix() const { return m_prefix; }
90 inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; }
91 template <typename PrefixT = Aws::String>
92 void SetPrefix(PrefixT&& value) {
93 m_prefixHasBeenSet = true;
94 m_prefix = std::forward<PrefixT>(value);
95 }
96 template <typename PrefixT = Aws::String>
97 ListBucketsRequest& WithPrefix(PrefixT&& value) {
98 SetPrefix(std::forward<PrefixT>(value));
99 return *this;
100 }
102
104
117 inline const Aws::String& GetBucketRegion() const { return m_bucketRegion; }
118 inline bool BucketRegionHasBeenSet() const { return m_bucketRegionHasBeenSet; }
119 template <typename BucketRegionT = Aws::String>
120 void SetBucketRegion(BucketRegionT&& value) {
121 m_bucketRegionHasBeenSet = true;
122 m_bucketRegion = std::forward<BucketRegionT>(value);
123 }
124 template <typename BucketRegionT = Aws::String>
125 ListBucketsRequest& WithBucketRegion(BucketRegionT&& value) {
126 SetBucketRegion(std::forward<BucketRegionT>(value));
127 return *this;
128 }
130
132
133 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
134 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
135 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
136 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
137 m_customizedAccessLogTagHasBeenSet = true;
138 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
139 }
140 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
141 ListBucketsRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
142 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
143 return *this;
144 }
145 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
146 ListBucketsRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
147 m_customizedAccessLogTagHasBeenSet = true;
148 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
149 return *this;
150 }
152 private:
153 int m_maxBuckets{0};
154 bool m_maxBucketsHasBeenSet = false;
155
156 Aws::String m_continuationToken;
157 bool m_continuationTokenHasBeenSet = false;
158
159 Aws::String m_prefix;
160 bool m_prefixHasBeenSet = false;
161
162 Aws::String m_bucketRegion;
163 bool m_bucketRegionHasBeenSet = false;
164
165 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
166 bool m_customizedAccessLogTagHasBeenSet = false;
167};
168
169} // namespace Model
170} // namespace S3
171} // namespace Aws
ListBucketsRequest & WithPrefix(PrefixT &&value)
void SetContinuationToken(ContinuationTokenT &&value)
AWS_S3_API Aws::String SerializePayload() const override
ListBucketsRequest & WithMaxBuckets(int value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
const Aws::String & GetContinuationToken() const
ListBucketsRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
ListBucketsRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
ListBucketsRequest & WithContinuationToken(ContinuationTokenT &&value)
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
ListBucketsRequest & WithBucketRegion(BucketRegionT &&value)
virtual const char * GetServiceRequestName() const override
const Aws::String & GetBucketRegion() const
void SetBucketRegion(BucketRegionT &&value)
AWS_S3_API ListBucketsRequest()=default
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
const Aws::String & GetPrefix() const
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