AWS SDK for C++

AWS SDK for C++ Version 1.11.844

Loading...
Searching...
No Matches
PutBucketLoggingRequest.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-crt/S3CrtRequest.h>
10#include <aws/s3-crt/S3Crt_EXPORTS.h>
11#include <aws/s3-crt/model/BucketLoggingStatus.h>
12#include <aws/s3-crt/model/ChecksumAlgorithm.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Http {
18class URI;
19} // namespace Http
20namespace S3Crt {
21namespace Model {
22
26 public:
27 AWS_S3CRT_API PutBucketLoggingRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "PutBucketLogging"; }
34
35 AWS_S3CRT_API Aws::String SerializePayload() const override;
36
37 AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
38
40
41 AWS_S3CRT_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
42 AWS_S3CRT_API Aws::String GetChecksumAlgorithmName() const override;
43 AWS_S3CRT_API bool ChecksumAlgorithmIsSet() const override;
44 inline bool RequestChecksumRequired() const override { return true; };
45
49 AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override;
50
52
55 inline const Aws::String& GetBucket() const { return m_bucket; }
56 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
57 template <typename BucketT = Aws::String>
58 void SetBucket(BucketT&& value) {
59 m_bucketHasBeenSet = true;
60 m_bucket = std::forward<BucketT>(value);
61 }
62 template <typename BucketT = Aws::String>
64 SetBucket(std::forward<BucketT>(value));
65 return *this;
66 }
68
70
73 inline const BucketLoggingStatus& GetBucketLoggingStatus() const { return m_bucketLoggingStatus; }
74 inline bool BucketLoggingStatusHasBeenSet() const { return m_bucketLoggingStatusHasBeenSet; }
75 template <typename BucketLoggingStatusT = BucketLoggingStatus>
76 void SetBucketLoggingStatus(BucketLoggingStatusT&& value) {
77 m_bucketLoggingStatusHasBeenSet = true;
78 m_bucketLoggingStatus = std::forward<BucketLoggingStatusT>(value);
79 }
80 template <typename BucketLoggingStatusT = BucketLoggingStatus>
81 PutBucketLoggingRequest& WithBucketLoggingStatus(BucketLoggingStatusT&& value) {
82 SetBucketLoggingStatus(std::forward<BucketLoggingStatusT>(value));
83 return *this;
84 }
86
88
93 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
94 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
95 template <typename ContentMD5T = Aws::String>
96 void SetContentMD5(ContentMD5T&& value) {
97 m_contentMD5HasBeenSet = true;
98 m_contentMD5 = std::forward<ContentMD5T>(value);
99 }
100 template <typename ContentMD5T = Aws::String>
102 SetContentMD5(std::forward<ContentMD5T>(value));
103 return *this;
104 }
106
108
120 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
121 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
123 m_checksumAlgorithmHasBeenSet = true;
124 m_checksumAlgorithm = value;
125 }
128 return *this;
129 }
131
133
138 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
139 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
140 template <typename ExpectedBucketOwnerT = Aws::String>
141 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
142 m_expectedBucketOwnerHasBeenSet = true;
143 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
144 }
145 template <typename ExpectedBucketOwnerT = Aws::String>
146 PutBucketLoggingRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
147 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
148 return *this;
149 }
151
153
154 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
155 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
156 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
157 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
158 m_customizedAccessLogTagHasBeenSet = true;
159 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
160 }
161 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
162 PutBucketLoggingRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
163 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
164 return *this;
165 }
166 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
167 PutBucketLoggingRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
168 m_customizedAccessLogTagHasBeenSet = true;
169 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
170 return *this;
171 }
173 private:
174 Aws::String m_bucket;
175
176 BucketLoggingStatus m_bucketLoggingStatus;
177
178 Aws::String m_contentMD5;
179
181
182 Aws::String m_expectedBucketOwner;
183
184 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
185 bool m_bucketHasBeenSet = false;
186 bool m_bucketLoggingStatusHasBeenSet = false;
187 bool m_contentMD5HasBeenSet = false;
188 bool m_checksumAlgorithmHasBeenSet = false;
189 bool m_expectedBucketOwnerHasBeenSet = false;
190 bool m_customizedAccessLogTagHasBeenSet = false;
191};
192
193} // namespace Model
194} // namespace S3Crt
195} // namespace Aws
PutBucketLoggingRequest & WithBucket(BucketT &&value)
AWS_S3CRT_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
virtual const char * GetServiceRequestName() const override
void SetCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
AWS_S3CRT_API Aws::String GetChecksumAlgorithmName() const override
AWS_S3CRT_API EndpointParameters GetEndpointContextParams() const override
void SetExpectedBucketOwner(ExpectedBucketOwnerT &&value)
const Aws::Map< Aws::String, Aws::String > & GetCustomizedAccessLogTag() const
PutBucketLoggingRequest & WithExpectedBucketOwner(ExpectedBucketOwnerT &&value)
void SetBucketLoggingStatus(BucketLoggingStatusT &&value)
const BucketLoggingStatus & GetBucketLoggingStatus() const
AWS_S3CRT_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutBucketLoggingRequest & WithContentMD5(ContentMD5T &&value)
PutBucketLoggingRequest & AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT &&key, CustomizedAccessLogTagValueT &&value)
PutBucketLoggingRequest & WithCustomizedAccessLogTag(CustomizedAccessLogTagT &&value)
PutBucketLoggingRequest & WithBucketLoggingStatus(BucketLoggingStatusT &&value)
AWS_S3CRT_API PutBucketLoggingRequest()=default
AWS_S3CRT_API bool HasEmbeddedError(IOStream &body, const Http::HeaderValueCollection &header) const override
PutBucketLoggingRequest & WithChecksumAlgorithm(ChecksumAlgorithm value)
AWS_S3CRT_API Aws::String SerializePayload() const override
AWS_S3CRT_API bool ChecksumAlgorithmIsSet() const override
Aws::Endpoint::EndpointParameters EndpointParameters
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