AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
PutBucketLoggingRequest.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/BucketLoggingStatus.h>
11#include <aws/s3/model/ChecksumAlgorithm.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Http
18{
19 class URI;
20} //namespace Http
21namespace S3
22{
23namespace Model
24{
25
29 {
30 public:
31 AWS_S3_API PutBucketLoggingRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "PutBucketLogging"; }
38
39 AWS_S3_API Aws::String SerializePayload() const override;
40
41 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
42
44
45 AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override;
46 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
47 inline bool RequestChecksumRequired() const override { return true; };
48
52 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
53
55
58 inline const Aws::String& GetBucket() const { return m_bucket; }
59 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
60 template<typename BucketT = Aws::String>
61 void SetBucket(BucketT&& value) { m_bucketHasBeenSet = true; m_bucket = std::forward<BucketT>(value); }
62 template<typename BucketT = Aws::String>
63 PutBucketLoggingRequest& WithBucket(BucketT&& value) { SetBucket(std::forward<BucketT>(value)); return *this;}
65
67
70 inline const BucketLoggingStatus& GetBucketLoggingStatus() const { return m_bucketLoggingStatus; }
71 inline bool BucketLoggingStatusHasBeenSet() const { return m_bucketLoggingStatusHasBeenSet; }
72 template<typename BucketLoggingStatusT = BucketLoggingStatus>
73 void SetBucketLoggingStatus(BucketLoggingStatusT&& value) { m_bucketLoggingStatusHasBeenSet = true; m_bucketLoggingStatus = std::forward<BucketLoggingStatusT>(value); }
74 template<typename BucketLoggingStatusT = BucketLoggingStatus>
75 PutBucketLoggingRequest& WithBucketLoggingStatus(BucketLoggingStatusT&& value) { SetBucketLoggingStatus(std::forward<BucketLoggingStatusT>(value)); return *this;}
77
79
84 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
85 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
86 template<typename ContentMD5T = Aws::String>
87 void SetContentMD5(ContentMD5T&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = std::forward<ContentMD5T>(value); }
88 template<typename ContentMD5T = Aws::String>
89 PutBucketLoggingRequest& WithContentMD5(ContentMD5T&& value) { SetContentMD5(std::forward<ContentMD5T>(value)); return *this;}
91
93
105 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
106 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
107 inline void SetChecksumAlgorithm(ChecksumAlgorithm value) { m_checksumAlgorithmHasBeenSet = true; m_checksumAlgorithm = value; }
110
112
117 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
118 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
119 template<typename ExpectedBucketOwnerT = Aws::String>
120 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value); }
121 template<typename ExpectedBucketOwnerT = Aws::String>
122 PutBucketLoggingRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) { SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value)); return *this;}
124
126
127 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
128 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
129 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
130 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value); }
131 template<typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
132 PutBucketLoggingRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) { SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value)); return *this;}
133 template<typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
134 PutBucketLoggingRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
135 m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value)); return *this;
136 }
138 private:
139
140 Aws::String m_bucket;
141 bool m_bucketHasBeenSet = false;
142
143 BucketLoggingStatus m_bucketLoggingStatus;
144 bool m_bucketLoggingStatusHasBeenSet = false;
145
146 Aws::String m_contentMD5;
147 bool m_contentMD5HasBeenSet = false;
148
150 bool m_checksumAlgorithmHasBeenSet = false;
151
152 Aws::String m_expectedBucketOwner;
153 bool m_expectedBucketOwnerHasBeenSet = false;
154
155 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
156 bool m_customizedAccessLogTagHasBeenSet = false;
157 };
158
159} // namespace Model
160} // namespace S3
161} // namespace Aws
AWS_S3_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
AWS_S3_API EndpointParameters GetEndpointContextParams() const override
AWS_S3_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
virtual const char * GetServiceRequestName() const override
AWS_S3_API PutBucketLoggingRequest()=default
PutBucketLoggingRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
void SetChecksumAlgorithm(ChecksumAlgorithm value)
AWS_S3_API Aws::String SerializePayload() const override
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutBucketLoggingRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
PutBucketLoggingRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutBucketLoggingRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
PutBucketLoggingRequest & WithBucket(BucketT &&value)
PutBucketLoggingRequest & WithContentMD5(ContentMD5T &&value)
const BucketLoggingStatus & GetBucketLoggingStatus() const
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3_API Aws::String GetChecksumAlgorithmName() const override
PutBucketLoggingRequest & WithBucketLoggingStatus(BucketLoggingStatusT &&value)
void SetBucketLoggingStatus(BucketLoggingStatusT &&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