aws_sdk_mailmanager/operation/update_relay/
_update_relay_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateRelayInput {
6 pub relay_id: ::std::option::Option<::std::string::String>,
8 pub relay_name: ::std::option::Option<::std::string::String>,
10 pub server_name: ::std::option::Option<::std::string::String>,
12 pub server_port: ::std::option::Option<i32>,
14 pub authentication: ::std::option::Option<crate::types::RelayAuthentication>,
16}
17impl UpdateRelayInput {
18 pub fn relay_id(&self) -> ::std::option::Option<&str> {
20 self.relay_id.as_deref()
21 }
22 pub fn relay_name(&self) -> ::std::option::Option<&str> {
24 self.relay_name.as_deref()
25 }
26 pub fn server_name(&self) -> ::std::option::Option<&str> {
28 self.server_name.as_deref()
29 }
30 pub fn server_port(&self) -> ::std::option::Option<i32> {
32 self.server_port
33 }
34 pub fn authentication(&self) -> ::std::option::Option<&crate::types::RelayAuthentication> {
36 self.authentication.as_ref()
37 }
38}
39impl UpdateRelayInput {
40 pub fn builder() -> crate::operation::update_relay::builders::UpdateRelayInputBuilder {
42 crate::operation::update_relay::builders::UpdateRelayInputBuilder::default()
43 }
44}
45
46#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct UpdateRelayInputBuilder {
50 pub(crate) relay_id: ::std::option::Option<::std::string::String>,
51 pub(crate) relay_name: ::std::option::Option<::std::string::String>,
52 pub(crate) server_name: ::std::option::Option<::std::string::String>,
53 pub(crate) server_port: ::std::option::Option<i32>,
54 pub(crate) authentication: ::std::option::Option<crate::types::RelayAuthentication>,
55}
56impl UpdateRelayInputBuilder {
57 pub fn relay_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.relay_id = ::std::option::Option::Some(input.into());
61 self
62 }
63 pub fn set_relay_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.relay_id = input;
66 self
67 }
68 pub fn get_relay_id(&self) -> &::std::option::Option<::std::string::String> {
70 &self.relay_id
71 }
72 pub fn relay_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.relay_name = ::std::option::Option::Some(input.into());
75 self
76 }
77 pub fn set_relay_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.relay_name = input;
80 self
81 }
82 pub fn get_relay_name(&self) -> &::std::option::Option<::std::string::String> {
84 &self.relay_name
85 }
86 pub fn server_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.server_name = ::std::option::Option::Some(input.into());
89 self
90 }
91 pub fn set_server_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.server_name = input;
94 self
95 }
96 pub fn get_server_name(&self) -> &::std::option::Option<::std::string::String> {
98 &self.server_name
99 }
100 pub fn server_port(mut self, input: i32) -> Self {
102 self.server_port = ::std::option::Option::Some(input);
103 self
104 }
105 pub fn set_server_port(mut self, input: ::std::option::Option<i32>) -> Self {
107 self.server_port = input;
108 self
109 }
110 pub fn get_server_port(&self) -> &::std::option::Option<i32> {
112 &self.server_port
113 }
114 pub fn authentication(mut self, input: crate::types::RelayAuthentication) -> Self {
116 self.authentication = ::std::option::Option::Some(input);
117 self
118 }
119 pub fn set_authentication(mut self, input: ::std::option::Option<crate::types::RelayAuthentication>) -> Self {
121 self.authentication = input;
122 self
123 }
124 pub fn get_authentication(&self) -> &::std::option::Option<crate::types::RelayAuthentication> {
126 &self.authentication
127 }
128 pub fn build(self) -> ::std::result::Result<crate::operation::update_relay::UpdateRelayInput, ::aws_smithy_types::error::operation::BuildError> {
130 ::std::result::Result::Ok(crate::operation::update_relay::UpdateRelayInput {
131 relay_id: self.relay_id,
132 relay_name: self.relay_name,
133 server_name: self.server_name,
134 server_port: self.server_port,
135 authentication: self.authentication,
136 })
137 }
138}