aws_sdk_ec2/types/
_vpn_tunnel_options_specification.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The tunnel options for a single VPN tunnel.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct VpnTunnelOptionsSpecification {
7    /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.</p>
8    /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
9    /// <ul>
10    /// <li>
11    /// <p><code>169.254.0.0/30</code></p></li>
12    /// <li>
13    /// <p><code>169.254.1.0/30</code></p></li>
14    /// <li>
15    /// <p><code>169.254.2.0/30</code></p></li>
16    /// <li>
17    /// <p><code>169.254.3.0/30</code></p></li>
18    /// <li>
19    /// <p><code>169.254.4.0/30</code></p></li>
20    /// <li>
21    /// <p><code>169.254.5.0/30</code></p></li>
22    /// <li>
23    /// <p><code>169.254.169.252/30</code></p></li>
24    /// </ul>
25    pub tunnel_inside_cidr: ::std::option::Option<::std::string::String>,
26    /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
27    /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
28    pub tunnel_inside_ipv6_cidr: ::std::option::Option<::std::string::String>,
29    /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.</p>
30    /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
31    pub pre_shared_key: ::std::option::Option<::std::string::String>,
32    /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
33    /// <p>Constraints: A value between 900 and 28,800.</p>
34    /// <p>Default: <code>28800</code></p>
35    pub phase1_lifetime_seconds: ::std::option::Option<i32>,
36    /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
37    /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
38    /// <p>Default: <code>3600</code></p>
39    pub phase2_lifetime_seconds: ::std::option::Option<i32>,
40    /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
41    /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
42    /// <p>Default: <code>270</code></p>
43    pub rekey_margin_time_seconds: ::std::option::Option<i32>,
44    /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
45    /// <p>Constraints: A value between 0 and 100.</p>
46    /// <p>Default: <code>100</code></p>
47    pub rekey_fuzz_percentage: ::std::option::Option<i32>,
48    /// <p>The number of packets in an IKE replay window.</p>
49    /// <p>Constraints: A value between 64 and 2048.</p>
50    /// <p>Default: <code>1024</code></p>
51    pub replay_window_size: ::std::option::Option<i32>,
52    /// <p>The number of seconds after which a DPD timeout occurs.</p>
53    /// <p>Constraints: A value greater than or equal to 30.</p>
54    /// <p>Default: <code>30</code></p>
55    pub dpd_timeout_seconds: ::std::option::Option<i32>,
56    /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
57    /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code></p>
58    /// <p>Default: <code>clear</code></p>
59    pub dpd_timeout_action: ::std::option::Option<::std::string::String>,
60    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
61    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code></p>
62    pub phase1_encryption_algorithms: ::std::option::Option<::std::vec::Vec<crate::types::Phase1EncryptionAlgorithmsRequestListValue>>,
63    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
64    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code></p>
65    pub phase2_encryption_algorithms: ::std::option::Option<::std::vec::Vec<crate::types::Phase2EncryptionAlgorithmsRequestListValue>>,
66    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
67    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code></p>
68    pub phase1_integrity_algorithms: ::std::option::Option<::std::vec::Vec<crate::types::Phase1IntegrityAlgorithmsRequestListValue>>,
69    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
70    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code></p>
71    pub phase2_integrity_algorithms: ::std::option::Option<::std::vec::Vec<crate::types::Phase2IntegrityAlgorithmsRequestListValue>>,
72    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
73    /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code></p>
74    pub phase1_dh_group_numbers: ::std::option::Option<::std::vec::Vec<crate::types::Phase1DhGroupNumbersRequestListValue>>,
75    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
76    /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code></p>
77    pub phase2_dh_group_numbers: ::std::option::Option<::std::vec::Vec<crate::types::Phase2DhGroupNumbersRequestListValue>>,
78    /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
79    /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code></p>
80    pub ike_versions: ::std::option::Option<::std::vec::Vec<crate::types::IkeVersionsRequestListValue>>,
81    /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
82    /// <p>Valid Values: <code>add</code> | <code>start</code></p>
83    /// <p>Default: <code>add</code></p>
84    pub startup_action: ::std::option::Option<::std::string::String>,
85    /// <p>Options for logging VPN tunnel activity.</p>
86    pub log_options: ::std::option::Option<crate::types::VpnTunnelLogOptionsSpecification>,
87    /// <p>Turn on or off tunnel endpoint lifecycle control feature.</p>
88    pub enable_tunnel_lifecycle_control: ::std::option::Option<bool>,
89}
90impl VpnTunnelOptionsSpecification {
91    /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.</p>
92    /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
93    /// <ul>
94    /// <li>
95    /// <p><code>169.254.0.0/30</code></p></li>
96    /// <li>
97    /// <p><code>169.254.1.0/30</code></p></li>
98    /// <li>
99    /// <p><code>169.254.2.0/30</code></p></li>
100    /// <li>
101    /// <p><code>169.254.3.0/30</code></p></li>
102    /// <li>
103    /// <p><code>169.254.4.0/30</code></p></li>
104    /// <li>
105    /// <p><code>169.254.5.0/30</code></p></li>
106    /// <li>
107    /// <p><code>169.254.169.252/30</code></p></li>
108    /// </ul>
109    pub fn tunnel_inside_cidr(&self) -> ::std::option::Option<&str> {
110        self.tunnel_inside_cidr.as_deref()
111    }
112    /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
113    /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
114    pub fn tunnel_inside_ipv6_cidr(&self) -> ::std::option::Option<&str> {
115        self.tunnel_inside_ipv6_cidr.as_deref()
116    }
117    /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.</p>
118    /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
119    pub fn pre_shared_key(&self) -> ::std::option::Option<&str> {
120        self.pre_shared_key.as_deref()
121    }
122    /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
123    /// <p>Constraints: A value between 900 and 28,800.</p>
124    /// <p>Default: <code>28800</code></p>
125    pub fn phase1_lifetime_seconds(&self) -> ::std::option::Option<i32> {
126        self.phase1_lifetime_seconds
127    }
128    /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
129    /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
130    /// <p>Default: <code>3600</code></p>
131    pub fn phase2_lifetime_seconds(&self) -> ::std::option::Option<i32> {
132        self.phase2_lifetime_seconds
133    }
134    /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
135    /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
136    /// <p>Default: <code>270</code></p>
137    pub fn rekey_margin_time_seconds(&self) -> ::std::option::Option<i32> {
138        self.rekey_margin_time_seconds
139    }
140    /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
141    /// <p>Constraints: A value between 0 and 100.</p>
142    /// <p>Default: <code>100</code></p>
143    pub fn rekey_fuzz_percentage(&self) -> ::std::option::Option<i32> {
144        self.rekey_fuzz_percentage
145    }
146    /// <p>The number of packets in an IKE replay window.</p>
147    /// <p>Constraints: A value between 64 and 2048.</p>
148    /// <p>Default: <code>1024</code></p>
149    pub fn replay_window_size(&self) -> ::std::option::Option<i32> {
150        self.replay_window_size
151    }
152    /// <p>The number of seconds after which a DPD timeout occurs.</p>
153    /// <p>Constraints: A value greater than or equal to 30.</p>
154    /// <p>Default: <code>30</code></p>
155    pub fn dpd_timeout_seconds(&self) -> ::std::option::Option<i32> {
156        self.dpd_timeout_seconds
157    }
158    /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
159    /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code></p>
160    /// <p>Default: <code>clear</code></p>
161    pub fn dpd_timeout_action(&self) -> ::std::option::Option<&str> {
162        self.dpd_timeout_action.as_deref()
163    }
164    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
165    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code></p>
166    ///
167    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.phase1_encryption_algorithms.is_none()`.
168    pub fn phase1_encryption_algorithms(&self) -> &[crate::types::Phase1EncryptionAlgorithmsRequestListValue] {
169        self.phase1_encryption_algorithms.as_deref().unwrap_or_default()
170    }
171    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
172    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code></p>
173    ///
174    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.phase2_encryption_algorithms.is_none()`.
175    pub fn phase2_encryption_algorithms(&self) -> &[crate::types::Phase2EncryptionAlgorithmsRequestListValue] {
176        self.phase2_encryption_algorithms.as_deref().unwrap_or_default()
177    }
178    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
179    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code></p>
180    ///
181    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.phase1_integrity_algorithms.is_none()`.
182    pub fn phase1_integrity_algorithms(&self) -> &[crate::types::Phase1IntegrityAlgorithmsRequestListValue] {
183        self.phase1_integrity_algorithms.as_deref().unwrap_or_default()
184    }
185    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
186    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code></p>
187    ///
188    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.phase2_integrity_algorithms.is_none()`.
189    pub fn phase2_integrity_algorithms(&self) -> &[crate::types::Phase2IntegrityAlgorithmsRequestListValue] {
190        self.phase2_integrity_algorithms.as_deref().unwrap_or_default()
191    }
192    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
193    /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code></p>
194    ///
195    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.phase1_dh_group_numbers.is_none()`.
196    pub fn phase1_dh_group_numbers(&self) -> &[crate::types::Phase1DhGroupNumbersRequestListValue] {
197        self.phase1_dh_group_numbers.as_deref().unwrap_or_default()
198    }
199    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
200    /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code></p>
201    ///
202    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.phase2_dh_group_numbers.is_none()`.
203    pub fn phase2_dh_group_numbers(&self) -> &[crate::types::Phase2DhGroupNumbersRequestListValue] {
204        self.phase2_dh_group_numbers.as_deref().unwrap_or_default()
205    }
206    /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
207    /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code></p>
208    ///
209    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.ike_versions.is_none()`.
210    pub fn ike_versions(&self) -> &[crate::types::IkeVersionsRequestListValue] {
211        self.ike_versions.as_deref().unwrap_or_default()
212    }
213    /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
214    /// <p>Valid Values: <code>add</code> | <code>start</code></p>
215    /// <p>Default: <code>add</code></p>
216    pub fn startup_action(&self) -> ::std::option::Option<&str> {
217        self.startup_action.as_deref()
218    }
219    /// <p>Options for logging VPN tunnel activity.</p>
220    pub fn log_options(&self) -> ::std::option::Option<&crate::types::VpnTunnelLogOptionsSpecification> {
221        self.log_options.as_ref()
222    }
223    /// <p>Turn on or off tunnel endpoint lifecycle control feature.</p>
224    pub fn enable_tunnel_lifecycle_control(&self) -> ::std::option::Option<bool> {
225        self.enable_tunnel_lifecycle_control
226    }
227}
228impl ::std::fmt::Debug for VpnTunnelOptionsSpecification {
229    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
230        let mut formatter = f.debug_struct("VpnTunnelOptionsSpecification");
231        formatter.field("tunnel_inside_cidr", &self.tunnel_inside_cidr);
232        formatter.field("tunnel_inside_ipv6_cidr", &self.tunnel_inside_ipv6_cidr);
233        formatter.field("pre_shared_key", &"*** Sensitive Data Redacted ***");
234        formatter.field("phase1_lifetime_seconds", &self.phase1_lifetime_seconds);
235        formatter.field("phase2_lifetime_seconds", &self.phase2_lifetime_seconds);
236        formatter.field("rekey_margin_time_seconds", &self.rekey_margin_time_seconds);
237        formatter.field("rekey_fuzz_percentage", &self.rekey_fuzz_percentage);
238        formatter.field("replay_window_size", &self.replay_window_size);
239        formatter.field("dpd_timeout_seconds", &self.dpd_timeout_seconds);
240        formatter.field("dpd_timeout_action", &self.dpd_timeout_action);
241        formatter.field("phase1_encryption_algorithms", &self.phase1_encryption_algorithms);
242        formatter.field("phase2_encryption_algorithms", &self.phase2_encryption_algorithms);
243        formatter.field("phase1_integrity_algorithms", &self.phase1_integrity_algorithms);
244        formatter.field("phase2_integrity_algorithms", &self.phase2_integrity_algorithms);
245        formatter.field("phase1_dh_group_numbers", &self.phase1_dh_group_numbers);
246        formatter.field("phase2_dh_group_numbers", &self.phase2_dh_group_numbers);
247        formatter.field("ike_versions", &self.ike_versions);
248        formatter.field("startup_action", &self.startup_action);
249        formatter.field("log_options", &self.log_options);
250        formatter.field("enable_tunnel_lifecycle_control", &self.enable_tunnel_lifecycle_control);
251        formatter.finish()
252    }
253}
254impl VpnTunnelOptionsSpecification {
255    /// Creates a new builder-style object to manufacture [`VpnTunnelOptionsSpecification`](crate::types::VpnTunnelOptionsSpecification).
256    pub fn builder() -> crate::types::builders::VpnTunnelOptionsSpecificationBuilder {
257        crate::types::builders::VpnTunnelOptionsSpecificationBuilder::default()
258    }
259}
260
261/// A builder for [`VpnTunnelOptionsSpecification`](crate::types::VpnTunnelOptionsSpecification).
262#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
263#[non_exhaustive]
264pub struct VpnTunnelOptionsSpecificationBuilder {
265    pub(crate) tunnel_inside_cidr: ::std::option::Option<::std::string::String>,
266    pub(crate) tunnel_inside_ipv6_cidr: ::std::option::Option<::std::string::String>,
267    pub(crate) pre_shared_key: ::std::option::Option<::std::string::String>,
268    pub(crate) phase1_lifetime_seconds: ::std::option::Option<i32>,
269    pub(crate) phase2_lifetime_seconds: ::std::option::Option<i32>,
270    pub(crate) rekey_margin_time_seconds: ::std::option::Option<i32>,
271    pub(crate) rekey_fuzz_percentage: ::std::option::Option<i32>,
272    pub(crate) replay_window_size: ::std::option::Option<i32>,
273    pub(crate) dpd_timeout_seconds: ::std::option::Option<i32>,
274    pub(crate) dpd_timeout_action: ::std::option::Option<::std::string::String>,
275    pub(crate) phase1_encryption_algorithms: ::std::option::Option<::std::vec::Vec<crate::types::Phase1EncryptionAlgorithmsRequestListValue>>,
276    pub(crate) phase2_encryption_algorithms: ::std::option::Option<::std::vec::Vec<crate::types::Phase2EncryptionAlgorithmsRequestListValue>>,
277    pub(crate) phase1_integrity_algorithms: ::std::option::Option<::std::vec::Vec<crate::types::Phase1IntegrityAlgorithmsRequestListValue>>,
278    pub(crate) phase2_integrity_algorithms: ::std::option::Option<::std::vec::Vec<crate::types::Phase2IntegrityAlgorithmsRequestListValue>>,
279    pub(crate) phase1_dh_group_numbers: ::std::option::Option<::std::vec::Vec<crate::types::Phase1DhGroupNumbersRequestListValue>>,
280    pub(crate) phase2_dh_group_numbers: ::std::option::Option<::std::vec::Vec<crate::types::Phase2DhGroupNumbersRequestListValue>>,
281    pub(crate) ike_versions: ::std::option::Option<::std::vec::Vec<crate::types::IkeVersionsRequestListValue>>,
282    pub(crate) startup_action: ::std::option::Option<::std::string::String>,
283    pub(crate) log_options: ::std::option::Option<crate::types::VpnTunnelLogOptionsSpecification>,
284    pub(crate) enable_tunnel_lifecycle_control: ::std::option::Option<bool>,
285}
286impl VpnTunnelOptionsSpecificationBuilder {
287    /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.</p>
288    /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
289    /// <ul>
290    /// <li>
291    /// <p><code>169.254.0.0/30</code></p></li>
292    /// <li>
293    /// <p><code>169.254.1.0/30</code></p></li>
294    /// <li>
295    /// <p><code>169.254.2.0/30</code></p></li>
296    /// <li>
297    /// <p><code>169.254.3.0/30</code></p></li>
298    /// <li>
299    /// <p><code>169.254.4.0/30</code></p></li>
300    /// <li>
301    /// <p><code>169.254.5.0/30</code></p></li>
302    /// <li>
303    /// <p><code>169.254.169.252/30</code></p></li>
304    /// </ul>
305    pub fn tunnel_inside_cidr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
306        self.tunnel_inside_cidr = ::std::option::Option::Some(input.into());
307        self
308    }
309    /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.</p>
310    /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
311    /// <ul>
312    /// <li>
313    /// <p><code>169.254.0.0/30</code></p></li>
314    /// <li>
315    /// <p><code>169.254.1.0/30</code></p></li>
316    /// <li>
317    /// <p><code>169.254.2.0/30</code></p></li>
318    /// <li>
319    /// <p><code>169.254.3.0/30</code></p></li>
320    /// <li>
321    /// <p><code>169.254.4.0/30</code></p></li>
322    /// <li>
323    /// <p><code>169.254.5.0/30</code></p></li>
324    /// <li>
325    /// <p><code>169.254.169.252/30</code></p></li>
326    /// </ul>
327    pub fn set_tunnel_inside_cidr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
328        self.tunnel_inside_cidr = input;
329        self
330    }
331    /// <p>The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.</p>
332    /// <p>Constraints: A size /30 CIDR block from the <code>169.254.0.0/16</code> range. The following CIDR blocks are reserved and cannot be used:</p>
333    /// <ul>
334    /// <li>
335    /// <p><code>169.254.0.0/30</code></p></li>
336    /// <li>
337    /// <p><code>169.254.1.0/30</code></p></li>
338    /// <li>
339    /// <p><code>169.254.2.0/30</code></p></li>
340    /// <li>
341    /// <p><code>169.254.3.0/30</code></p></li>
342    /// <li>
343    /// <p><code>169.254.4.0/30</code></p></li>
344    /// <li>
345    /// <p><code>169.254.5.0/30</code></p></li>
346    /// <li>
347    /// <p><code>169.254.169.252/30</code></p></li>
348    /// </ul>
349    pub fn get_tunnel_inside_cidr(&self) -> &::std::option::Option<::std::string::String> {
350        &self.tunnel_inside_cidr
351    }
352    /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
353    /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
354    pub fn tunnel_inside_ipv6_cidr(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
355        self.tunnel_inside_ipv6_cidr = ::std::option::Option::Some(input.into());
356        self
357    }
358    /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
359    /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
360    pub fn set_tunnel_inside_ipv6_cidr(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
361        self.tunnel_inside_ipv6_cidr = input;
362        self
363    }
364    /// <p>The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.</p>
365    /// <p>Constraints: A size /126 CIDR block from the local <code>fd00::/8</code> range.</p>
366    pub fn get_tunnel_inside_ipv6_cidr(&self) -> &::std::option::Option<::std::string::String> {
367        &self.tunnel_inside_ipv6_cidr
368    }
369    /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.</p>
370    /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
371    pub fn pre_shared_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
372        self.pre_shared_key = ::std::option::Option::Some(input.into());
373        self
374    }
375    /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.</p>
376    /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
377    pub fn set_pre_shared_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
378        self.pre_shared_key = input;
379        self
380    }
381    /// <p>The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.</p>
382    /// <p>Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).</p>
383    pub fn get_pre_shared_key(&self) -> &::std::option::Option<::std::string::String> {
384        &self.pre_shared_key
385    }
386    /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
387    /// <p>Constraints: A value between 900 and 28,800.</p>
388    /// <p>Default: <code>28800</code></p>
389    pub fn phase1_lifetime_seconds(mut self, input: i32) -> Self {
390        self.phase1_lifetime_seconds = ::std::option::Option::Some(input);
391        self
392    }
393    /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
394    /// <p>Constraints: A value between 900 and 28,800.</p>
395    /// <p>Default: <code>28800</code></p>
396    pub fn set_phase1_lifetime_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
397        self.phase1_lifetime_seconds = input;
398        self
399    }
400    /// <p>The lifetime for phase 1 of the IKE negotiation, in seconds.</p>
401    /// <p>Constraints: A value between 900 and 28,800.</p>
402    /// <p>Default: <code>28800</code></p>
403    pub fn get_phase1_lifetime_seconds(&self) -> &::std::option::Option<i32> {
404        &self.phase1_lifetime_seconds
405    }
406    /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
407    /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
408    /// <p>Default: <code>3600</code></p>
409    pub fn phase2_lifetime_seconds(mut self, input: i32) -> Self {
410        self.phase2_lifetime_seconds = ::std::option::Option::Some(input);
411        self
412    }
413    /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
414    /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
415    /// <p>Default: <code>3600</code></p>
416    pub fn set_phase2_lifetime_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
417        self.phase2_lifetime_seconds = input;
418        self
419    }
420    /// <p>The lifetime for phase 2 of the IKE negotiation, in seconds.</p>
421    /// <p>Constraints: A value between 900 and 3,600. The value must be less than the value for <code>Phase1LifetimeSeconds</code>.</p>
422    /// <p>Default: <code>3600</code></p>
423    pub fn get_phase2_lifetime_seconds(&self) -> &::std::option::Option<i32> {
424        &self.phase2_lifetime_seconds
425    }
426    /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
427    /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
428    /// <p>Default: <code>270</code></p>
429    pub fn rekey_margin_time_seconds(mut self, input: i32) -> Self {
430        self.rekey_margin_time_seconds = ::std::option::Option::Some(input);
431        self
432    }
433    /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
434    /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
435    /// <p>Default: <code>270</code></p>
436    pub fn set_rekey_margin_time_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
437        self.rekey_margin_time_seconds = input;
438        self
439    }
440    /// <p>The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for <code>RekeyFuzzPercentage</code>.</p>
441    /// <p>Constraints: A value between 60 and half of <code>Phase2LifetimeSeconds</code>.</p>
442    /// <p>Default: <code>270</code></p>
443    pub fn get_rekey_margin_time_seconds(&self) -> &::std::option::Option<i32> {
444        &self.rekey_margin_time_seconds
445    }
446    /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
447    /// <p>Constraints: A value between 0 and 100.</p>
448    /// <p>Default: <code>100</code></p>
449    pub fn rekey_fuzz_percentage(mut self, input: i32) -> Self {
450        self.rekey_fuzz_percentage = ::std::option::Option::Some(input);
451        self
452    }
453    /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
454    /// <p>Constraints: A value between 0 and 100.</p>
455    /// <p>Default: <code>100</code></p>
456    pub fn set_rekey_fuzz_percentage(mut self, input: ::std::option::Option<i32>) -> Self {
457        self.rekey_fuzz_percentage = input;
458        self
459    }
460    /// <p>The percentage of the rekey window (determined by <code>RekeyMarginTimeSeconds</code>) during which the rekey time is randomly selected.</p>
461    /// <p>Constraints: A value between 0 and 100.</p>
462    /// <p>Default: <code>100</code></p>
463    pub fn get_rekey_fuzz_percentage(&self) -> &::std::option::Option<i32> {
464        &self.rekey_fuzz_percentage
465    }
466    /// <p>The number of packets in an IKE replay window.</p>
467    /// <p>Constraints: A value between 64 and 2048.</p>
468    /// <p>Default: <code>1024</code></p>
469    pub fn replay_window_size(mut self, input: i32) -> Self {
470        self.replay_window_size = ::std::option::Option::Some(input);
471        self
472    }
473    /// <p>The number of packets in an IKE replay window.</p>
474    /// <p>Constraints: A value between 64 and 2048.</p>
475    /// <p>Default: <code>1024</code></p>
476    pub fn set_replay_window_size(mut self, input: ::std::option::Option<i32>) -> Self {
477        self.replay_window_size = input;
478        self
479    }
480    /// <p>The number of packets in an IKE replay window.</p>
481    /// <p>Constraints: A value between 64 and 2048.</p>
482    /// <p>Default: <code>1024</code></p>
483    pub fn get_replay_window_size(&self) -> &::std::option::Option<i32> {
484        &self.replay_window_size
485    }
486    /// <p>The number of seconds after which a DPD timeout occurs.</p>
487    /// <p>Constraints: A value greater than or equal to 30.</p>
488    /// <p>Default: <code>30</code></p>
489    pub fn dpd_timeout_seconds(mut self, input: i32) -> Self {
490        self.dpd_timeout_seconds = ::std::option::Option::Some(input);
491        self
492    }
493    /// <p>The number of seconds after which a DPD timeout occurs.</p>
494    /// <p>Constraints: A value greater than or equal to 30.</p>
495    /// <p>Default: <code>30</code></p>
496    pub fn set_dpd_timeout_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
497        self.dpd_timeout_seconds = input;
498        self
499    }
500    /// <p>The number of seconds after which a DPD timeout occurs.</p>
501    /// <p>Constraints: A value greater than or equal to 30.</p>
502    /// <p>Default: <code>30</code></p>
503    pub fn get_dpd_timeout_seconds(&self) -> &::std::option::Option<i32> {
504        &self.dpd_timeout_seconds
505    }
506    /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
507    /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code></p>
508    /// <p>Default: <code>clear</code></p>
509    pub fn dpd_timeout_action(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
510        self.dpd_timeout_action = ::std::option::Option::Some(input.into());
511        self
512    }
513    /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
514    /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code></p>
515    /// <p>Default: <code>clear</code></p>
516    pub fn set_dpd_timeout_action(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
517        self.dpd_timeout_action = input;
518        self
519    }
520    /// <p>The action to take after DPD timeout occurs. Specify <code>restart</code> to restart the IKE initiation. Specify <code>clear</code> to end the IKE session.</p>
521    /// <p>Valid Values: <code>clear</code> | <code>none</code> | <code>restart</code></p>
522    /// <p>Default: <code>clear</code></p>
523    pub fn get_dpd_timeout_action(&self) -> &::std::option::Option<::std::string::String> {
524        &self.dpd_timeout_action
525    }
526    /// Appends an item to `phase1_encryption_algorithms`.
527    ///
528    /// To override the contents of this collection use [`set_phase1_encryption_algorithms`](Self::set_phase1_encryption_algorithms).
529    ///
530    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
531    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code></p>
532    pub fn phase1_encryption_algorithms(mut self, input: crate::types::Phase1EncryptionAlgorithmsRequestListValue) -> Self {
533        let mut v = self.phase1_encryption_algorithms.unwrap_or_default();
534        v.push(input);
535        self.phase1_encryption_algorithms = ::std::option::Option::Some(v);
536        self
537    }
538    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
539    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code></p>
540    pub fn set_phase1_encryption_algorithms(
541        mut self,
542        input: ::std::option::Option<::std::vec::Vec<crate::types::Phase1EncryptionAlgorithmsRequestListValue>>,
543    ) -> Self {
544        self.phase1_encryption_algorithms = input;
545        self
546    }
547    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
548    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code></p>
549    pub fn get_phase1_encryption_algorithms(
550        &self,
551    ) -> &::std::option::Option<::std::vec::Vec<crate::types::Phase1EncryptionAlgorithmsRequestListValue>> {
552        &self.phase1_encryption_algorithms
553    }
554    /// Appends an item to `phase2_encryption_algorithms`.
555    ///
556    /// To override the contents of this collection use [`set_phase2_encryption_algorithms`](Self::set_phase2_encryption_algorithms).
557    ///
558    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
559    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code></p>
560    pub fn phase2_encryption_algorithms(mut self, input: crate::types::Phase2EncryptionAlgorithmsRequestListValue) -> Self {
561        let mut v = self.phase2_encryption_algorithms.unwrap_or_default();
562        v.push(input);
563        self.phase2_encryption_algorithms = ::std::option::Option::Some(v);
564        self
565    }
566    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
567    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code></p>
568    pub fn set_phase2_encryption_algorithms(
569        mut self,
570        input: ::std::option::Option<::std::vec::Vec<crate::types::Phase2EncryptionAlgorithmsRequestListValue>>,
571    ) -> Self {
572        self.phase2_encryption_algorithms = input;
573        self
574    }
575    /// <p>One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
576    /// <p>Valid values: <code>AES128</code> | <code>AES256</code> | <code>AES128-GCM-16</code> | <code>AES256-GCM-16</code></p>
577    pub fn get_phase2_encryption_algorithms(
578        &self,
579    ) -> &::std::option::Option<::std::vec::Vec<crate::types::Phase2EncryptionAlgorithmsRequestListValue>> {
580        &self.phase2_encryption_algorithms
581    }
582    /// Appends an item to `phase1_integrity_algorithms`.
583    ///
584    /// To override the contents of this collection use [`set_phase1_integrity_algorithms`](Self::set_phase1_integrity_algorithms).
585    ///
586    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
587    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code></p>
588    pub fn phase1_integrity_algorithms(mut self, input: crate::types::Phase1IntegrityAlgorithmsRequestListValue) -> Self {
589        let mut v = self.phase1_integrity_algorithms.unwrap_or_default();
590        v.push(input);
591        self.phase1_integrity_algorithms = ::std::option::Option::Some(v);
592        self
593    }
594    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
595    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code></p>
596    pub fn set_phase1_integrity_algorithms(
597        mut self,
598        input: ::std::option::Option<::std::vec::Vec<crate::types::Phase1IntegrityAlgorithmsRequestListValue>>,
599    ) -> Self {
600        self.phase1_integrity_algorithms = input;
601        self
602    }
603    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
604    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code></p>
605    pub fn get_phase1_integrity_algorithms(
606        &self,
607    ) -> &::std::option::Option<::std::vec::Vec<crate::types::Phase1IntegrityAlgorithmsRequestListValue>> {
608        &self.phase1_integrity_algorithms
609    }
610    /// Appends an item to `phase2_integrity_algorithms`.
611    ///
612    /// To override the contents of this collection use [`set_phase2_integrity_algorithms`](Self::set_phase2_integrity_algorithms).
613    ///
614    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
615    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code></p>
616    pub fn phase2_integrity_algorithms(mut self, input: crate::types::Phase2IntegrityAlgorithmsRequestListValue) -> Self {
617        let mut v = self.phase2_integrity_algorithms.unwrap_or_default();
618        v.push(input);
619        self.phase2_integrity_algorithms = ::std::option::Option::Some(v);
620        self
621    }
622    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
623    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code></p>
624    pub fn set_phase2_integrity_algorithms(
625        mut self,
626        input: ::std::option::Option<::std::vec::Vec<crate::types::Phase2IntegrityAlgorithmsRequestListValue>>,
627    ) -> Self {
628        self.phase2_integrity_algorithms = input;
629        self
630    }
631    /// <p>One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
632    /// <p>Valid values: <code>SHA1</code> | <code>SHA2-256</code> | <code>SHA2-384</code> | <code>SHA2-512</code></p>
633    pub fn get_phase2_integrity_algorithms(
634        &self,
635    ) -> &::std::option::Option<::std::vec::Vec<crate::types::Phase2IntegrityAlgorithmsRequestListValue>> {
636        &self.phase2_integrity_algorithms
637    }
638    /// Appends an item to `phase1_dh_group_numbers`.
639    ///
640    /// To override the contents of this collection use [`set_phase1_dh_group_numbers`](Self::set_phase1_dh_group_numbers).
641    ///
642    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
643    /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code></p>
644    pub fn phase1_dh_group_numbers(mut self, input: crate::types::Phase1DhGroupNumbersRequestListValue) -> Self {
645        let mut v = self.phase1_dh_group_numbers.unwrap_or_default();
646        v.push(input);
647        self.phase1_dh_group_numbers = ::std::option::Option::Some(v);
648        self
649    }
650    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
651    /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code></p>
652    pub fn set_phase1_dh_group_numbers(
653        mut self,
654        input: ::std::option::Option<::std::vec::Vec<crate::types::Phase1DhGroupNumbersRequestListValue>>,
655    ) -> Self {
656        self.phase1_dh_group_numbers = input;
657        self
658    }
659    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.</p>
660    /// <p>Valid values: <code>2</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code></p>
661    pub fn get_phase1_dh_group_numbers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Phase1DhGroupNumbersRequestListValue>> {
662        &self.phase1_dh_group_numbers
663    }
664    /// Appends an item to `phase2_dh_group_numbers`.
665    ///
666    /// To override the contents of this collection use [`set_phase2_dh_group_numbers`](Self::set_phase2_dh_group_numbers).
667    ///
668    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
669    /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code></p>
670    pub fn phase2_dh_group_numbers(mut self, input: crate::types::Phase2DhGroupNumbersRequestListValue) -> Self {
671        let mut v = self.phase2_dh_group_numbers.unwrap_or_default();
672        v.push(input);
673        self.phase2_dh_group_numbers = ::std::option::Option::Some(v);
674        self
675    }
676    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
677    /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code></p>
678    pub fn set_phase2_dh_group_numbers(
679        mut self,
680        input: ::std::option::Option<::std::vec::Vec<crate::types::Phase2DhGroupNumbersRequestListValue>>,
681    ) -> Self {
682        self.phase2_dh_group_numbers = input;
683        self
684    }
685    /// <p>One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.</p>
686    /// <p>Valid values: <code>2</code> | <code>5</code> | <code>14</code> | <code>15</code> | <code>16</code> | <code>17</code> | <code>18</code> | <code>19</code> | <code>20</code> | <code>21</code> | <code>22</code> | <code>23</code> | <code>24</code></p>
687    pub fn get_phase2_dh_group_numbers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Phase2DhGroupNumbersRequestListValue>> {
688        &self.phase2_dh_group_numbers
689    }
690    /// Appends an item to `ike_versions`.
691    ///
692    /// To override the contents of this collection use [`set_ike_versions`](Self::set_ike_versions).
693    ///
694    /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
695    /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code></p>
696    pub fn ike_versions(mut self, input: crate::types::IkeVersionsRequestListValue) -> Self {
697        let mut v = self.ike_versions.unwrap_or_default();
698        v.push(input);
699        self.ike_versions = ::std::option::Option::Some(v);
700        self
701    }
702    /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
703    /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code></p>
704    pub fn set_ike_versions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IkeVersionsRequestListValue>>) -> Self {
705        self.ike_versions = input;
706        self
707    }
708    /// <p>The IKE versions that are permitted for the VPN tunnel.</p>
709    /// <p>Valid values: <code>ikev1</code> | <code>ikev2</code></p>
710    pub fn get_ike_versions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IkeVersionsRequestListValue>> {
711        &self.ike_versions
712    }
713    /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
714    /// <p>Valid Values: <code>add</code> | <code>start</code></p>
715    /// <p>Default: <code>add</code></p>
716    pub fn startup_action(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
717        self.startup_action = ::std::option::Option::Some(input.into());
718        self
719    }
720    /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
721    /// <p>Valid Values: <code>add</code> | <code>start</code></p>
722    /// <p>Default: <code>add</code></p>
723    pub fn set_startup_action(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
724        self.startup_action = input;
725        self
726    }
727    /// <p>The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify <code>start</code> for Amazon Web Services to initiate the IKE negotiation.</p>
728    /// <p>Valid Values: <code>add</code> | <code>start</code></p>
729    /// <p>Default: <code>add</code></p>
730    pub fn get_startup_action(&self) -> &::std::option::Option<::std::string::String> {
731        &self.startup_action
732    }
733    /// <p>Options for logging VPN tunnel activity.</p>
734    pub fn log_options(mut self, input: crate::types::VpnTunnelLogOptionsSpecification) -> Self {
735        self.log_options = ::std::option::Option::Some(input);
736        self
737    }
738    /// <p>Options for logging VPN tunnel activity.</p>
739    pub fn set_log_options(mut self, input: ::std::option::Option<crate::types::VpnTunnelLogOptionsSpecification>) -> Self {
740        self.log_options = input;
741        self
742    }
743    /// <p>Options for logging VPN tunnel activity.</p>
744    pub fn get_log_options(&self) -> &::std::option::Option<crate::types::VpnTunnelLogOptionsSpecification> {
745        &self.log_options
746    }
747    /// <p>Turn on or off tunnel endpoint lifecycle control feature.</p>
748    pub fn enable_tunnel_lifecycle_control(mut self, input: bool) -> Self {
749        self.enable_tunnel_lifecycle_control = ::std::option::Option::Some(input);
750        self
751    }
752    /// <p>Turn on or off tunnel endpoint lifecycle control feature.</p>
753    pub fn set_enable_tunnel_lifecycle_control(mut self, input: ::std::option::Option<bool>) -> Self {
754        self.enable_tunnel_lifecycle_control = input;
755        self
756    }
757    /// <p>Turn on or off tunnel endpoint lifecycle control feature.</p>
758    pub fn get_enable_tunnel_lifecycle_control(&self) -> &::std::option::Option<bool> {
759        &self.enable_tunnel_lifecycle_control
760    }
761    /// Consumes the builder and constructs a [`VpnTunnelOptionsSpecification`](crate::types::VpnTunnelOptionsSpecification).
762    pub fn build(self) -> crate::types::VpnTunnelOptionsSpecification {
763        crate::types::VpnTunnelOptionsSpecification {
764            tunnel_inside_cidr: self.tunnel_inside_cidr,
765            tunnel_inside_ipv6_cidr: self.tunnel_inside_ipv6_cidr,
766            pre_shared_key: self.pre_shared_key,
767            phase1_lifetime_seconds: self.phase1_lifetime_seconds,
768            phase2_lifetime_seconds: self.phase2_lifetime_seconds,
769            rekey_margin_time_seconds: self.rekey_margin_time_seconds,
770            rekey_fuzz_percentage: self.rekey_fuzz_percentage,
771            replay_window_size: self.replay_window_size,
772            dpd_timeout_seconds: self.dpd_timeout_seconds,
773            dpd_timeout_action: self.dpd_timeout_action,
774            phase1_encryption_algorithms: self.phase1_encryption_algorithms,
775            phase2_encryption_algorithms: self.phase2_encryption_algorithms,
776            phase1_integrity_algorithms: self.phase1_integrity_algorithms,
777            phase2_integrity_algorithms: self.phase2_integrity_algorithms,
778            phase1_dh_group_numbers: self.phase1_dh_group_numbers,
779            phase2_dh_group_numbers: self.phase2_dh_group_numbers,
780            ike_versions: self.ike_versions,
781            startup_action: self.startup_action,
782            log_options: self.log_options,
783            enable_tunnel_lifecycle_control: self.enable_tunnel_lifecycle_control,
784        }
785    }
786}
787impl ::std::fmt::Debug for VpnTunnelOptionsSpecificationBuilder {
788    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
789        let mut formatter = f.debug_struct("VpnTunnelOptionsSpecificationBuilder");
790        formatter.field("tunnel_inside_cidr", &self.tunnel_inside_cidr);
791        formatter.field("tunnel_inside_ipv6_cidr", &self.tunnel_inside_ipv6_cidr);
792        formatter.field("pre_shared_key", &"*** Sensitive Data Redacted ***");
793        formatter.field("phase1_lifetime_seconds", &self.phase1_lifetime_seconds);
794        formatter.field("phase2_lifetime_seconds", &self.phase2_lifetime_seconds);
795        formatter.field("rekey_margin_time_seconds", &self.rekey_margin_time_seconds);
796        formatter.field("rekey_fuzz_percentage", &self.rekey_fuzz_percentage);
797        formatter.field("replay_window_size", &self.replay_window_size);
798        formatter.field("dpd_timeout_seconds", &self.dpd_timeout_seconds);
799        formatter.field("dpd_timeout_action", &self.dpd_timeout_action);
800        formatter.field("phase1_encryption_algorithms", &self.phase1_encryption_algorithms);
801        formatter.field("phase2_encryption_algorithms", &self.phase2_encryption_algorithms);
802        formatter.field("phase1_integrity_algorithms", &self.phase1_integrity_algorithms);
803        formatter.field("phase2_integrity_algorithms", &self.phase2_integrity_algorithms);
804        formatter.field("phase1_dh_group_numbers", &self.phase1_dh_group_numbers);
805        formatter.field("phase2_dh_group_numbers", &self.phase2_dh_group_numbers);
806        formatter.field("ike_versions", &self.ike_versions);
807        formatter.field("startup_action", &self.startup_action);
808        formatter.field("log_options", &self.log_options);
809        formatter.field("enable_tunnel_lifecycle_control", &self.enable_tunnel_lifecycle_control);
810        formatter.finish()
811    }
812}