AWS SDK for C++  0.12.9
AWS SDK for C++
PutBucketVersioningRequest.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 
39  inline const Aws::String& GetBucket() const{ return m_bucket; }
40 
41 
42  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
43 
44 
45  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = value; }
46 
47 
48  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
49 
50 
51  inline PutBucketVersioningRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
52 
53 
54  inline PutBucketVersioningRequest& WithBucket(Aws::String&& value) { SetBucket(value); return *this;}
55 
56 
57  inline PutBucketVersioningRequest& WithBucket(const char* value) { SetBucket(value); return *this;}
58 
59 
60  inline const Aws::String& GetContentMD5() const{ return m_contentMD5; }
61 
62 
63  inline void SetContentMD5(const Aws::String& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; }
64 
65 
66  inline void SetContentMD5(Aws::String&& value) { m_contentMD5HasBeenSet = true; m_contentMD5 = value; }
67 
68 
69  inline void SetContentMD5(const char* value) { m_contentMD5HasBeenSet = true; m_contentMD5.assign(value); }
70 
71 
72  inline PutBucketVersioningRequest& WithContentMD5(const Aws::String& value) { SetContentMD5(value); return *this;}
73 
74 
75  inline PutBucketVersioningRequest& WithContentMD5(Aws::String&& value) { SetContentMD5(value); return *this;}
76 
77 
78  inline PutBucketVersioningRequest& WithContentMD5(const char* value) { SetContentMD5(value); return *this;}
79 
84  inline const Aws::String& GetMFA() const{ return m_mFA; }
85 
90  inline void SetMFA(const Aws::String& value) { m_mFAHasBeenSet = true; m_mFA = value; }
91 
96  inline void SetMFA(Aws::String&& value) { m_mFAHasBeenSet = true; m_mFA = value; }
97 
102  inline void SetMFA(const char* value) { m_mFAHasBeenSet = true; m_mFA.assign(value); }
103 
108  inline PutBucketVersioningRequest& WithMFA(const Aws::String& value) { SetMFA(value); return *this;}
109 
114  inline PutBucketVersioningRequest& WithMFA(Aws::String&& value) { SetMFA(value); return *this;}
115 
120  inline PutBucketVersioningRequest& WithMFA(const char* value) { SetMFA(value); return *this;}
121 
122 
123  inline const VersioningConfiguration& GetVersioningConfiguration() const{ return m_versioningConfiguration; }
124 
125 
126  inline void SetVersioningConfiguration(const VersioningConfiguration& value) { m_versioningConfigurationHasBeenSet = true; m_versioningConfiguration = value; }
127 
128 
129  inline void SetVersioningConfiguration(VersioningConfiguration&& value) { m_versioningConfigurationHasBeenSet = true; m_versioningConfiguration = value; }
130 
131 
132  inline PutBucketVersioningRequest& WithVersioningConfiguration(const VersioningConfiguration& value) { SetVersioningConfiguration(value); return *this;}
133 
134 
135  inline PutBucketVersioningRequest& WithVersioningConfiguration(VersioningConfiguration&& value) { SetVersioningConfiguration(value); return *this;}
136 
137  private:
138  Aws::String m_bucket;
139  bool m_bucketHasBeenSet;
140  Aws::String m_contentMD5;
141  bool m_contentMD5HasBeenSet;
142  Aws::String m_mFA;
143  bool m_mFAHasBeenSet;
144  VersioningConfiguration m_versioningConfiguration;
145  bool m_versioningConfigurationHasBeenSet;
146  };
147 
148 } // namespace Model
149 } // namespace S3
150 } // namespace Aws
PutBucketVersioningRequest & WithBucket(const char *value)
PutBucketVersioningRequest & WithBucket(const Aws::String &value)
PutBucketVersioningRequest & WithContentMD5(const char *value)
const VersioningConfiguration & GetVersioningConfiguration() const
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
#define AWS_S3_API
Definition: S3_EXPORTS.h:34
PutBucketVersioningRequest & WithContentMD5(Aws::String &&value)
PutBucketVersioningRequest & WithBucket(Aws::String &&value)
void SetVersioningConfiguration(VersioningConfiguration &&value)
PutBucketVersioningRequest & WithContentMD5(const Aws::String &value)
PutBucketVersioningRequest & WithVersioningConfiguration(const VersioningConfiguration &value)
PutBucketVersioningRequest & WithMFA(Aws::String &&value)
PutBucketVersioningRequest & WithMFA(const char *value)
void SetVersioningConfiguration(const VersioningConfiguration &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
PutBucketVersioningRequest & WithVersioningConfiguration(VersioningConfiguration &&value)
PutBucketVersioningRequest & WithMFA(const Aws::String &value)
JSON (JavaScript Object Notation).