aws_sdk_directconnect/operation/update_connection/
_update_connection_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateConnectionInput {
6 pub connection_id: ::std::option::Option<::std::string::String>,
9 pub connection_name: ::std::option::Option<::std::string::String>,
11 pub encryption_mode: ::std::option::Option<::std::string::String>,
14}
15impl UpdateConnectionInput {
16 pub fn connection_id(&self) -> ::std::option::Option<&str> {
19 self.connection_id.as_deref()
20 }
21 pub fn connection_name(&self) -> ::std::option::Option<&str> {
23 self.connection_name.as_deref()
24 }
25 pub fn encryption_mode(&self) -> ::std::option::Option<&str> {
28 self.encryption_mode.as_deref()
29 }
30}
31impl UpdateConnectionInput {
32 pub fn builder() -> crate::operation::update_connection::builders::UpdateConnectionInputBuilder {
34 crate::operation::update_connection::builders::UpdateConnectionInputBuilder::default()
35 }
36}
37
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct UpdateConnectionInputBuilder {
42 pub(crate) connection_id: ::std::option::Option<::std::string::String>,
43 pub(crate) connection_name: ::std::option::Option<::std::string::String>,
44 pub(crate) encryption_mode: ::std::option::Option<::std::string::String>,
45}
46impl UpdateConnectionInputBuilder {
47 pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
51 self.connection_id = ::std::option::Option::Some(input.into());
52 self
53 }
54 pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
57 self.connection_id = input;
58 self
59 }
60 pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.connection_id
64 }
65 pub fn connection_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.connection_name = ::std::option::Option::Some(input.into());
68 self
69 }
70 pub fn set_connection_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.connection_name = input;
73 self
74 }
75 pub fn get_connection_name(&self) -> &::std::option::Option<::std::string::String> {
77 &self.connection_name
78 }
79 pub fn encryption_mode(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82 self.encryption_mode = ::std::option::Option::Some(input.into());
83 self
84 }
85 pub fn set_encryption_mode(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.encryption_mode = input;
89 self
90 }
91 pub fn get_encryption_mode(&self) -> &::std::option::Option<::std::string::String> {
94 &self.encryption_mode
95 }
96 pub fn build(
98 self,
99 ) -> ::std::result::Result<crate::operation::update_connection::UpdateConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
100 ::std::result::Result::Ok(crate::operation::update_connection::UpdateConnectionInput {
101 connection_id: self.connection_id,
102 connection_name: self.connection_name,
103 encryption_mode: self.encryption_mode,
104 })
105 }
106}