AWS SDK for C++  0.14.3
AWS SDK for C++
PutBucketCorsRequest.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>
20 
21 namespace Aws
22 {
23 namespace S3
24 {
25 namespace Model
26 {
27 
31  {
32  public:
34  Aws::String SerializePayload() const override;
35 
36  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
37 
38  inline bool ShouldComputeContentMd5() const override { return true; }
39 
40 
41  inline const Aws::String& GetBucket() const{ return m_bucket; }
42 
43 
44  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
45 
46 
47  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = value; }
48 
49 
50  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
51 
52 
53  inline PutBucketCorsRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
54 
55 
56  inline PutBucketCorsRequest& WithBucket(Aws::String&& value) { SetBucket(value); return *this;}
57 
58 
59  inline PutBucketCorsRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
60 
61 
62  inline const CORSConfiguration& GetCORSConfiguration() const{ return m_cORSConfiguration; }
63 
64 
65  inline void SetCORSConfiguration(const CORSConfiguration& value) { m_cORSConfigurationHasBeenSet = true; m_cORSConfiguration = value; }
66 
67 
68  inline void SetCORSConfiguration(CORSConfiguration&& value) { m_cORSConfigurationHasBeenSet = true; m_cORSConfiguration = value; }
69 
70 
71  inline PutBucketCorsRequest& WithCORSConfiguration(const CORSConfiguration& value) { SetCORSConfiguration(value); return *this;}
72 
73 
74  inline PutBucketCorsRequest& WithCORSConfiguration(CORSConfiguration&& value) { SetCORSConfiguration(value); return *this;}
75 
76 
77  inline const Aws::String& GetContentMD5() const{ return m_contentMD5; }
78 
79 
80  inline void SetContentMD5(const Aws::String& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; }
81 
82 
83  inline void SetContentMD5(Aws::String&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; }
84 
85 
86  inline void SetContentMD5(const char* value) { m_contentMD5HasBeenSet = true; m_contentMD5.assign(value); }
87 
88 
89  inline PutBucketCorsRequest& WithContentMD5(const Aws::String& value) { SetContentMD5(value); return *this;}
90 
91 
92  inline PutBucketCorsRequest& WithContentMD5(Aws::String&& value) { SetContentMD5(value); return *this;}
93 
94 
95  inline PutBucketCorsRequest& WithContentMD5(const char* value) { SetContentMD5(value); return *this;}
96 
97  private:
98  Aws::String m_bucket;
99  bool m_bucketHasBeenSet;
100  CORSConfiguration m_cORSConfiguration;
101  bool m_cORSConfigurationHasBeenSet;
102  Aws::String m_contentMD5;
103  bool m_contentMD5HasBeenSet;
104  };
105 
106 } // namespace Model
107 } // namespace S3
108 } // namespace Aws
PutBucketCorsRequest & WithBucket(Aws::String &&value)
PutBucketCorsRequest & WithBucket(const char *value)
const CORSConfiguration & GetCORSConfiguration() const
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
#define AWS_S3_API
Definition: S3_EXPORTS.h:37
void SetContentMD5(const Aws::String &value)
const Aws::String & GetContentMD5() const
const Aws::String & GetBucket() const
void SetCORSConfiguration(const CORSConfiguration &value)
PutBucketCorsRequest & WithBucket(const Aws::String &value)
void SetBucket(const Aws::String &value)
PutBucketCorsRequest & WithContentMD5(const Aws::String &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetCORSConfiguration(CORSConfiguration &&value)
PutBucketCorsRequest & WithContentMD5(Aws::String &&value)
void SetContentMD5(Aws::String &&value)
PutBucketCorsRequest & WithCORSConfiguration(const CORSConfiguration &value)
PutBucketCorsRequest & WithCORSConfiguration(CORSConfiguration &&value)
PutBucketCorsRequest & WithContentMD5(const char *value)
JSON (JavaScript Object Notation).