AWS SDK for C++  0.14.3
AWS SDK for C++
PutObjectAclRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 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 #pragma once
16 #include <aws/s3/S3_EXPORTS.h>
17 #include <aws/s3/S3Request.h>
22 
23 namespace Aws
24 {
25 namespace Http
26 {
27  class URI;
28 } //namespace Http
29 namespace S3
30 {
31 namespace Model
32 {
33 
37  {
38  public:
40  Aws::String SerializePayload() const override;
41 
42  void AddQueryStringParameters(Aws::Http::URI& uri) const override;
43 
44  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
45 
49  inline const ObjectCannedACL& GetACL() const{ return m_aCL; }
50 
54  inline void SetACL(const ObjectCannedACL& value) { m_aCLHasBeenSet = true; m_aCL = value; }
55 
59  inline void SetACL(ObjectCannedACL&& value) { m_aCLHasBeenSet = true; m_aCL = value; }
60 
64  inline PutObjectAclRequest& WithACL(const ObjectCannedACL& value) { SetACL(value); return *this;}
65 
69  inline PutObjectAclRequest& WithACL(ObjectCannedACL&& value) { SetACL(value); return *this;}
70 
71 
72  inline const AccessControlPolicy& GetAccessControlPolicy() const{ return m_accessControlPolicy; }
73 
74 
75  inline void SetAccessControlPolicy(const AccessControlPolicy& value) { m_accessControlPolicyHasBeenSet = true; m_accessControlPolicy = value; }
76 
77 
78  inline void SetAccessControlPolicy(AccessControlPolicy&& value) { m_accessControlPolicyHasBeenSet = true; m_accessControlPolicy = value; }
79 
80 
81  inline PutObjectAclRequest& WithAccessControlPolicy(const AccessControlPolicy& value) { SetAccessControlPolicy(value); return *this;}
82 
83 
84  inline PutObjectAclRequest& WithAccessControlPolicy(AccessControlPolicy&& value) { SetAccessControlPolicy(value); return *this;}
85 
86 
87  inline const Aws::String& GetBucket() const{ return m_bucket; }
88 
89 
90  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
91 
92 
93  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = value; }
94 
95 
96  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
97 
98 
99  inline PutObjectAclRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
100 
101 
102  inline PutObjectAclRequest& WithBucket(Aws::String&& value) { SetBucket(value); return *this;}
103 
104 
105  inline PutObjectAclRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
106 
107 
108  inline const Aws::String& GetContentMD5() const{ return m_contentMD5; }
109 
110 
111  inline void SetContentMD5(const Aws::String& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; }
112 
113 
114  inline void SetContentMD5(Aws::String&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; }
115 
116 
117  inline void SetContentMD5(const char* value) { m_contentMD5HasBeenSet = true; m_contentMD5.assign(value); }
118 
119 
120  inline PutObjectAclRequest& WithContentMD5(const Aws::String& value) { SetContentMD5(value); return *this;}
121 
122 
123  inline PutObjectAclRequest& WithContentMD5(Aws::String&& value) { SetContentMD5(value); return *this;}
124 
125 
126  inline PutObjectAclRequest& WithContentMD5(const char* value) { SetContentMD5(value); return *this;}
127 
132  inline const Aws::String& GetGrantFullControl() const{ return m_grantFullControl; }
133 
138  inline void SetGrantFullControl(const Aws::String& value) { m_grantFullControlHasBeenSet = true; m_grantFullControl = value; }
139 
144  inline void SetGrantFullControl(Aws::String&& value) { m_grantFullControlHasBeenSet = true; m_grantFullControl = value; }
145 
150  inline void SetGrantFullControl(const char* value) { m_grantFullControlHasBeenSet = true; m_grantFullControl.assign(value); }
151 
156  inline PutObjectAclRequest& WithGrantFullControl(const Aws::String& value) { SetGrantFullControl(value); return *this;}
157 
162  inline PutObjectAclRequest& WithGrantFullControl(Aws::String&& value) { SetGrantFullControl(value); return *this;}
163 
168  inline PutObjectAclRequest& WithGrantFullControl(const char* value) { SetGrantFullControl(value); return *this;}
169 
173  inline const Aws::String& GetGrantRead() const{ return m_grantRead; }
174 
178  inline void SetGrantRead(const Aws::String& value) { m_grantReadHasBeenSet = true; m_grantRead = value; }
179 
183  inline void SetGrantRead(Aws::String&& value) { m_grantReadHasBeenSet = true; m_grantRead = value; }
184 
188  inline void SetGrantRead(const char* value) { m_grantReadHasBeenSet = true; m_grantRead.assign(value); }
189 
193  inline PutObjectAclRequest& WithGrantRead(const Aws::String& value) { SetGrantRead(value); return *this;}
194 
198  inline PutObjectAclRequest& WithGrantRead(Aws::String&& value) { SetGrantRead(value); return *this;}
199 
203  inline PutObjectAclRequest& WithGrantRead(const char* value) { SetGrantRead(value); return *this;}
204 
208  inline const Aws::String& GetGrantReadACP() const{ return m_grantReadACP; }
209 
213  inline void SetGrantReadACP(const Aws::String& value) { m_grantReadACPHasBeenSet = true; m_grantReadACP = value; }
214 
218  inline void SetGrantReadACP(Aws::String&& value) { m_grantReadACPHasBeenSet = true; m_grantReadACP = value; }
219 
223  inline void SetGrantReadACP(const char* value) { m_grantReadACPHasBeenSet = true; m_grantReadACP.assign(value); }
224 
228  inline PutObjectAclRequest& WithGrantReadACP(const Aws::String& value) { SetGrantReadACP(value); return *this;}
229 
233  inline PutObjectAclRequest& WithGrantReadACP(Aws::String&& value) { SetGrantReadACP(value); return *this;}
234 
238  inline PutObjectAclRequest& WithGrantReadACP(const char* value) { SetGrantReadACP(value); return *this;}
239 
243  inline const Aws::String& GetGrantWrite() const{ return m_grantWrite; }
244 
248  inline void SetGrantWrite(const Aws::String& value) { m_grantWriteHasBeenSet = true; m_grantWrite = value; }
249 
253  inline void SetGrantWrite(Aws::String&& value) { m_grantWriteHasBeenSet = true; m_grantWrite = value; }
254 
258  inline void SetGrantWrite(const char* value) { m_grantWriteHasBeenSet = true; m_grantWrite.assign(value); }
259 
263  inline PutObjectAclRequest& WithGrantWrite(const Aws::String& value) { SetGrantWrite(value); return *this;}
264 
268  inline PutObjectAclRequest& WithGrantWrite(Aws::String&& value) { SetGrantWrite(value); return *this;}
269 
273  inline PutObjectAclRequest& WithGrantWrite(const char* value) { SetGrantWrite(value); return *this;}
274 
278  inline const Aws::String& GetGrantWriteACP() const{ return m_grantWriteACP; }
279 
283  inline void SetGrantWriteACP(const Aws::String& value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP = value; }
284 
288  inline void SetGrantWriteACP(Aws::String&& value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP = value; }
289 
293  inline void SetGrantWriteACP(const char* value) { m_grantWriteACPHasBeenSet = true; m_grantWriteACP.assign(value); }
294 
298  inline PutObjectAclRequest& WithGrantWriteACP(const Aws::String& value) { SetGrantWriteACP(value); return *this;}
299 
303  inline PutObjectAclRequest& WithGrantWriteACP(Aws::String&& value) { SetGrantWriteACP(value); return *this;}
304 
308  inline PutObjectAclRequest& WithGrantWriteACP(const char* value) { SetGrantWriteACP(value); return *this;}
309 
310 
311  inline const Aws::String& GetKey() const{ return m_key; }
312 
313 
314  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
315 
316 
317  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = value; }
318 
319 
320  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
321 
322 
323  inline PutObjectAclRequest& WithKey(const Aws::String& value) { SetKey(value); return *this;}
324 
325 
326  inline PutObjectAclRequest& WithKey(Aws::String&& value) { SetKey(value); return *this;}
327 
328 
329  inline PutObjectAclRequest& WithKey(const char* value) { SetKey(value); return *this;}
330 
331 
332  inline const RequestPayer& GetRequestPayer() const{ return m_requestPayer; }
333 
334 
335  inline void SetRequestPayer(const RequestPayer& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
336 
337 
338  inline void SetRequestPayer(RequestPayer&& value) { m_requestPayerHasBeenSet = true; m_requestPayer = value; }
339 
340 
341  inline PutObjectAclRequest& WithRequestPayer(const RequestPayer& value) { SetRequestPayer(value); return *this;}
342 
343 
344  inline PutObjectAclRequest& WithRequestPayer(RequestPayer&& value) { SetRequestPayer(value); return *this;}
345 
349  inline const Aws::String& GetVersionId() const{ return m_versionId; }
350 
354  inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
355 
359  inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
360 
364  inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
365 
369  inline PutObjectAclRequest& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
370 
374  inline PutObjectAclRequest& WithVersionId(Aws::String&& value) { SetVersionId(value); return *this;}
375 
379  inline PutObjectAclRequest& WithVersionId(const char* value) { SetVersionId(value); return *this;}
380 
381  private:
382  ObjectCannedACL m_aCL;
383  bool m_aCLHasBeenSet;
384  AccessControlPolicy m_accessControlPolicy;
385  bool m_accessControlPolicyHasBeenSet;
386  Aws::String m_bucket;
387  bool m_bucketHasBeenSet;
388  Aws::String m_contentMD5;
389  bool m_contentMD5HasBeenSet;
390  Aws::String m_grantFullControl;
391  bool m_grantFullControlHasBeenSet;
392  Aws::String m_grantRead;
393  bool m_grantReadHasBeenSet;
394  Aws::String m_grantReadACP;
395  bool m_grantReadACPHasBeenSet;
396  Aws::String m_grantWrite;
397  bool m_grantWriteHasBeenSet;
398  Aws::String m_grantWriteACP;
399  bool m_grantWriteACPHasBeenSet;
400  Aws::String m_key;
401  bool m_keyHasBeenSet;
402  RequestPayer m_requestPayer;
403  bool m_requestPayerHasBeenSet;
404  Aws::String m_versionId;
405  bool m_versionIdHasBeenSet;
406  };
407 
408 } // namespace Model
409 } // namespace S3
410 } // namespace Aws
PutObjectAclRequest & WithKey(const char *value)
PutObjectAclRequest & WithGrantWriteACP(const Aws::String &value)
void SetKey(const Aws::String &value)
PutObjectAclRequest & WithVersionId(const char *value)
void SetVersionId(const Aws::String &value)
const Aws::String & GetGrantWriteACP() const
PutObjectAclRequest & WithBucket(const Aws::String &value)
PutObjectAclRequest & WithRequestPayer(RequestPayer &&value)
const Aws::String & GetBucket() const
PutObjectAclRequest & WithGrantRead(Aws::String &&value)
const Aws::String & GetVersionId() const
const Aws::String & GetKey() const
void SetGrantWrite(const Aws::String &value)
const ObjectCannedACL & GetACL() const
PutObjectAclRequest & WithGrantReadACP(Aws::String &&value)
PutObjectAclRequest & WithGrantReadACP(const Aws::String &value)
const Aws::String & GetContentMD5() const
void SetContentMD5(const Aws::String &value)
void SetGrantWriteACP(const char *value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
PutObjectAclRequest & WithGrantWriteACP(const char *value)
#define AWS_S3_API
Definition: S3_EXPORTS.h:37
void SetGrantFullControl(const Aws::String &value)
PutObjectAclRequest & WithGrantFullControl(const Aws::String &value)
void SetGrantFullControl(Aws::String &&value)
void SetRequestPayer(RequestPayer &&value)
void SetRequestPayer(const RequestPayer &value)
PutObjectAclRequest & WithGrantWrite(const char *value)
void SetGrantReadACP(const Aws::String &value)
void SetBucket(const Aws::String &value)
void SetAccessControlPolicy(AccessControlPolicy &&value)
PutObjectAclRequest & WithVersionId(Aws::String &&value)
PutObjectAclRequest & WithContentMD5(const Aws::String &value)
PutObjectAclRequest & WithGrantReadACP(const char *value)
const Aws::String & GetGrantRead() const
PutObjectAclRequest & WithAccessControlPolicy(AccessControlPolicy &&value)
void SetACL(ObjectCannedACL &&value)
PutObjectAclRequest & WithGrantWrite(const Aws::String &value)
void SetGrantReadACP(Aws::String &&value)
void SetContentMD5(Aws::String &&value)
PutObjectAclRequest & WithKey(const Aws::String &value)
PutObjectAclRequest & WithGrantRead(const Aws::String &value)
const Aws::String & GetGrantWrite() const
void SetGrantWriteACP(Aws::String &&value)
PutObjectAclRequest & WithAccessControlPolicy(const AccessControlPolicy &value)
void SetGrantRead(Aws::String &&value)
void SetGrantFullControl(const char *value)
PutObjectAclRequest & WithACL(const ObjectCannedACL &value)
const RequestPayer & GetRequestPayer() const
PutObjectAclRequest & WithGrantWrite(Aws::String &&value)
void SetACL(const ObjectCannedACL &value)
PutObjectAclRequest & WithGrantWriteACP(Aws::String &&value)
PutObjectAclRequest & WithACL(ObjectCannedACL &&value)
PutObjectAclRequest & WithContentMD5(Aws::String &&value)
PutObjectAclRequest & WithVersionId(const Aws::String &value)
PutObjectAclRequest & WithBucket(Aws::String &&value)
const Aws::String & GetGrantReadACP() const
PutObjectAclRequest & WithRequestPayer(const RequestPayer &value)
const Aws::String & GetGrantFullControl() const
PutObjectAclRequest & WithGrantFullControl(Aws::String &&value)
void SetGrantRead(const Aws::String &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
PutObjectAclRequest & WithGrantRead(const char *value)
void SetBucket(Aws::String &&value)
PutObjectAclRequest & WithKey(Aws::String &&value)
void SetVersionId(Aws::String &&value)
void SetGrantWrite(Aws::String &&value)
void SetGrantWriteACP(const Aws::String &value)
PutObjectAclRequest & WithBucket(const char *value)
PutObjectAclRequest & WithGrantFullControl(const char *value)
void SetAccessControlPolicy(const AccessControlPolicy &value)
PutObjectAclRequest & WithContentMD5(const char *value)
JSON (JavaScript Object Notation).
const AccessControlPolicy & GetAccessControlPolicy() const