Skip to main content

aws_sdk_ec2/operation/get_vpn_connection_device_sample_configuration/
_get_vpn_connection_device_sample_configuration_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetVpnConnectionDeviceSampleConfigurationInput {
6    /// <p>The <code>VpnConnectionId</code> specifies the Site-to-Site VPN connection used for the sample configuration.</p>
7    pub vpn_connection_id: ::std::option::Option<::std::string::String>,
8    /// <p>Device identifier provided by the <code>GetVpnConnectionDeviceTypes</code> API.</p>
9    pub vpn_connection_device_type_id: ::std::option::Option<::std::string::String>,
10    /// <p>The IKE version to be used in the sample configuration file for your customer gateway device. You can specify one of the following versions: <code>ikev1</code> or <code>ikev2</code>.</p>
11    pub internet_key_exchange_version: ::std::option::Option<::std::string::String>,
12    /// <p>The type of sample configuration to generate. Valid values are "compatibility" (includes IKEv1) or "recommended" (throws UnsupportedOperationException for IKEv1).</p>
13    pub sample_type: ::std::option::Option<::std::string::String>,
14    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
15    pub dry_run: ::std::option::Option<bool>,
16}
17impl GetVpnConnectionDeviceSampleConfigurationInput {
18    /// <p>The <code>VpnConnectionId</code> specifies the Site-to-Site VPN connection used for the sample configuration.</p>
19    pub fn vpn_connection_id(&self) -> ::std::option::Option<&str> {
20        self.vpn_connection_id.as_deref()
21    }
22    /// <p>Device identifier provided by the <code>GetVpnConnectionDeviceTypes</code> API.</p>
23    pub fn vpn_connection_device_type_id(&self) -> ::std::option::Option<&str> {
24        self.vpn_connection_device_type_id.as_deref()
25    }
26    /// <p>The IKE version to be used in the sample configuration file for your customer gateway device. You can specify one of the following versions: <code>ikev1</code> or <code>ikev2</code>.</p>
27    pub fn internet_key_exchange_version(&self) -> ::std::option::Option<&str> {
28        self.internet_key_exchange_version.as_deref()
29    }
30    /// <p>The type of sample configuration to generate. Valid values are "compatibility" (includes IKEv1) or "recommended" (throws UnsupportedOperationException for IKEv1).</p>
31    pub fn sample_type(&self) -> ::std::option::Option<&str> {
32        self.sample_type.as_deref()
33    }
34    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
35    pub fn dry_run(&self) -> ::std::option::Option<bool> {
36        self.dry_run
37    }
38}
39impl GetVpnConnectionDeviceSampleConfigurationInput {
40    /// Creates a new builder-style object to manufacture [`GetVpnConnectionDeviceSampleConfigurationInput`](crate::operation::get_vpn_connection_device_sample_configuration::GetVpnConnectionDeviceSampleConfigurationInput).
41    pub fn builder(
42    ) -> crate::operation::get_vpn_connection_device_sample_configuration::builders::GetVpnConnectionDeviceSampleConfigurationInputBuilder {
43        crate::operation::get_vpn_connection_device_sample_configuration::builders::GetVpnConnectionDeviceSampleConfigurationInputBuilder::default()
44    }
45}
46
47/// A builder for [`GetVpnConnectionDeviceSampleConfigurationInput`](crate::operation::get_vpn_connection_device_sample_configuration::GetVpnConnectionDeviceSampleConfigurationInput).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct GetVpnConnectionDeviceSampleConfigurationInputBuilder {
51    pub(crate) vpn_connection_id: ::std::option::Option<::std::string::String>,
52    pub(crate) vpn_connection_device_type_id: ::std::option::Option<::std::string::String>,
53    pub(crate) internet_key_exchange_version: ::std::option::Option<::std::string::String>,
54    pub(crate) sample_type: ::std::option::Option<::std::string::String>,
55    pub(crate) dry_run: ::std::option::Option<bool>,
56}
57impl GetVpnConnectionDeviceSampleConfigurationInputBuilder {
58    /// <p>The <code>VpnConnectionId</code> specifies the Site-to-Site VPN connection used for the sample configuration.</p>
59    /// This field is required.
60    pub fn vpn_connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.vpn_connection_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The <code>VpnConnectionId</code> specifies the Site-to-Site VPN connection used for the sample configuration.</p>
65    pub fn set_vpn_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.vpn_connection_id = input;
67        self
68    }
69    /// <p>The <code>VpnConnectionId</code> specifies the Site-to-Site VPN connection used for the sample configuration.</p>
70    pub fn get_vpn_connection_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.vpn_connection_id
72    }
73    /// <p>Device identifier provided by the <code>GetVpnConnectionDeviceTypes</code> API.</p>
74    /// This field is required.
75    pub fn vpn_connection_device_type_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.vpn_connection_device_type_id = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>Device identifier provided by the <code>GetVpnConnectionDeviceTypes</code> API.</p>
80    pub fn set_vpn_connection_device_type_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.vpn_connection_device_type_id = input;
82        self
83    }
84    /// <p>Device identifier provided by the <code>GetVpnConnectionDeviceTypes</code> API.</p>
85    pub fn get_vpn_connection_device_type_id(&self) -> &::std::option::Option<::std::string::String> {
86        &self.vpn_connection_device_type_id
87    }
88    /// <p>The IKE version to be used in the sample configuration file for your customer gateway device. You can specify one of the following versions: <code>ikev1</code> or <code>ikev2</code>.</p>
89    pub fn internet_key_exchange_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.internet_key_exchange_version = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The IKE version to be used in the sample configuration file for your customer gateway device. You can specify one of the following versions: <code>ikev1</code> or <code>ikev2</code>.</p>
94    pub fn set_internet_key_exchange_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.internet_key_exchange_version = input;
96        self
97    }
98    /// <p>The IKE version to be used in the sample configuration file for your customer gateway device. You can specify one of the following versions: <code>ikev1</code> or <code>ikev2</code>.</p>
99    pub fn get_internet_key_exchange_version(&self) -> &::std::option::Option<::std::string::String> {
100        &self.internet_key_exchange_version
101    }
102    /// <p>The type of sample configuration to generate. Valid values are "compatibility" (includes IKEv1) or "recommended" (throws UnsupportedOperationException for IKEv1).</p>
103    pub fn sample_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.sample_type = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>The type of sample configuration to generate. Valid values are "compatibility" (includes IKEv1) or "recommended" (throws UnsupportedOperationException for IKEv1).</p>
108    pub fn set_sample_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.sample_type = input;
110        self
111    }
112    /// <p>The type of sample configuration to generate. Valid values are "compatibility" (includes IKEv1) or "recommended" (throws UnsupportedOperationException for IKEv1).</p>
113    pub fn get_sample_type(&self) -> &::std::option::Option<::std::string::String> {
114        &self.sample_type
115    }
116    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
117    pub fn dry_run(mut self, input: bool) -> Self {
118        self.dry_run = ::std::option::Option::Some(input);
119        self
120    }
121    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
122    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
123        self.dry_run = input;
124        self
125    }
126    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
127    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
128        &self.dry_run
129    }
130    /// Consumes the builder and constructs a [`GetVpnConnectionDeviceSampleConfigurationInput`](crate::operation::get_vpn_connection_device_sample_configuration::GetVpnConnectionDeviceSampleConfigurationInput).
131    pub fn build(
132        self,
133    ) -> ::std::result::Result<
134        crate::operation::get_vpn_connection_device_sample_configuration::GetVpnConnectionDeviceSampleConfigurationInput,
135        ::aws_smithy_types::error::operation::BuildError,
136    > {
137        ::std::result::Result::Ok(
138            crate::operation::get_vpn_connection_device_sample_configuration::GetVpnConnectionDeviceSampleConfigurationInput {
139                vpn_connection_id: self.vpn_connection_id,
140                vpn_connection_device_type_id: self.vpn_connection_device_type_id,
141                internet_key_exchange_version: self.internet_key_exchange_version,
142                sample_type: self.sample_type,
143                dry_run: self.dry_run,
144            },
145        )
146    }
147}