1 | /* |
2 | * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
3 | * |
4 | * Licensed under the Apache License, Version 2.0 (the "License"). |
5 | * You may not use this file except in compliance with the License. |
6 | * A copy of the License is located at |
7 | * |
8 | * http://aws.amazon.com/apache2.0 |
9 | * |
10 | * or in the "license" file accompanying this file. This file is distributed |
11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
12 | * express or implied. See the License for the specific language governing |
13 | * permissions and limitations under the License. |
14 | */ |
15 | |
16 | #pragma once |
17 | #include <aws/s3/S3_EXPORTS.h> |
18 | #include <aws/s3/S3Request.h> |
19 | #include <aws/core/utils/memory/stl/AWSString.h> |
20 | #include <aws/s3/model/ReplicationConfiguration.h> |
21 | #include <aws/core/utils/memory/stl/AWSMap.h> |
22 | #include <utility> |
23 | |
24 | namespace Aws |
25 | { |
26 | namespace Http |
27 | { |
28 | class URI; |
29 | } //namespace Http |
30 | namespace S3 |
31 | { |
32 | namespace Model |
33 | { |
34 | |
35 | /** |
36 | */ |
37 | class AWS_S3_API PutBucketReplicationRequest : public S3Request |
38 | { |
39 | public: |
40 | PutBucketReplicationRequest(); |
41 | |
42 | // Service request name is the Operation name which will send this request out, |
43 | // each operation should has unique request name, so that we can get operation's name from this request. |
44 | // Note: this is not true for response, multiple operations may have the same response name, |
45 | // so we can not get operation's name from response. |
46 | inline virtual const char* GetServiceRequestName() const override { return "PutBucketReplication" ; } |
47 | |
48 | Aws::String SerializePayload() const override; |
49 | |
50 | void AddQueryStringParameters(Aws::Http::URI& uri) const override; |
51 | |
52 | Aws::Http::HeaderValueCollection () const override; |
53 | |
54 | |
55 | /** |
56 | * <p>The name of the bucket</p> |
57 | */ |
58 | inline const Aws::String& GetBucket() const{ return m_bucket; } |
59 | |
60 | /** |
61 | * <p>The name of the bucket</p> |
62 | */ |
63 | inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; } |
64 | |
65 | /** |
66 | * <p>The name of the bucket</p> |
67 | */ |
68 | inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; } |
69 | |
70 | /** |
71 | * <p>The name of the bucket</p> |
72 | */ |
73 | inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); } |
74 | |
75 | /** |
76 | * <p>The name of the bucket</p> |
77 | */ |
78 | inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); } |
79 | |
80 | /** |
81 | * <p>The name of the bucket</p> |
82 | */ |
83 | inline PutBucketReplicationRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;} |
84 | |
85 | /** |
86 | * <p>The name of the bucket</p> |
87 | */ |
88 | inline PutBucketReplicationRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;} |
89 | |
90 | /** |
91 | * <p>The name of the bucket</p> |
92 | */ |
93 | inline PutBucketReplicationRequest& WithBucket(const char* value) { SetBucket(value); return *this;} |
94 | |
95 | |
96 | /** |
97 | * <p>The base64-encoded 128-bit MD5 digest of the data. You must use this header |
98 | * as a message integrity check to verify that the request body was not corrupted |
99 | * in transit. For more information, see <a |
100 | * href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p> |
101 | */ |
102 | inline const Aws::String& GetContentMD5() const{ return m_contentMD5; } |
103 | |
104 | /** |
105 | * <p>The base64-encoded 128-bit MD5 digest of the data. You must use this header |
106 | * as a message integrity check to verify that the request body was not corrupted |
107 | * in transit. For more information, see <a |
108 | * href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p> |
109 | */ |
110 | inline bool ContentMD5HasBeenSet() const { return m_contentMD5HasBeenSet; } |
111 | |
112 | /** |
113 | * <p>The base64-encoded 128-bit MD5 digest of the data. You must use this header |
114 | * as a message integrity check to verify that the request body was not corrupted |
115 | * in transit. For more information, see <a |
116 | * href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p> |
117 | */ |
118 | inline void SetContentMD5(const Aws::String& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; } |
119 | |
120 | /** |
121 | * <p>The base64-encoded 128-bit MD5 digest of the data. You must use this header |
122 | * as a message integrity check to verify that the request body was not corrupted |
123 | * in transit. For more information, see <a |
124 | * href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p> |
125 | */ |
126 | inline void SetContentMD5(Aws::String&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = std::move(value); } |
127 | |
128 | /** |
129 | * <p>The base64-encoded 128-bit MD5 digest of the data. You must use this header |
130 | * as a message integrity check to verify that the request body was not corrupted |
131 | * in transit. For more information, see <a |
132 | * href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p> |
133 | */ |
134 | inline void SetContentMD5(const char* value) { m_contentMD5HasBeenSet = true; m_contentMD5.assign(value); } |
135 | |
136 | /** |
137 | * <p>The base64-encoded 128-bit MD5 digest of the data. You must use this header |
138 | * as a message integrity check to verify that the request body was not corrupted |
139 | * in transit. For more information, see <a |
140 | * href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p> |
141 | */ |
142 | inline PutBucketReplicationRequest& WithContentMD5(const Aws::String& value) { SetContentMD5(value); return *this;} |
143 | |
144 | /** |
145 | * <p>The base64-encoded 128-bit MD5 digest of the data. You must use this header |
146 | * as a message integrity check to verify that the request body was not corrupted |
147 | * in transit. For more information, see <a |
148 | * href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p> |
149 | */ |
150 | inline PutBucketReplicationRequest& WithContentMD5(Aws::String&& value) { SetContentMD5(std::move(value)); return *this;} |
151 | |
152 | /** |
153 | * <p>The base64-encoded 128-bit MD5 digest of the data. You must use this header |
154 | * as a message integrity check to verify that the request body was not corrupted |
155 | * in transit. For more information, see <a |
156 | * href="http://www.ietf.org/rfc/rfc1864.txt">RFC 1864</a>.</p> |
157 | */ |
158 | inline PutBucketReplicationRequest& WithContentMD5(const char* value) { SetContentMD5(value); return *this;} |
159 | |
160 | |
161 | |
162 | inline const ReplicationConfiguration& GetReplicationConfiguration() const{ return m_replicationConfiguration; } |
163 | |
164 | |
165 | inline bool ReplicationConfigurationHasBeenSet() const { return m_replicationConfigurationHasBeenSet; } |
166 | |
167 | |
168 | inline void SetReplicationConfiguration(const ReplicationConfiguration& value) { m_replicationConfigurationHasBeenSet = true; m_replicationConfiguration = value; } |
169 | |
170 | |
171 | inline void SetReplicationConfiguration(ReplicationConfiguration&& value) { m_replicationConfigurationHasBeenSet = true; m_replicationConfiguration = std::move(value); } |
172 | |
173 | |
174 | inline PutBucketReplicationRequest& WithReplicationConfiguration(const ReplicationConfiguration& value) { SetReplicationConfiguration(value); return *this;} |
175 | |
176 | |
177 | inline PutBucketReplicationRequest& WithReplicationConfiguration(ReplicationConfiguration&& value) { SetReplicationConfiguration(std::move(value)); return *this;} |
178 | |
179 | |
180 | /** |
181 | * <p/> |
182 | */ |
183 | inline const Aws::String& GetToken() const{ return m_token; } |
184 | |
185 | /** |
186 | * <p/> |
187 | */ |
188 | inline bool TokenHasBeenSet() const { return m_tokenHasBeenSet; } |
189 | |
190 | /** |
191 | * <p/> |
192 | */ |
193 | inline void SetToken(const Aws::String& value) { m_tokenHasBeenSet = true; m_token = value; } |
194 | |
195 | /** |
196 | * <p/> |
197 | */ |
198 | inline void SetToken(Aws::String&& value) { m_tokenHasBeenSet = true; m_token = std::move(value); } |
199 | |
200 | /** |
201 | * <p/> |
202 | */ |
203 | inline void SetToken(const char* value) { m_tokenHasBeenSet = true; m_token.assign(value); } |
204 | |
205 | /** |
206 | * <p/> |
207 | */ |
208 | inline PutBucketReplicationRequest& WithToken(const Aws::String& value) { SetToken(value); return *this;} |
209 | |
210 | /** |
211 | * <p/> |
212 | */ |
213 | inline PutBucketReplicationRequest& WithToken(Aws::String&& value) { SetToken(std::move(value)); return *this;} |
214 | |
215 | /** |
216 | * <p/> |
217 | */ |
218 | inline PutBucketReplicationRequest& WithToken(const char* value) { SetToken(value); return *this;} |
219 | |
220 | |
221 | |
222 | inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; } |
223 | |
224 | |
225 | inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; } |
226 | |
227 | |
228 | inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; } |
229 | |
230 | |
231 | inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); } |
232 | |
233 | |
234 | inline PutBucketReplicationRequest& WithCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { SetCustomizedAccessLogTag(value); return *this;} |
235 | |
236 | |
237 | inline PutBucketReplicationRequest& WithCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;} |
238 | |
239 | |
240 | inline PutBucketReplicationRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } |
241 | |
242 | |
243 | inline PutBucketReplicationRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } |
244 | |
245 | |
246 | inline PutBucketReplicationRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } |
247 | |
248 | |
249 | inline PutBucketReplicationRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; } |
250 | |
251 | |
252 | inline PutBucketReplicationRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } |
253 | |
254 | |
255 | inline PutBucketReplicationRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } |
256 | |
257 | |
258 | inline PutBucketReplicationRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } |
259 | |
260 | private: |
261 | |
262 | Aws::String m_bucket; |
263 | bool m_bucketHasBeenSet; |
264 | |
265 | Aws::String m_contentMD5; |
266 | bool m_contentMD5HasBeenSet; |
267 | |
268 | ReplicationConfiguration m_replicationConfiguration; |
269 | bool m_replicationConfigurationHasBeenSet; |
270 | |
271 | Aws::String m_token; |
272 | bool m_tokenHasBeenSet; |
273 | |
274 | Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag; |
275 | bool m_customizedAccessLogTagHasBeenSet; |
276 | }; |
277 | |
278 | } // namespace Model |
279 | } // namespace S3 |
280 | } // namespace Aws |
281 | |