AWS SDK for C++  0.12.9
AWS SDK for C++
S3Storage.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/ec2/EC2_EXPORTS.h>
19 #include <aws/core/utils/Array.h>
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace EC2
31 {
32 namespace Model
33 {
34 
40  {
41  public:
42  S3Storage();
43  S3Storage(const Aws::Utils::Xml::XmlNode& xmlNode);
44  S3Storage& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45 
46  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47  void OutputToStream(Aws::OStream& oStream, const char* location) const;
48 
54  inline const Aws::String& GetBucket() const{ return m_bucket; }
55 
61  inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
62 
68  inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = value; }
69 
75  inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
76 
82  inline S3Storage& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
83 
89  inline S3Storage& WithBucket(Aws::String&& value) { SetBucket(value); return *this;}
90 
96  inline S3Storage& WithBucket(const char* value) { SetBucket(value); return *this;}
97 
101  inline const Aws::String& GetPrefix() const{ return m_prefix; }
102 
106  inline void SetPrefix(const Aws::String& value) { m_prefixHasBeenSet = true; m_prefix = value; }
107 
111  inline void SetPrefix(Aws::String&& value) { m_prefixHasBeenSet = true; m_prefix = value; }
112 
116  inline void SetPrefix(const char* value) { m_prefixHasBeenSet = true; m_prefix.assign(value); }
117 
121  inline S3Storage& WithPrefix(const Aws::String& value) { SetPrefix(value); return *this;}
122 
126  inline S3Storage& WithPrefix(Aws::String&& value) { SetPrefix(value); return *this;}
127 
131  inline S3Storage& WithPrefix(const char* value) { SetPrefix(value); return *this;}
132 
139  inline const Aws::String& GetAWSAccessKeyId() const{ return m_aWSAccessKeyId; }
140 
147  inline void SetAWSAccessKeyId(const Aws::String& value) { m_aWSAccessKeyIdHasBeenSet = true; m_aWSAccessKeyId = value; }
148 
155  inline void SetAWSAccessKeyId(Aws::String&& value) { m_aWSAccessKeyIdHasBeenSet = true; m_aWSAccessKeyId = value; }
156 
163  inline void SetAWSAccessKeyId(const char* value) { m_aWSAccessKeyIdHasBeenSet = true; m_aWSAccessKeyId.assign(value); }
164 
171  inline S3Storage& WithAWSAccessKeyId(const Aws::String& value) { SetAWSAccessKeyId(value); return *this;}
172 
179  inline S3Storage& WithAWSAccessKeyId(Aws::String&& value) { SetAWSAccessKeyId(value); return *this;}
180 
187  inline S3Storage& WithAWSAccessKeyId(const char* value) { SetAWSAccessKeyId(value); return *this;}
188 
194  inline const Aws::Utils::ByteBuffer& GetUploadPolicy() const{ return m_uploadPolicy; }
195 
201  inline void SetUploadPolicy(const Aws::Utils::ByteBuffer& value) { m_uploadPolicyHasBeenSet = true; m_uploadPolicy = value; }
202 
208  inline void SetUploadPolicy(Aws::Utils::ByteBuffer&& value) { m_uploadPolicyHasBeenSet = true; m_uploadPolicy = value; }
209 
215  inline S3Storage& WithUploadPolicy(const Aws::Utils::ByteBuffer& value) { SetUploadPolicy(value); return *this;}
216 
222  inline S3Storage& WithUploadPolicy(Aws::Utils::ByteBuffer&& value) { SetUploadPolicy(value); return *this;}
223 
227  inline const Aws::String& GetUploadPolicySignature() const{ return m_uploadPolicySignature; }
228 
232  inline void SetUploadPolicySignature(const Aws::String& value) { m_uploadPolicySignatureHasBeenSet = true; m_uploadPolicySignature = value; }
233 
237  inline void SetUploadPolicySignature(Aws::String&& value) { m_uploadPolicySignatureHasBeenSet = true; m_uploadPolicySignature = value; }
238 
242  inline void SetUploadPolicySignature(const char* value) { m_uploadPolicySignatureHasBeenSet = true; m_uploadPolicySignature.assign(value); }
243 
247  inline S3Storage& WithUploadPolicySignature(const Aws::String& value) { SetUploadPolicySignature(value); return *this;}
248 
252  inline S3Storage& WithUploadPolicySignature(Aws::String&& value) { SetUploadPolicySignature(value); return *this;}
253 
257  inline S3Storage& WithUploadPolicySignature(const char* value) { SetUploadPolicySignature(value); return *this;}
258 
259  private:
260  Aws::String m_bucket;
261  bool m_bucketHasBeenSet;
262  Aws::String m_prefix;
263  bool m_prefixHasBeenSet;
264  Aws::String m_aWSAccessKeyId;
265  bool m_aWSAccessKeyIdHasBeenSet;
266  Aws::Utils::ByteBuffer m_uploadPolicy;
267  bool m_uploadPolicyHasBeenSet;
268  Aws::String m_uploadPolicySignature;
269  bool m_uploadPolicySignatureHasBeenSet;
270  };
271 
272 } // namespace Model
273 } // namespace EC2
274 } // namespace Aws
void SetBucket(Aws::String &&value)
Definition: S3Storage.h:68
void SetUploadPolicySignature(const Aws::String &value)
Definition: S3Storage.h:232
void SetPrefix(const char *value)
Definition: S3Storage.h:116
S3Storage & WithAWSAccessKeyId(const Aws::String &value)
Definition: S3Storage.h:171
void SetAWSAccessKeyId(const Aws::String &value)
Definition: S3Storage.h:147
S3Storage & WithPrefix(const Aws::String &value)
Definition: S3Storage.h:121
S3Storage & WithPrefix(Aws::String &&value)
Definition: S3Storage.h:126
S3Storage & WithUploadPolicySignature(const char *value)
Definition: S3Storage.h:257
void SetUploadPolicySignature(const char *value)
Definition: S3Storage.h:242
S3Storage & WithAWSAccessKeyId(Aws::String &&value)
Definition: S3Storage.h:179
const Aws::String & GetPrefix() const
Definition: S3Storage.h:101
void SetAWSAccessKeyId(Aws::String &&value)
Definition: S3Storage.h:155
void SetBucket(const Aws::String &value)
Definition: S3Storage.h:61
const Aws::Utils::ByteBuffer & GetUploadPolicy() const
Definition: S3Storage.h:194
const Aws::String & GetAWSAccessKeyId() const
Definition: S3Storage.h:139
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
S3Storage & WithUploadPolicy(Aws::Utils::ByteBuffer &&value)
Definition: S3Storage.h:222
S3Storage & WithAWSAccessKeyId(const char *value)
Definition: S3Storage.h:187
const Aws::String & GetBucket() const
Definition: S3Storage.h:54
void SetUploadPolicySignature(Aws::String &&value)
Definition: S3Storage.h:237
S3Storage & WithBucket(Aws::String &&value)
Definition: S3Storage.h:89
void SetUploadPolicy(Aws::Utils::ByteBuffer &&value)
Definition: S3Storage.h:208
S3Storage & WithUploadPolicySignature(Aws::String &&value)
Definition: S3Storage.h:252
S3Storage & WithBucket(const char *value)
Definition: S3Storage.h:96
S3Storage & WithUploadPolicySignature(const Aws::String &value)
Definition: S3Storage.h:247
S3Storage & WithBucket(const Aws::String &value)
Definition: S3Storage.h:82
const Aws::String & GetUploadPolicySignature() const
Definition: S3Storage.h:227
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
S3Storage & WithUploadPolicy(const Aws::Utils::ByteBuffer &value)
Definition: S3Storage.h:215
void SetBucket(const char *value)
Definition: S3Storage.h:75
void SetAWSAccessKeyId(const char *value)
Definition: S3Storage.h:163
S3Storage & WithPrefix(const char *value)
Definition: S3Storage.h:131
void SetPrefix(Aws::String &&value)
Definition: S3Storage.h:111
void SetPrefix(const Aws::String &value)
Definition: S3Storage.h:106
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
void SetUploadPolicy(const Aws::Utils::ByteBuffer &value)
Definition: S3Storage.h:201
JSON (JavaScript Object Notation).