AWS SDK for C++

AWS SDK for C++ Version 1.11.695

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/S3Request.h>
10#include <aws/s3/S3_EXPORTS.h>
11#include <aws/s3/model/BucketLoggingStatus.h>
12#include <aws/s3/model/ChecksumAlgorithm.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Http {
18class URI;
19} // namespace Http
20namespace S3 {
21namespace Model {
22
26 public:
27 AWS_S3_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_S3_API Aws::String SerializePayload() const override;
36
37 AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
38
40
41 AWS_S3_API bool HasEmbeddedError(IOStream& body, const Http::HeaderValueCollection& header) const override;
42 AWS_S3_API Aws::String GetChecksumAlgorithmName() const override;
43 inline bool RequestChecksumRequired() const override { return true; };
44
48 AWS_S3_API EndpointParameters GetEndpointContextParams() const override;
49
51
54 inline const Aws::String& GetBucket() const { return m_bucket; }
55 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
56 template <typename BucketT = Aws::String>
57 void SetBucket(BucketT&& value) {
58 m_bucketHasBeenSet = true;
59 m_bucket = std::forward<BucketT>(value);
60 }
61 template <typename BucketT = Aws::String>
63 SetBucket(std::forward<BucketT>(value));
64 return *this;
65 }
67
69
72 inline const BucketLoggingStatus& GetBucketLoggingStatus() const { return m_bucketLoggingStatus; }
73 inline bool BucketLoggingStatusHasBeenSet() const { return m_bucketLoggingStatusHasBeenSet; }
74 template <typename BucketLoggingStatusT = BucketLoggingStatus>
75 void SetBucketLoggingStatus(BucketLoggingStatusT&& value) {
76 m_bucketLoggingStatusHasBeenSet = true;
77 m_bucketLoggingStatus = std::forward<BucketLoggingStatusT>(value);
78 }
79 template <typename BucketLoggingStatusT = BucketLoggingStatus>
80 PutBucketLoggingRequest& WithBucketLoggingStatus(BucketLoggingStatusT&& value) {
81 SetBucketLoggingStatus(std::forward<BucketLoggingStatusT>(value));
82 return *this;
83 }
85
87
92 inline const Aws::String& GetContentMD5() const { return m_contentMD5; }
93 inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; }
94 template <typename ContentMD5T = Aws::String>
95 void SetContentMD5(ContentMD5T&& value) {
96 m_contentMD5HasBeenSet = true;
97 m_contentMD5 = std::forward<ContentMD5T>(value);
98 }
99 template <typename ContentMD5T = Aws::String>
101 SetContentMD5(std::forward<ContentMD5T>(value));
102 return *this;
103 }
105
107
119 inline ChecksumAlgorithm GetChecksumAlgorithm() const { return m_checksumAlgorithm; }
120 inline bool ChecksumAlgorithmHasBeenSet() const { return m_checksumAlgorithmHasBeenSet; }
122 m_checksumAlgorithmHasBeenSet = true;
123 m_checksumAlgorithm = value;
124 }
127 return *this;
128 }
130
132
137 inline const Aws::String& GetExpectedBucketOwner() const { return m_expectedBucketOwner; }
138 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; }
139 template <typename ExpectedBucketOwnerT = Aws::String>
140 void SetExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
141 m_expectedBucketOwnerHasBeenSet = true;
142 m_expectedBucketOwner = std::forward<ExpectedBucketOwnerT>(value);
143 }
144 template <typename ExpectedBucketOwnerT = Aws::String>
145 PutBucketLoggingRequest& WithExpectedBucketOwner(ExpectedBucketOwnerT&& value) {
146 SetExpectedBucketOwner(std::forward<ExpectedBucketOwnerT>(value));
147 return *this;
148 }
150
152
153 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const { return m_customizedAccessLogTag; }
154 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; }
155 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
156 void SetCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
157 m_customizedAccessLogTagHasBeenSet = true;
158 m_customizedAccessLogTag = std::forward<CustomizedAccessLogTagT>(value);
159 }
160 template <typename CustomizedAccessLogTagT = Aws::Map<Aws::String, Aws::String>>
161 PutBucketLoggingRequest& WithCustomizedAccessLogTag(CustomizedAccessLogTagT&& value) {
162 SetCustomizedAccessLogTag(std::forward<CustomizedAccessLogTagT>(value));
163 return *this;
164 }
165 template <typename CustomizedAccessLogTagKeyT = Aws::String, typename CustomizedAccessLogTagValueT = Aws::String>
166 PutBucketLoggingRequest& AddCustomizedAccessLogTag(CustomizedAccessLogTagKeyT&& key, CustomizedAccessLogTagValueT&& value) {
167 m_customizedAccessLogTagHasBeenSet = true;
168 m_customizedAccessLogTag.emplace(std::forward<CustomizedAccessLogTagKeyT>(key), std::forward<CustomizedAccessLogTagValueT>(value));
169 return *this;
170 }
172 private:
173 Aws::String m_bucket;
174 bool m_bucketHasBeenSet = false;
175
176 BucketLoggingStatus m_bucketLoggingStatus;
177 bool m_bucketLoggingStatusHasBeenSet = false;
178
179 Aws::String m_contentMD5;
180 bool m_contentMD5HasBeenSet = false;
181
183 bool m_checksumAlgorithmHasBeenSet = false;
184
185 Aws::String m_expectedBucketOwner;
186 bool m_expectedBucketOwnerHasBeenSet = false;
187
188 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag;
189 bool m_customizedAccessLogTagHasBeenSet = false;
190};
191
192} // namespace Model
193} // namespace S3
194} // 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:19
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