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/s3control/S3Control_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/s3control/model/NetworkOrigin.h>
10 #include <aws/s3control/model/VpcConfiguration.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 S3Control
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>An access point used to access a bucket.</p><p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/AccessPoint">AWS
30    * API Reference</a></p>
31    */
32   class AWS_S3CONTROL_API AccessPoint
33   {
34   public:
35     AccessPoint();
36     AccessPoint(const Aws::Utils::Xml::XmlNode& xmlNode);
37     AccessPoint& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
38 
39     void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
40 
41 
42     /**
43      * <p>The name of this access point.</p>
44      */
GetName()45     inline const Aws::String& GetName() const{ return m_name; }
46 
47     /**
48      * <p>The name of this access point.</p>
49      */
NameHasBeenSet()50     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
51 
52     /**
53      * <p>The name of this access point.</p>
54      */
SetName(const Aws::String & value)55     inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
56 
57     /**
58      * <p>The name of this access point.</p>
59      */
SetName(Aws::String && value)60     inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
61 
62     /**
63      * <p>The name of this access point.</p>
64      */
SetName(const char * value)65     inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
66 
67     /**
68      * <p>The name of this access point.</p>
69      */
WithName(const Aws::String & value)70     inline AccessPoint& WithName(const Aws::String& value) { SetName(value); return *this;}
71 
72     /**
73      * <p>The name of this access point.</p>
74      */
WithName(Aws::String && value)75     inline AccessPoint& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
76 
77     /**
78      * <p>The name of this access point.</p>
79      */
WithName(const char * value)80     inline AccessPoint& WithName(const char* value) { SetName(value); return *this;}
81 
82 
83     /**
84      * <p>Indicates whether this access point allows access from the public internet.
85      * If <code>VpcConfiguration</code> is specified for this access point, then
86      * <code>NetworkOrigin</code> is <code>VPC</code>, and the access point doesn't
87      * allow access from the public internet. Otherwise, <code>NetworkOrigin</code> is
88      * <code>Internet</code>, and the access point allows access from the public
89      * internet, subject to the access point and bucket access policies.</p>
90      */
GetNetworkOrigin()91     inline const NetworkOrigin& GetNetworkOrigin() const{ return m_networkOrigin; }
92 
93     /**
94      * <p>Indicates whether this access point allows access from the public internet.
95      * If <code>VpcConfiguration</code> is specified for this access point, then
96      * <code>NetworkOrigin</code> is <code>VPC</code>, and the access point doesn't
97      * allow access from the public internet. Otherwise, <code>NetworkOrigin</code> is
98      * <code>Internet</code>, and the access point allows access from the public
99      * internet, subject to the access point and bucket access policies.</p>
100      */
NetworkOriginHasBeenSet()101     inline bool NetworkOriginHasBeenSet() const { return m_networkOriginHasBeenSet; }
102 
103     /**
104      * <p>Indicates whether this access point allows access from the public internet.
105      * If <code>VpcConfiguration</code> is specified for this access point, then
106      * <code>NetworkOrigin</code> is <code>VPC</code>, and the access point doesn't
107      * allow access from the public internet. Otherwise, <code>NetworkOrigin</code> is
108      * <code>Internet</code>, and the access point allows access from the public
109      * internet, subject to the access point and bucket access policies.</p>
110      */
SetNetworkOrigin(const NetworkOrigin & value)111     inline void SetNetworkOrigin(const NetworkOrigin& value) { m_networkOriginHasBeenSet = true; m_networkOrigin = value; }
112 
113     /**
114      * <p>Indicates whether this access point allows access from the public internet.
115      * If <code>VpcConfiguration</code> is specified for this access point, then
116      * <code>NetworkOrigin</code> is <code>VPC</code>, and the access point doesn't
117      * allow access from the public internet. Otherwise, <code>NetworkOrigin</code> is
118      * <code>Internet</code>, and the access point allows access from the public
119      * internet, subject to the access point and bucket access policies.</p>
120      */
SetNetworkOrigin(NetworkOrigin && value)121     inline void SetNetworkOrigin(NetworkOrigin&& value) { m_networkOriginHasBeenSet = true; m_networkOrigin = std::move(value); }
122 
123     /**
124      * <p>Indicates whether this access point allows access from the public internet.
125      * If <code>VpcConfiguration</code> is specified for this access point, then
126      * <code>NetworkOrigin</code> is <code>VPC</code>, and the access point doesn't
127      * allow access from the public internet. Otherwise, <code>NetworkOrigin</code> is
128      * <code>Internet</code>, and the access point allows access from the public
129      * internet, subject to the access point and bucket access policies.</p>
130      */
WithNetworkOrigin(const NetworkOrigin & value)131     inline AccessPoint& WithNetworkOrigin(const NetworkOrigin& value) { SetNetworkOrigin(value); return *this;}
132 
133     /**
134      * <p>Indicates whether this access point allows access from the public internet.
135      * If <code>VpcConfiguration</code> is specified for this access point, then
136      * <code>NetworkOrigin</code> is <code>VPC</code>, and the access point doesn't
137      * allow access from the public internet. Otherwise, <code>NetworkOrigin</code> is
138      * <code>Internet</code>, and the access point allows access from the public
139      * internet, subject to the access point and bucket access policies.</p>
140      */
WithNetworkOrigin(NetworkOrigin && value)141     inline AccessPoint& WithNetworkOrigin(NetworkOrigin&& value) { SetNetworkOrigin(std::move(value)); return *this;}
142 
143 
144     /**
145      * <p>The virtual private cloud (VPC) configuration for this access point, if one
146      * exists.</p>  <p>This element is empty if this access point is an Amazon S3
147      * on Outposts access point that is used by other Amazon Web Services.</p>
148      */
GetVpcConfiguration()149     inline const VpcConfiguration& GetVpcConfiguration() const{ return m_vpcConfiguration; }
150 
151     /**
152      * <p>The virtual private cloud (VPC) configuration for this access point, if one
153      * exists.</p>  <p>This element is empty if this access point is an Amazon S3
154      * on Outposts access point that is used by other Amazon Web Services.</p>
155      */
VpcConfigurationHasBeenSet()156     inline bool VpcConfigurationHasBeenSet() const { return m_vpcConfigurationHasBeenSet; }
157 
158     /**
159      * <p>The virtual private cloud (VPC) configuration for this access point, if one
160      * exists.</p>  <p>This element is empty if this access point is an Amazon S3
161      * on Outposts access point that is used by other Amazon Web Services.</p>
162      */
SetVpcConfiguration(const VpcConfiguration & value)163     inline void SetVpcConfiguration(const VpcConfiguration& value) { m_vpcConfigurationHasBeenSet = true; m_vpcConfiguration = value; }
164 
165     /**
166      * <p>The virtual private cloud (VPC) configuration for this access point, if one
167      * exists.</p>  <p>This element is empty if this access point is an Amazon S3
168      * on Outposts access point that is used by other Amazon Web Services.</p>
169      */
SetVpcConfiguration(VpcConfiguration && value)170     inline void SetVpcConfiguration(VpcConfiguration&& value) { m_vpcConfigurationHasBeenSet = true; m_vpcConfiguration = std::move(value); }
171 
172     /**
173      * <p>The virtual private cloud (VPC) configuration for this access point, if one
174      * exists.</p>  <p>This element is empty if this access point is an Amazon S3
175      * on Outposts access point that is used by other Amazon Web Services.</p>
176      */
WithVpcConfiguration(const VpcConfiguration & value)177     inline AccessPoint& WithVpcConfiguration(const VpcConfiguration& value) { SetVpcConfiguration(value); return *this;}
178 
179     /**
180      * <p>The virtual private cloud (VPC) configuration for this access point, if one
181      * exists.</p>  <p>This element is empty if this access point is an Amazon S3
182      * on Outposts access point that is used by other Amazon Web Services.</p>
183      */
WithVpcConfiguration(VpcConfiguration && value)184     inline AccessPoint& WithVpcConfiguration(VpcConfiguration&& value) { SetVpcConfiguration(std::move(value)); return *this;}
185 
186 
187     /**
188      * <p>The name of the bucket associated with this access point.</p>
189      */
GetBucket()190     inline const Aws::String& GetBucket() const{ return m_bucket; }
191 
192     /**
193      * <p>The name of the bucket associated with this access point.</p>
194      */
BucketHasBeenSet()195     inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; }
196 
197     /**
198      * <p>The name of the bucket associated with this access point.</p>
199      */
SetBucket(const Aws::String & value)200     inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; }
201 
202     /**
203      * <p>The name of the bucket associated with this access point.</p>
204      */
SetBucket(Aws::String && value)205     inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); }
206 
207     /**
208      * <p>The name of the bucket associated with this access point.</p>
209      */
SetBucket(const char * value)210     inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); }
211 
212     /**
213      * <p>The name of the bucket associated with this access point.</p>
214      */
WithBucket(const Aws::String & value)215     inline AccessPoint& WithBucket(const Aws::String& value) { SetBucket(value); return *this;}
216 
217     /**
218      * <p>The name of the bucket associated with this access point.</p>
219      */
WithBucket(Aws::String && value)220     inline AccessPoint& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;}
221 
222     /**
223      * <p>The name of the bucket associated with this access point.</p>
224      */
WithBucket(const char * value)225     inline AccessPoint& WithBucket(const char* value) { SetBucket(value); return *this;}
226 
227 
228     /**
229      * <p>The ARN for the access point.</p>
230      */
GetAccessPointArn()231     inline const Aws::String& GetAccessPointArn() const{ return m_accessPointArn; }
232 
233     /**
234      * <p>The ARN for the access point.</p>
235      */
AccessPointArnHasBeenSet()236     inline bool AccessPointArnHasBeenSet() const { return m_accessPointArnHasBeenSet; }
237 
238     /**
239      * <p>The ARN for the access point.</p>
240      */
SetAccessPointArn(const Aws::String & value)241     inline void SetAccessPointArn(const Aws::String& value) { m_accessPointArnHasBeenSet = true; m_accessPointArn = value; }
242 
243     /**
244      * <p>The ARN for the access point.</p>
245      */
SetAccessPointArn(Aws::String && value)246     inline void SetAccessPointArn(Aws::String&& value) { m_accessPointArnHasBeenSet = true; m_accessPointArn = std::move(value); }
247 
248     /**
249      * <p>The ARN for the access point.</p>
250      */
SetAccessPointArn(const char * value)251     inline void SetAccessPointArn(const char* value) { m_accessPointArnHasBeenSet = true; m_accessPointArn.assign(value); }
252 
253     /**
254      * <p>The ARN for the access point.</p>
255      */
WithAccessPointArn(const Aws::String & value)256     inline AccessPoint& WithAccessPointArn(const Aws::String& value) { SetAccessPointArn(value); return *this;}
257 
258     /**
259      * <p>The ARN for the access point.</p>
260      */
WithAccessPointArn(Aws::String && value)261     inline AccessPoint& WithAccessPointArn(Aws::String&& value) { SetAccessPointArn(std::move(value)); return *this;}
262 
263     /**
264      * <p>The ARN for the access point.</p>
265      */
WithAccessPointArn(const char * value)266     inline AccessPoint& WithAccessPointArn(const char* value) { SetAccessPointArn(value); return *this;}
267 
268 
269     /**
270      * <p>The name or alias of the access point.</p>
271      */
GetAlias()272     inline const Aws::String& GetAlias() const{ return m_alias; }
273 
274     /**
275      * <p>The name or alias of the access point.</p>
276      */
AliasHasBeenSet()277     inline bool AliasHasBeenSet() const { return m_aliasHasBeenSet; }
278 
279     /**
280      * <p>The name or alias of the access point.</p>
281      */
SetAlias(const Aws::String & value)282     inline void SetAlias(const Aws::String& value) { m_aliasHasBeenSet = true; m_alias = value; }
283 
284     /**
285      * <p>The name or alias of the access point.</p>
286      */
SetAlias(Aws::String && value)287     inline void SetAlias(Aws::String&& value) { m_aliasHasBeenSet = true; m_alias = std::move(value); }
288 
289     /**
290      * <p>The name or alias of the access point.</p>
291      */
SetAlias(const char * value)292     inline void SetAlias(const char* value) { m_aliasHasBeenSet = true; m_alias.assign(value); }
293 
294     /**
295      * <p>The name or alias of the access point.</p>
296      */
WithAlias(const Aws::String & value)297     inline AccessPoint& WithAlias(const Aws::String& value) { SetAlias(value); return *this;}
298 
299     /**
300      * <p>The name or alias of the access point.</p>
301      */
WithAlias(Aws::String && value)302     inline AccessPoint& WithAlias(Aws::String&& value) { SetAlias(std::move(value)); return *this;}
303 
304     /**
305      * <p>The name or alias of the access point.</p>
306      */
WithAlias(const char * value)307     inline AccessPoint& WithAlias(const char* value) { SetAlias(value); return *this;}
308 
309   private:
310 
311     Aws::String m_name;
312     bool m_nameHasBeenSet;
313 
314     NetworkOrigin m_networkOrigin;
315     bool m_networkOriginHasBeenSet;
316 
317     VpcConfiguration m_vpcConfiguration;
318     bool m_vpcConfigurationHasBeenSet;
319 
320     Aws::String m_bucket;
321     bool m_bucketHasBeenSet;
322 
323     Aws::String m_accessPointArn;
324     bool m_accessPointArnHasBeenSet;
325 
326     Aws::String m_alias;
327     bool m_aliasHasBeenSet;
328   };
329 
330 } // namespace Model
331 } // namespace S3Control
332 } // namespace Aws
333