AWS SDK for C++  1.8.71
AWS SDK for C++
HeadBucketRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/s3/S3_EXPORTS.h>
8 #include <aws/s3/S3Request.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Http
16 {
17  class URI;
18 } //namespace Http
19 namespace S3
20 {
21 namespace Model
22 {
23 
27  {
28  public:
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 "HeadBucket"; }
36 
37  Aws::String SerializePayload() const override;
38 
39  void AddQueryStringParameters(Aws::Http::URI& uri) const override;
40 
41  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
42 
43 
65  inline const Aws::String& GetBucket() const{ return m_bucket; }
66 
88  inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
89 
111  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
112 
134  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
135 
157  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
158 
180  inline HeadBucketRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
181 
203  inline HeadBucketRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
204 
226  inline HeadBucketRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
227 
228 
234  inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; }
235 
241  inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
242 
248  inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; }
249 
255  inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); }
256 
262  inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); }
263 
269  inline HeadBucketRequest& WithExpectedBucketOwner(const Aws::String& value) { SetExpectedBucketOwner(value); return *this;}
270 
276  inline HeadBucketRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;}
277 
283  inline HeadBucketRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;}
284 
285 
286 
287  inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; }
288 
289 
290  inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
291 
292 
293  inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; }
294 
295 
296  inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); }
297 
298 
299  inline HeadBucketRequest& WithCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { SetCustomizedAccessLogTag(value); return *this;}
300 
301 
302  inline HeadBucketRequest& WithCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;}
303 
304 
305  inline HeadBucketRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
306 
307 
308  inline HeadBucketRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
309 
310 
311  inline HeadBucketRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
312 
313 
314  inline HeadBucketRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; }
315 
316 
317  inline HeadBucketRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; }
318 
319 
320  inline HeadBucketRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; }
321 
322 
323  inline HeadBucketRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; }
324 
325  private:
326 
327  Aws::String m_bucket;
328  bool m_bucketHasBeenSet;
329 
330  Aws::String m_expectedBucketOwner;
331  bool m_expectedBucketOwnerHasBeenSet;
332 
333  Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
334  bool m_customizedAccessLogTagHasBeenSet;
335  };
336 
337 } // namespace Model
338 } // namespace S3
339 } // namespace Aws
HeadBucketRequest & WithCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
HeadBucketRequest & WithBucket(const char *value)
void SetExpectedBucketOwner(const char *value)
void SetCustomizedAccessLogTag(const Aws::Map< Aws::String, Aws::String > &value)
HeadBucketRequest & WithBucket(const Aws::String &value)
void SetExpectedBucketOwner(Aws::String &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19
#define AWS_S3_API
Definition: S3_EXPORTS.h:28
void SetBucket(const char *value)
HeadBucketRequest & WithExpectedBucketOwner(const Aws::String &value)
HeadBucketRequest & WithExpectedBucketOwner(const char *value)
void SetExpectedBucketOwner(const Aws::String &value)
virtual const char * GetServiceRequestName() const override
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
void SetBucket(const Aws::String &value)
void SetCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
HeadBucketRequest & WithBucket(Aws::String &&value)
void SetBucket(Aws::String &&value)
const Aws::String & GetExpectedBucketOwner() const
HeadBucketRequest & AddCustomizedAccessLogTag(Aws::String &&key, Aws::String &&value)
HeadBucketRequest & WithCustomizedAccessLogTag(Aws::Map< Aws::String, Aws::String > &&value)
HeadBucketRequest & AddCustomizedAccessLogTag(Aws::String &&key, const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
HeadBucketRequest & AddCustomizedAccessLogTag(const char *key, Aws::String &&value)
HeadBucketRequest & WithExpectedBucketOwner(Aws::String &&value)
HeadBucketRequest & AddCustomizedAccessLogTag(const Aws::String &key, Aws::String &&value)
HeadBucketRequest & AddCustomizedAccessLogTag(const Aws::String &key, const Aws::String &value)
HeadBucketRequest & AddCustomizedAccessLogTag(Aws::String &&key, const Aws::String &value)
const Aws::String & GetBucket() const
HeadBucketRequest & AddCustomizedAccessLogTag(const char *key, const char *value)