AWS SDK for C++  0.12.9
AWS SDK for C++
PutBucketPolicyRequest.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>
19 
20 namespace Aws
21 {
22 namespace S3
23 {
24 namespace Model
25 {
26 
30  {
31  public:
33  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
34 
35  inline bool ShouldComputeContentMd5() const override { return true; }
36 
37 
38  inline const Aws::String& GetBucket() const{ return m_bucket; }
39 
40 
41  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
42 
43 
44  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = value; }
45 
46 
47  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
48 
49 
50  inline PutBucketPolicyRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
51 
52 
53  inline PutBucketPolicyRequest& WithBucket(Aws::String&& value) { SetBucket(value); return *this;}
54 
55 
56  inline PutBucketPolicyRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
57 
58 
59  inline const Aws::String& GetContentMD5() const{ return m_contentMD5; }
60 
61 
62  inline void SetContentMD5(const Aws::String& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; }
63 
64 
65  inline void SetContentMD5(Aws::String&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; }
66 
67 
68  inline void SetContentMD5(const char* value) { m_contentMD5HasBeenSet = true; m_contentMD5.assign(value); }
69 
70 
71  inline PutBucketPolicyRequest& WithContentMD5(const Aws::String& value) { SetContentMD5(value); return *this;}
72 
73 
74  inline PutBucketPolicyRequest& WithContentMD5(Aws::String&& value) { SetContentMD5(value); return *this;}
75 
76 
77  inline PutBucketPolicyRequest& WithContentMD5(const char* value) { SetContentMD5(value); return *this;}
78 
79  private:
80  Aws::String m_bucket;
81  bool m_bucketHasBeenSet;
82  Aws::String m_contentMD5;
83  bool m_contentMD5HasBeenSet;
84  };
85 
86 } // namespace Model
87 } // namespace S3
88 } // namespace Aws
PutBucketPolicyRequest & WithBucket(const Aws::String &value)
PutBucketPolicyRequest & WithBucket(const char *value)
PutBucketPolicyRequest & WithContentMD5(const char *value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
#define AWS_S3_API
Definition: S3_EXPORTS.h:34
PutBucketPolicyRequest & WithContentMD5(Aws::String &&value)
void SetBucket(const Aws::String &value)
PutBucketPolicyRequest & WithBucket(Aws::String &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetContentMD5(const Aws::String &value)
const Aws::String & GetContentMD5() const
PutBucketPolicyRequest & WithContentMD5(const Aws::String &value)
JSON (JavaScript Object Notation).