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/ec2/model/AutoAcceptSharedAttachmentsValue.h>
10 #include <aws/ec2/model/DefaultRouteTableAssociationValue.h>
11 #include <aws/ec2/model/DefaultRouteTablePropagationValue.h>
12 #include <aws/ec2/model/VpnEcmpSupportValue.h>
13 #include <aws/ec2/model/DnsSupportValue.h>
14 #include <aws/ec2/model/MulticastSupportValue.h>
15 #include <aws/core/utils/memory/stl/AWSVector.h>
16 #include <aws/core/utils/memory/stl/AWSString.h>
17 #include <utility>
18 
19 namespace Aws
20 {
21 namespace Utils
22 {
23 namespace Xml
24 {
25   class XmlNode;
26 } // namespace Xml
27 } // namespace Utils
28 namespace EC2
29 {
30 namespace Model
31 {
32 
33   /**
34    * <p>Describes the options for a transit gateway.</p><p><h3>See Also:</h3>   <a
35    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TransitGatewayRequestOptions">AWS
36    * API Reference</a></p>
37    */
38   class AWS_EC2_API TransitGatewayRequestOptions
39   {
40   public:
41     TransitGatewayRequestOptions();
42     TransitGatewayRequestOptions(const Aws::Utils::Xml::XmlNode& xmlNode);
43     TransitGatewayRequestOptions& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44 
45     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46     void OutputToStream(Aws::OStream& oStream, const char* location) const;
47 
48 
49     /**
50      * <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP
51      * session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to
52      * 4294967294 for 32-bit ASNs. The default is <code>64512</code>.</p>
53      */
GetAmazonSideAsn()54     inline long long GetAmazonSideAsn() const{ return m_amazonSideAsn; }
55 
56     /**
57      * <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP
58      * session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to
59      * 4294967294 for 32-bit ASNs. The default is <code>64512</code>.</p>
60      */
AmazonSideAsnHasBeenSet()61     inline bool AmazonSideAsnHasBeenSet() const { return m_amazonSideAsnHasBeenSet; }
62 
63     /**
64      * <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP
65      * session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to
66      * 4294967294 for 32-bit ASNs. The default is <code>64512</code>.</p>
67      */
SetAmazonSideAsn(long long value)68     inline void SetAmazonSideAsn(long long value) { m_amazonSideAsnHasBeenSet = true; m_amazonSideAsn = value; }
69 
70     /**
71      * <p>A private Autonomous System Number (ASN) for the Amazon side of a BGP
72      * session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to
73      * 4294967294 for 32-bit ASNs. The default is <code>64512</code>.</p>
74      */
WithAmazonSideAsn(long long value)75     inline TransitGatewayRequestOptions& WithAmazonSideAsn(long long value) { SetAmazonSideAsn(value); return *this;}
76 
77 
78     /**
79      * <p>Enable or disable automatic acceptance of attachment requests. Disabled by
80      * default.</p>
81      */
GetAutoAcceptSharedAttachments()82     inline const AutoAcceptSharedAttachmentsValue& GetAutoAcceptSharedAttachments() const{ return m_autoAcceptSharedAttachments; }
83 
84     /**
85      * <p>Enable or disable automatic acceptance of attachment requests. Disabled by
86      * default.</p>
87      */
AutoAcceptSharedAttachmentsHasBeenSet()88     inline bool AutoAcceptSharedAttachmentsHasBeenSet() const { return m_autoAcceptSharedAttachmentsHasBeenSet; }
89 
90     /**
91      * <p>Enable or disable automatic acceptance of attachment requests. Disabled by
92      * default.</p>
93      */
SetAutoAcceptSharedAttachments(const AutoAcceptSharedAttachmentsValue & value)94     inline void SetAutoAcceptSharedAttachments(const AutoAcceptSharedAttachmentsValue& value) { m_autoAcceptSharedAttachmentsHasBeenSet = true; m_autoAcceptSharedAttachments = value; }
95 
96     /**
97      * <p>Enable or disable automatic acceptance of attachment requests. Disabled by
98      * default.</p>
99      */
SetAutoAcceptSharedAttachments(AutoAcceptSharedAttachmentsValue && value)100     inline void SetAutoAcceptSharedAttachments(AutoAcceptSharedAttachmentsValue&& value) { m_autoAcceptSharedAttachmentsHasBeenSet = true; m_autoAcceptSharedAttachments = std::move(value); }
101 
102     /**
103      * <p>Enable or disable automatic acceptance of attachment requests. Disabled by
104      * default.</p>
105      */
WithAutoAcceptSharedAttachments(const AutoAcceptSharedAttachmentsValue & value)106     inline TransitGatewayRequestOptions& WithAutoAcceptSharedAttachments(const AutoAcceptSharedAttachmentsValue& value) { SetAutoAcceptSharedAttachments(value); return *this;}
107 
108     /**
109      * <p>Enable or disable automatic acceptance of attachment requests. Disabled by
110      * default.</p>
111      */
WithAutoAcceptSharedAttachments(AutoAcceptSharedAttachmentsValue && value)112     inline TransitGatewayRequestOptions& WithAutoAcceptSharedAttachments(AutoAcceptSharedAttachmentsValue&& value) { SetAutoAcceptSharedAttachments(std::move(value)); return *this;}
113 
114 
115     /**
116      * <p>Enable or disable automatic association with the default association route
117      * table. Enabled by default.</p>
118      */
GetDefaultRouteTableAssociation()119     inline const DefaultRouteTableAssociationValue& GetDefaultRouteTableAssociation() const{ return m_defaultRouteTableAssociation; }
120 
121     /**
122      * <p>Enable or disable automatic association with the default association route
123      * table. Enabled by default.</p>
124      */
DefaultRouteTableAssociationHasBeenSet()125     inline bool DefaultRouteTableAssociationHasBeenSet() const { return m_defaultRouteTableAssociationHasBeenSet; }
126 
127     /**
128      * <p>Enable or disable automatic association with the default association route
129      * table. Enabled by default.</p>
130      */
SetDefaultRouteTableAssociation(const DefaultRouteTableAssociationValue & value)131     inline void SetDefaultRouteTableAssociation(const DefaultRouteTableAssociationValue& value) { m_defaultRouteTableAssociationHasBeenSet = true; m_defaultRouteTableAssociation = value; }
132 
133     /**
134      * <p>Enable or disable automatic association with the default association route
135      * table. Enabled by default.</p>
136      */
SetDefaultRouteTableAssociation(DefaultRouteTableAssociationValue && value)137     inline void SetDefaultRouteTableAssociation(DefaultRouteTableAssociationValue&& value) { m_defaultRouteTableAssociationHasBeenSet = true; m_defaultRouteTableAssociation = std::move(value); }
138 
139     /**
140      * <p>Enable or disable automatic association with the default association route
141      * table. Enabled by default.</p>
142      */
WithDefaultRouteTableAssociation(const DefaultRouteTableAssociationValue & value)143     inline TransitGatewayRequestOptions& WithDefaultRouteTableAssociation(const DefaultRouteTableAssociationValue& value) { SetDefaultRouteTableAssociation(value); return *this;}
144 
145     /**
146      * <p>Enable or disable automatic association with the default association route
147      * table. Enabled by default.</p>
148      */
WithDefaultRouteTableAssociation(DefaultRouteTableAssociationValue && value)149     inline TransitGatewayRequestOptions& WithDefaultRouteTableAssociation(DefaultRouteTableAssociationValue&& value) { SetDefaultRouteTableAssociation(std::move(value)); return *this;}
150 
151 
152     /**
153      * <p>Enable or disable automatic propagation of routes to the default propagation
154      * route table. Enabled by default.</p>
155      */
GetDefaultRouteTablePropagation()156     inline const DefaultRouteTablePropagationValue& GetDefaultRouteTablePropagation() const{ return m_defaultRouteTablePropagation; }
157 
158     /**
159      * <p>Enable or disable automatic propagation of routes to the default propagation
160      * route table. Enabled by default.</p>
161      */
DefaultRouteTablePropagationHasBeenSet()162     inline bool DefaultRouteTablePropagationHasBeenSet() const { return m_defaultRouteTablePropagationHasBeenSet; }
163 
164     /**
165      * <p>Enable or disable automatic propagation of routes to the default propagation
166      * route table. Enabled by default.</p>
167      */
SetDefaultRouteTablePropagation(const DefaultRouteTablePropagationValue & value)168     inline void SetDefaultRouteTablePropagation(const DefaultRouteTablePropagationValue& value) { m_defaultRouteTablePropagationHasBeenSet = true; m_defaultRouteTablePropagation = value; }
169 
170     /**
171      * <p>Enable or disable automatic propagation of routes to the default propagation
172      * route table. Enabled by default.</p>
173      */
SetDefaultRouteTablePropagation(DefaultRouteTablePropagationValue && value)174     inline void SetDefaultRouteTablePropagation(DefaultRouteTablePropagationValue&& value) { m_defaultRouteTablePropagationHasBeenSet = true; m_defaultRouteTablePropagation = std::move(value); }
175 
176     /**
177      * <p>Enable or disable automatic propagation of routes to the default propagation
178      * route table. Enabled by default.</p>
179      */
WithDefaultRouteTablePropagation(const DefaultRouteTablePropagationValue & value)180     inline TransitGatewayRequestOptions& WithDefaultRouteTablePropagation(const DefaultRouteTablePropagationValue& value) { SetDefaultRouteTablePropagation(value); return *this;}
181 
182     /**
183      * <p>Enable or disable automatic propagation of routes to the default propagation
184      * route table. Enabled by default.</p>
185      */
WithDefaultRouteTablePropagation(DefaultRouteTablePropagationValue && value)186     inline TransitGatewayRequestOptions& WithDefaultRouteTablePropagation(DefaultRouteTablePropagationValue&& value) { SetDefaultRouteTablePropagation(std::move(value)); return *this;}
187 
188 
189     /**
190      * <p>Enable or disable Equal Cost Multipath Protocol support. Enabled by
191      * default.</p>
192      */
GetVpnEcmpSupport()193     inline const VpnEcmpSupportValue& GetVpnEcmpSupport() const{ return m_vpnEcmpSupport; }
194 
195     /**
196      * <p>Enable or disable Equal Cost Multipath Protocol support. Enabled by
197      * default.</p>
198      */
VpnEcmpSupportHasBeenSet()199     inline bool VpnEcmpSupportHasBeenSet() const { return m_vpnEcmpSupportHasBeenSet; }
200 
201     /**
202      * <p>Enable or disable Equal Cost Multipath Protocol support. Enabled by
203      * default.</p>
204      */
SetVpnEcmpSupport(const VpnEcmpSupportValue & value)205     inline void SetVpnEcmpSupport(const VpnEcmpSupportValue& value) { m_vpnEcmpSupportHasBeenSet = true; m_vpnEcmpSupport = value; }
206 
207     /**
208      * <p>Enable or disable Equal Cost Multipath Protocol support. Enabled by
209      * default.</p>
210      */
SetVpnEcmpSupport(VpnEcmpSupportValue && value)211     inline void SetVpnEcmpSupport(VpnEcmpSupportValue&& value) { m_vpnEcmpSupportHasBeenSet = true; m_vpnEcmpSupport = std::move(value); }
212 
213     /**
214      * <p>Enable or disable Equal Cost Multipath Protocol support. Enabled by
215      * default.</p>
216      */
WithVpnEcmpSupport(const VpnEcmpSupportValue & value)217     inline TransitGatewayRequestOptions& WithVpnEcmpSupport(const VpnEcmpSupportValue& value) { SetVpnEcmpSupport(value); return *this;}
218 
219     /**
220      * <p>Enable or disable Equal Cost Multipath Protocol support. Enabled by
221      * default.</p>
222      */
WithVpnEcmpSupport(VpnEcmpSupportValue && value)223     inline TransitGatewayRequestOptions& WithVpnEcmpSupport(VpnEcmpSupportValue&& value) { SetVpnEcmpSupport(std::move(value)); return *this;}
224 
225 
226     /**
227      * <p>Enable or disable DNS support. Enabled by default.</p>
228      */
GetDnsSupport()229     inline const DnsSupportValue& GetDnsSupport() const{ return m_dnsSupport; }
230 
231     /**
232      * <p>Enable or disable DNS support. Enabled by default.</p>
233      */
DnsSupportHasBeenSet()234     inline bool DnsSupportHasBeenSet() const { return m_dnsSupportHasBeenSet; }
235 
236     /**
237      * <p>Enable or disable DNS support. Enabled by default.</p>
238      */
SetDnsSupport(const DnsSupportValue & value)239     inline void SetDnsSupport(const DnsSupportValue& value) { m_dnsSupportHasBeenSet = true; m_dnsSupport = value; }
240 
241     /**
242      * <p>Enable or disable DNS support. Enabled by default.</p>
243      */
SetDnsSupport(DnsSupportValue && value)244     inline void SetDnsSupport(DnsSupportValue&& value) { m_dnsSupportHasBeenSet = true; m_dnsSupport = std::move(value); }
245 
246     /**
247      * <p>Enable or disable DNS support. Enabled by default.</p>
248      */
WithDnsSupport(const DnsSupportValue & value)249     inline TransitGatewayRequestOptions& WithDnsSupport(const DnsSupportValue& value) { SetDnsSupport(value); return *this;}
250 
251     /**
252      * <p>Enable or disable DNS support. Enabled by default.</p>
253      */
WithDnsSupport(DnsSupportValue && value)254     inline TransitGatewayRequestOptions& WithDnsSupport(DnsSupportValue&& value) { SetDnsSupport(std::move(value)); return *this;}
255 
256 
257     /**
258      * <p>Indicates whether multicast is enabled on the transit gateway</p>
259      */
GetMulticastSupport()260     inline const MulticastSupportValue& GetMulticastSupport() const{ return m_multicastSupport; }
261 
262     /**
263      * <p>Indicates whether multicast is enabled on the transit gateway</p>
264      */
MulticastSupportHasBeenSet()265     inline bool MulticastSupportHasBeenSet() const { return m_multicastSupportHasBeenSet; }
266 
267     /**
268      * <p>Indicates whether multicast is enabled on the transit gateway</p>
269      */
SetMulticastSupport(const MulticastSupportValue & value)270     inline void SetMulticastSupport(const MulticastSupportValue& value) { m_multicastSupportHasBeenSet = true; m_multicastSupport = value; }
271 
272     /**
273      * <p>Indicates whether multicast is enabled on the transit gateway</p>
274      */
SetMulticastSupport(MulticastSupportValue && value)275     inline void SetMulticastSupport(MulticastSupportValue&& value) { m_multicastSupportHasBeenSet = true; m_multicastSupport = std::move(value); }
276 
277     /**
278      * <p>Indicates whether multicast is enabled on the transit gateway</p>
279      */
WithMulticastSupport(const MulticastSupportValue & value)280     inline TransitGatewayRequestOptions& WithMulticastSupport(const MulticastSupportValue& value) { SetMulticastSupport(value); return *this;}
281 
282     /**
283      * <p>Indicates whether multicast is enabled on the transit gateway</p>
284      */
WithMulticastSupport(MulticastSupportValue && value)285     inline TransitGatewayRequestOptions& WithMulticastSupport(MulticastSupportValue&& value) { SetMulticastSupport(std::move(value)); return *this;}
286 
287 
288     /**
289      * <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size
290      * /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for
291      * IPv6.</p>
292      */
GetTransitGatewayCidrBlocks()293     inline const Aws::Vector<Aws::String>& GetTransitGatewayCidrBlocks() const{ return m_transitGatewayCidrBlocks; }
294 
295     /**
296      * <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size
297      * /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for
298      * IPv6.</p>
299      */
TransitGatewayCidrBlocksHasBeenSet()300     inline bool TransitGatewayCidrBlocksHasBeenSet() const { return m_transitGatewayCidrBlocksHasBeenSet; }
301 
302     /**
303      * <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size
304      * /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for
305      * IPv6.</p>
306      */
SetTransitGatewayCidrBlocks(const Aws::Vector<Aws::String> & value)307     inline void SetTransitGatewayCidrBlocks(const Aws::Vector<Aws::String>& value) { m_transitGatewayCidrBlocksHasBeenSet = true; m_transitGatewayCidrBlocks = value; }
308 
309     /**
310      * <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size
311      * /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for
312      * IPv6.</p>
313      */
SetTransitGatewayCidrBlocks(Aws::Vector<Aws::String> && value)314     inline void SetTransitGatewayCidrBlocks(Aws::Vector<Aws::String>&& value) { m_transitGatewayCidrBlocksHasBeenSet = true; m_transitGatewayCidrBlocks = std::move(value); }
315 
316     /**
317      * <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size
318      * /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for
319      * IPv6.</p>
320      */
WithTransitGatewayCidrBlocks(const Aws::Vector<Aws::String> & value)321     inline TransitGatewayRequestOptions& WithTransitGatewayCidrBlocks(const Aws::Vector<Aws::String>& value) { SetTransitGatewayCidrBlocks(value); return *this;}
322 
323     /**
324      * <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size
325      * /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for
326      * IPv6.</p>
327      */
WithTransitGatewayCidrBlocks(Aws::Vector<Aws::String> && value)328     inline TransitGatewayRequestOptions& WithTransitGatewayCidrBlocks(Aws::Vector<Aws::String>&& value) { SetTransitGatewayCidrBlocks(std::move(value)); return *this;}
329 
330     /**
331      * <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size
332      * /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for
333      * IPv6.</p>
334      */
AddTransitGatewayCidrBlocks(const Aws::String & value)335     inline TransitGatewayRequestOptions& AddTransitGatewayCidrBlocks(const Aws::String& value) { m_transitGatewayCidrBlocksHasBeenSet = true; m_transitGatewayCidrBlocks.push_back(value); return *this; }
336 
337     /**
338      * <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size
339      * /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for
340      * IPv6.</p>
341      */
AddTransitGatewayCidrBlocks(Aws::String && value)342     inline TransitGatewayRequestOptions& AddTransitGatewayCidrBlocks(Aws::String&& value) { m_transitGatewayCidrBlocksHasBeenSet = true; m_transitGatewayCidrBlocks.push_back(std::move(value)); return *this; }
343 
344     /**
345      * <p>One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size
346      * /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for
347      * IPv6.</p>
348      */
AddTransitGatewayCidrBlocks(const char * value)349     inline TransitGatewayRequestOptions& AddTransitGatewayCidrBlocks(const char* value) { m_transitGatewayCidrBlocksHasBeenSet = true; m_transitGatewayCidrBlocks.push_back(value); return *this; }
350 
351   private:
352 
353     long long m_amazonSideAsn;
354     bool m_amazonSideAsnHasBeenSet;
355 
356     AutoAcceptSharedAttachmentsValue m_autoAcceptSharedAttachments;
357     bool m_autoAcceptSharedAttachmentsHasBeenSet;
358 
359     DefaultRouteTableAssociationValue m_defaultRouteTableAssociation;
360     bool m_defaultRouteTableAssociationHasBeenSet;
361 
362     DefaultRouteTablePropagationValue m_defaultRouteTablePropagation;
363     bool m_defaultRouteTablePropagationHasBeenSet;
364 
365     VpnEcmpSupportValue m_vpnEcmpSupport;
366     bool m_vpnEcmpSupportHasBeenSet;
367 
368     DnsSupportValue m_dnsSupport;
369     bool m_dnsSupportHasBeenSet;
370 
371     MulticastSupportValue m_multicastSupport;
372     bool m_multicastSupportHasBeenSet;
373 
374     Aws::Vector<Aws::String> m_transitGatewayCidrBlocks;
375     bool m_transitGatewayCidrBlocksHasBeenSet;
376   };
377 
378 } // namespace Model
379 } // namespace EC2
380 } // namespace Aws
381