1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/core/utils/Array.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Xml
18 {
19   class XmlNode;
20 } // namespace Xml
21 } // namespace Utils
22 namespace EC2
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Describes the storage parameters for Amazon S3 and Amazon S3 buckets for an
29    * instance store-backed AMI.</p><p><h3>See Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/S3Storage">AWS API
31    * Reference</a></p>
32    */
33   class AWS_EC2_API S3Storage
34   {
35   public:
36     S3Storage();
37     S3Storage(const Aws::Utils::Xml::XmlNode& xmlNode);
38     S3Storage& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39 
40     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41     void OutputToStream(Aws::OStream& oStream, const char* location) const;
42 
43 
44     /**
45      * <p>The access key ID of the owner of the bucket. Before you specify a value for
46      * your access key ID, review and follow the guidance in <a
47      * href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html">Best
48      * Practices for Managing Amazon Web Services Access Keys</a>.</p>
49      */
GetAWSAccessKeyId()50     inline const Aws::String& GetAWSAccessKeyId() const{ return m_aWSAccessKeyId; }
51 
52     /**
53      * <p>The access key ID of the owner of the bucket. Before you specify a value for
54      * your access key ID, review and follow the guidance in <a
55      * href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html">Best
56      * Practices for Managing Amazon Web Services Access Keys</a>.</p>
57      */
AWSAccessKeyIdHasBeenSet()58     inline bool AWSAccessKeyIdHasBeenSet() const { return m_aWSAccessKeyIdHasBeenSet; }
59 
60     /**
61      * <p>The access key ID of the owner of the bucket. Before you specify a value for
62      * your access key ID, review and follow the guidance in <a
63      * href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html">Best
64      * Practices for Managing Amazon Web Services Access Keys</a>.</p>
65      */
SetAWSAccessKeyId(const Aws::String & value)66     inline void SetAWSAccessKeyId(const Aws::String& value) { m_aWSAccessKeyIdHasBeenSet = true; m_aWSAccessKeyId = value; }
67 
68     /**
69      * <p>The access key ID of the owner of the bucket. Before you specify a value for
70      * your access key ID, review and follow the guidance in <a
71      * href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html">Best
72      * Practices for Managing Amazon Web Services Access Keys</a>.</p>
73      */
SetAWSAccessKeyId(Aws::String && value)74     inline void SetAWSAccessKeyId(Aws::String&& value) { m_aWSAccessKeyIdHasBeenSet = true; m_aWSAccessKeyId = std::move(value); }
75 
76     /**
77      * <p>The access key ID of the owner of the bucket. Before you specify a value for
78      * your access key ID, review and follow the guidance in <a
79      * href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html">Best
80      * Practices for Managing Amazon Web Services Access Keys</a>.</p>
81      */
SetAWSAccessKeyId(const char * value)82     inline void SetAWSAccessKeyId(const char* value) { m_aWSAccessKeyIdHasBeenSet = true; m_aWSAccessKeyId.assign(value); }
83 
84     /**
85      * <p>The access key ID of the owner of the bucket. Before you specify a value for
86      * your access key ID, review and follow the guidance in <a
87      * href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html">Best
88      * Practices for Managing Amazon Web Services Access Keys</a>.</p>
89      */
WithAWSAccessKeyId(const Aws::String & value)90     inline S3Storage& WithAWSAccessKeyId(const Aws::String& value) { SetAWSAccessKeyId(value); return *this;}
91 
92     /**
93      * <p>The access key ID of the owner of the bucket. Before you specify a value for
94      * your access key ID, review and follow the guidance in <a
95      * href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html">Best
96      * Practices for Managing Amazon Web Services Access Keys</a>.</p>
97      */
WithAWSAccessKeyId(Aws::String && value)98     inline S3Storage& WithAWSAccessKeyId(Aws::String&& value) { SetAWSAccessKeyId(std::move(value)); return *this;}
99 
100     /**
101      * <p>The access key ID of the owner of the bucket. Before you specify a value for
102      * your access key ID, review and follow the guidance in <a
103      * href="https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html">Best
104      * Practices for Managing Amazon Web Services Access Keys</a>.</p>
105      */
WithAWSAccessKeyId(const char * value)106     inline S3Storage& WithAWSAccessKeyId(const char* value) { SetAWSAccessKeyId(value); return *this;}
107 
108 
109     /**
110      * <p>The bucket in which to store the AMI. You can specify a bucket that you
111      * already own or a new bucket that Amazon EC2 creates on your behalf. If you
112      * specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
113      */
GetBucket()114     inline const Aws::String& GetBucket() const{ return m_bucket; }
115 
116     /**
117      * <p>The bucket in which to store the AMI. You can specify a bucket that you
118      * already own or a new bucket that Amazon EC2 creates on your behalf. If you
119      * specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
120      */
BucketHasBeenSet()121     inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
122 
123     /**
124      * <p>The bucket in which to store the AMI. You can specify a bucket that you
125      * already own or a new bucket that Amazon EC2 creates on your behalf. If you
126      * specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
127      */
SetBucket(const Aws::String & value)128     inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
129 
130     /**
131      * <p>The bucket in which to store the AMI. You can specify a bucket that you
132      * already own or a new bucket that Amazon EC2 creates on your behalf. If you
133      * specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
134      */
SetBucket(Aws::String && value)135     inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
136 
137     /**
138      * <p>The bucket in which to store the AMI. You can specify a bucket that you
139      * already own or a new bucket that Amazon EC2 creates on your behalf. If you
140      * specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
141      */
SetBucket(const char * value)142     inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
143 
144     /**
145      * <p>The bucket in which to store the AMI. You can specify a bucket that you
146      * already own or a new bucket that Amazon EC2 creates on your behalf. If you
147      * specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
148      */
WithBucket(const Aws::String & value)149     inline S3Storage& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
150 
151     /**
152      * <p>The bucket in which to store the AMI. You can specify a bucket that you
153      * already own or a new bucket that Amazon EC2 creates on your behalf. If you
154      * specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
155      */
WithBucket(Aws::String && value)156     inline S3Storage& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
157 
158     /**
159      * <p>The bucket in which to store the AMI. You can specify a bucket that you
160      * already own or a new bucket that Amazon EC2 creates on your behalf. If you
161      * specify a bucket that belongs to someone else, Amazon EC2 returns an error.</p>
162      */
WithBucket(const char * value)163     inline S3Storage& WithBucket(const char* value) { SetBucket(value); return *this;}
164 
165 
166     /**
167      * <p>The beginning of the file name of the AMI.</p>
168      */
GetPrefix()169     inline const Aws::String& GetPrefix() const{ return m_prefix; }
170 
171     /**
172      * <p>The beginning of the file name of the AMI.</p>
173      */
PrefixHasBeenSet()174     inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; }
175 
176     /**
177      * <p>The beginning of the file name of the AMI.</p>
178      */
SetPrefix(const Aws::String & value)179     inline void SetPrefix(const Aws::String& value) { m_prefixHasBeenSet = true; m_prefix = value; }
180 
181     /**
182      * <p>The beginning of the file name of the AMI.</p>
183      */
SetPrefix(Aws::String && value)184     inline void SetPrefix(Aws::String&& value) { m_prefixHasBeenSet = true; m_prefix = std::move(value); }
185 
186     /**
187      * <p>The beginning of the file name of the AMI.</p>
188      */
SetPrefix(const char * value)189     inline void SetPrefix(const char* value) { m_prefixHasBeenSet = true; m_prefix.assign(value); }
190 
191     /**
192      * <p>The beginning of the file name of the AMI.</p>
193      */
WithPrefix(const Aws::String & value)194     inline S3Storage& WithPrefix(const Aws::String& value) { SetPrefix(value); return *this;}
195 
196     /**
197      * <p>The beginning of the file name of the AMI.</p>
198      */
WithPrefix(Aws::String && value)199     inline S3Storage& WithPrefix(Aws::String&& value) { SetPrefix(std::move(value)); return *this;}
200 
201     /**
202      * <p>The beginning of the file name of the AMI.</p>
203      */
WithPrefix(const char * value)204     inline S3Storage& WithPrefix(const char* value) { SetPrefix(value); return *this;}
205 
206 
207     /**
208      * <p>An Amazon S3 upload policy that gives Amazon EC2 permission to upload items
209      * into Amazon S3 on your behalf.</p>
210      */
GetUploadPolicy()211     inline const Aws::Utils::ByteBuffer& GetUploadPolicy() const{ return m_uploadPolicy; }
212 
213     /**
214      * <p>An Amazon S3 upload policy that gives Amazon EC2 permission to upload items
215      * into Amazon S3 on your behalf.</p>
216      */
UploadPolicyHasBeenSet()217     inline bool UploadPolicyHasBeenSet() const { return m_uploadPolicyHasBeenSet; }
218 
219     /**
220      * <p>An Amazon S3 upload policy that gives Amazon EC2 permission to upload items
221      * into Amazon S3 on your behalf.</p>
222      */
SetUploadPolicy(const Aws::Utils::ByteBuffer & value)223     inline void SetUploadPolicy(const Aws::Utils::ByteBuffer& value) { m_uploadPolicyHasBeenSet = true; m_uploadPolicy = value; }
224 
225     /**
226      * <p>An Amazon S3 upload policy that gives Amazon EC2 permission to upload items
227      * into Amazon S3 on your behalf.</p>
228      */
SetUploadPolicy(Aws::Utils::ByteBuffer && value)229     inline void SetUploadPolicy(Aws::Utils::ByteBuffer&& value) { m_uploadPolicyHasBeenSet = true; m_uploadPolicy = std::move(value); }
230 
231     /**
232      * <p>An Amazon S3 upload policy that gives Amazon EC2 permission to upload items
233      * into Amazon S3 on your behalf.</p>
234      */
WithUploadPolicy(const Aws::Utils::ByteBuffer & value)235     inline S3Storage& WithUploadPolicy(const Aws::Utils::ByteBuffer& value) { SetUploadPolicy(value); return *this;}
236 
237     /**
238      * <p>An Amazon S3 upload policy that gives Amazon EC2 permission to upload items
239      * into Amazon S3 on your behalf.</p>
240      */
WithUploadPolicy(Aws::Utils::ByteBuffer && value)241     inline S3Storage& WithUploadPolicy(Aws::Utils::ByteBuffer&& value) { SetUploadPolicy(std::move(value)); return *this;}
242 
243 
244     /**
245      * <p>The signature of the JSON document.</p>
246      */
GetUploadPolicySignature()247     inline const Aws::String& GetUploadPolicySignature() const{ return m_uploadPolicySignature; }
248 
249     /**
250      * <p>The signature of the JSON document.</p>
251      */
UploadPolicySignatureHasBeenSet()252     inline bool UploadPolicySignatureHasBeenSet() const { return m_uploadPolicySignatureHasBeenSet; }
253 
254     /**
255      * <p>The signature of the JSON document.</p>
256      */
SetUploadPolicySignature(const Aws::String & value)257     inline void SetUploadPolicySignature(const Aws::String& value) { m_uploadPolicySignatureHasBeenSet = true; m_uploadPolicySignature = value; }
258 
259     /**
260      * <p>The signature of the JSON document.</p>
261      */
SetUploadPolicySignature(Aws::String && value)262     inline void SetUploadPolicySignature(Aws::String&& value) { m_uploadPolicySignatureHasBeenSet = true; m_uploadPolicySignature = std::move(value); }
263 
264     /**
265      * <p>The signature of the JSON document.</p>
266      */
SetUploadPolicySignature(const char * value)267     inline void SetUploadPolicySignature(const char* value) { m_uploadPolicySignatureHasBeenSet = true; m_uploadPolicySignature.assign(value); }
268 
269     /**
270      * <p>The signature of the JSON document.</p>
271      */
WithUploadPolicySignature(const Aws::String & value)272     inline S3Storage& WithUploadPolicySignature(const Aws::String& value) { SetUploadPolicySignature(value); return *this;}
273 
274     /**
275      * <p>The signature of the JSON document.</p>
276      */
WithUploadPolicySignature(Aws::String && value)277     inline S3Storage& WithUploadPolicySignature(Aws::String&& value) { SetUploadPolicySignature(std::move(value)); return *this;}
278 
279     /**
280      * <p>The signature of the JSON document.</p>
281      */
WithUploadPolicySignature(const char * value)282     inline S3Storage& WithUploadPolicySignature(const char* value) { SetUploadPolicySignature(value); return *this;}
283 
284   private:
285 
286     Aws::String m_aWSAccessKeyId;
287     bool m_aWSAccessKeyIdHasBeenSet;
288 
289     Aws::String m_bucket;
290     bool m_bucketHasBeenSet;
291 
292     Aws::String m_prefix;
293     bool m_prefixHasBeenSet;
294 
295     Aws::Utils::ByteBuffer m_uploadPolicy;
296     bool m_uploadPolicyHasBeenSet;
297 
298     Aws::String m_uploadPolicySignature;
299     bool m_uploadPolicySignatureHasBeenSet;
300   };
301 
302 } // namespace Model
303 } // namespace EC2
304 } // namespace Aws
305