aws_sdk_outposts/operation/start_connection/
_start_connection_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 StartConnectionInput {
6    /// <p>The serial number of the dongle.</p>
7    pub device_serial_number: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the Outpost server.</p>
9    pub asset_id: ::std::option::Option<::std::string::String>,
10    /// <p>The public key of the client.</p>
11    pub client_public_key: ::std::option::Option<::std::string::String>,
12    /// <p>The device index of the network interface on the Outpost server.</p>
13    pub network_interface_device_index: ::std::option::Option<i32>,
14}
15impl StartConnectionInput {
16    /// <p>The serial number of the dongle.</p>
17    pub fn device_serial_number(&self) -> ::std::option::Option<&str> {
18        self.device_serial_number.as_deref()
19    }
20    /// <p>The ID of the Outpost server.</p>
21    pub fn asset_id(&self) -> ::std::option::Option<&str> {
22        self.asset_id.as_deref()
23    }
24    /// <p>The public key of the client.</p>
25    pub fn client_public_key(&self) -> ::std::option::Option<&str> {
26        self.client_public_key.as_deref()
27    }
28    /// <p>The device index of the network interface on the Outpost server.</p>
29    pub fn network_interface_device_index(&self) -> ::std::option::Option<i32> {
30        self.network_interface_device_index
31    }
32}
33impl StartConnectionInput {
34    /// Creates a new builder-style object to manufacture [`StartConnectionInput`](crate::operation::start_connection::StartConnectionInput).
35    pub fn builder() -> crate::operation::start_connection::builders::StartConnectionInputBuilder {
36        crate::operation::start_connection::builders::StartConnectionInputBuilder::default()
37    }
38}
39
40/// A builder for [`StartConnectionInput`](crate::operation::start_connection::StartConnectionInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct StartConnectionInputBuilder {
44    pub(crate) device_serial_number: ::std::option::Option<::std::string::String>,
45    pub(crate) asset_id: ::std::option::Option<::std::string::String>,
46    pub(crate) client_public_key: ::std::option::Option<::std::string::String>,
47    pub(crate) network_interface_device_index: ::std::option::Option<i32>,
48}
49impl StartConnectionInputBuilder {
50    /// <p>The serial number of the dongle.</p>
51    pub fn device_serial_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.device_serial_number = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>The serial number of the dongle.</p>
56    pub fn set_device_serial_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57        self.device_serial_number = input;
58        self
59    }
60    /// <p>The serial number of the dongle.</p>
61    pub fn get_device_serial_number(&self) -> &::std::option::Option<::std::string::String> {
62        &self.device_serial_number
63    }
64    /// <p>The ID of the Outpost server.</p>
65    /// This field is required.
66    pub fn asset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.asset_id = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The ID of the Outpost server.</p>
71    pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.asset_id = input;
73        self
74    }
75    /// <p>The ID of the Outpost server.</p>
76    pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
77        &self.asset_id
78    }
79    /// <p>The public key of the client.</p>
80    /// This field is required.
81    pub fn client_public_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.client_public_key = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The public key of the client.</p>
86    pub fn set_client_public_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.client_public_key = input;
88        self
89    }
90    /// <p>The public key of the client.</p>
91    pub fn get_client_public_key(&self) -> &::std::option::Option<::std::string::String> {
92        &self.client_public_key
93    }
94    /// <p>The device index of the network interface on the Outpost server.</p>
95    /// This field is required.
96    pub fn network_interface_device_index(mut self, input: i32) -> Self {
97        self.network_interface_device_index = ::std::option::Option::Some(input);
98        self
99    }
100    /// <p>The device index of the network interface on the Outpost server.</p>
101    pub fn set_network_interface_device_index(mut self, input: ::std::option::Option<i32>) -> Self {
102        self.network_interface_device_index = input;
103        self
104    }
105    /// <p>The device index of the network interface on the Outpost server.</p>
106    pub fn get_network_interface_device_index(&self) -> &::std::option::Option<i32> {
107        &self.network_interface_device_index
108    }
109    /// Consumes the builder and constructs a [`StartConnectionInput`](crate::operation::start_connection::StartConnectionInput).
110    pub fn build(
111        self,
112    ) -> ::std::result::Result<crate::operation::start_connection::StartConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
113        ::std::result::Result::Ok(crate::operation::start_connection::StartConnectionInput {
114            device_serial_number: self.device_serial_number,
115            asset_id: self.asset_id,
116            client_public_key: self.client_public_key,
117            network_interface_device_index: self.network_interface_device_index,
118        })
119    }
120}