1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains information about a Remote Authentication Dial In User Service (RADIUS) server.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct RadiusSettings {
    /// <p>An array of strings that contains the fully qualified domain name (FQDN) or IP addresses of the RADIUS server endpoints, or the FQDN or IP addresses of your RADIUS server load balancer.</p>
    pub radius_servers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The port that your RADIUS server is using for communications. Your self-managed network must allow inbound traffic over this port from the Directory Service servers.</p>
    pub radius_port: ::std::option::Option<i32>,
    /// <p>The amount of time, in seconds, to wait for the RADIUS server to respond.</p>
    pub radius_timeout: ::std::option::Option<i32>,
    /// <p>The maximum number of times that communication with the RADIUS server is attempted.</p>
    pub radius_retries: i32,
    /// <p>Required for enabling RADIUS on the directory.</p>
    pub shared_secret: ::std::option::Option<::std::string::String>,
    /// <p>The protocol specified for your RADIUS endpoints.</p>
    pub authentication_protocol: ::std::option::Option<crate::types::RadiusAuthenticationProtocol>,
    /// <p>Not currently used.</p>
    pub display_label: ::std::option::Option<::std::string::String>,
    /// <p>Not currently used.</p>
    pub use_same_username: bool,
}
impl RadiusSettings {
    /// <p>An array of strings that contains the fully qualified domain name (FQDN) or IP addresses of the RADIUS server endpoints, or the FQDN or IP addresses of your RADIUS server load balancer.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.radius_servers.is_none()`.
    pub fn radius_servers(&self) -> &[::std::string::String] {
        self.radius_servers.as_deref().unwrap_or_default()
    }
    /// <p>The port that your RADIUS server is using for communications. Your self-managed network must allow inbound traffic over this port from the Directory Service servers.</p>
    pub fn radius_port(&self) -> ::std::option::Option<i32> {
        self.radius_port
    }
    /// <p>The amount of time, in seconds, to wait for the RADIUS server to respond.</p>
    pub fn radius_timeout(&self) -> ::std::option::Option<i32> {
        self.radius_timeout
    }
    /// <p>The maximum number of times that communication with the RADIUS server is attempted.</p>
    pub fn radius_retries(&self) -> i32 {
        self.radius_retries
    }
    /// <p>Required for enabling RADIUS on the directory.</p>
    pub fn shared_secret(&self) -> ::std::option::Option<&str> {
        self.shared_secret.as_deref()
    }
    /// <p>The protocol specified for your RADIUS endpoints.</p>
    pub fn authentication_protocol(&self) -> ::std::option::Option<&crate::types::RadiusAuthenticationProtocol> {
        self.authentication_protocol.as_ref()
    }
    /// <p>Not currently used.</p>
    pub fn display_label(&self) -> ::std::option::Option<&str> {
        self.display_label.as_deref()
    }
    /// <p>Not currently used.</p>
    pub fn use_same_username(&self) -> bool {
        self.use_same_username
    }
}
impl ::std::fmt::Debug for RadiusSettings {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("RadiusSettings");
        formatter.field("radius_servers", &self.radius_servers);
        formatter.field("radius_port", &self.radius_port);
        formatter.field("radius_timeout", &self.radius_timeout);
        formatter.field("radius_retries", &self.radius_retries);
        formatter.field("shared_secret", &"*** Sensitive Data Redacted ***");
        formatter.field("authentication_protocol", &self.authentication_protocol);
        formatter.field("display_label", &self.display_label);
        formatter.field("use_same_username", &self.use_same_username);
        formatter.finish()
    }
}
impl RadiusSettings {
    /// Creates a new builder-style object to manufacture [`RadiusSettings`](crate::types::RadiusSettings).
    pub fn builder() -> crate::types::builders::RadiusSettingsBuilder {
        crate::types::builders::RadiusSettingsBuilder::default()
    }
}

/// A builder for [`RadiusSettings`](crate::types::RadiusSettings).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct RadiusSettingsBuilder {
    pub(crate) radius_servers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) radius_port: ::std::option::Option<i32>,
    pub(crate) radius_timeout: ::std::option::Option<i32>,
    pub(crate) radius_retries: ::std::option::Option<i32>,
    pub(crate) shared_secret: ::std::option::Option<::std::string::String>,
    pub(crate) authentication_protocol: ::std::option::Option<crate::types::RadiusAuthenticationProtocol>,
    pub(crate) display_label: ::std::option::Option<::std::string::String>,
    pub(crate) use_same_username: ::std::option::Option<bool>,
}
impl RadiusSettingsBuilder {
    /// Appends an item to `radius_servers`.
    ///
    /// To override the contents of this collection use [`set_radius_servers`](Self::set_radius_servers).
    ///
    /// <p>An array of strings that contains the fully qualified domain name (FQDN) or IP addresses of the RADIUS server endpoints, or the FQDN or IP addresses of your RADIUS server load balancer.</p>
    pub fn radius_servers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.radius_servers.unwrap_or_default();
        v.push(input.into());
        self.radius_servers = ::std::option::Option::Some(v);
        self
    }
    /// <p>An array of strings that contains the fully qualified domain name (FQDN) or IP addresses of the RADIUS server endpoints, or the FQDN or IP addresses of your RADIUS server load balancer.</p>
    pub fn set_radius_servers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.radius_servers = input;
        self
    }
    /// <p>An array of strings that contains the fully qualified domain name (FQDN) or IP addresses of the RADIUS server endpoints, or the FQDN or IP addresses of your RADIUS server load balancer.</p>
    pub fn get_radius_servers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.radius_servers
    }
    /// <p>The port that your RADIUS server is using for communications. Your self-managed network must allow inbound traffic over this port from the Directory Service servers.</p>
    pub fn radius_port(mut self, input: i32) -> Self {
        self.radius_port = ::std::option::Option::Some(input);
        self
    }
    /// <p>The port that your RADIUS server is using for communications. Your self-managed network must allow inbound traffic over this port from the Directory Service servers.</p>
    pub fn set_radius_port(mut self, input: ::std::option::Option<i32>) -> Self {
        self.radius_port = input;
        self
    }
    /// <p>The port that your RADIUS server is using for communications. Your self-managed network must allow inbound traffic over this port from the Directory Service servers.</p>
    pub fn get_radius_port(&self) -> &::std::option::Option<i32> {
        &self.radius_port
    }
    /// <p>The amount of time, in seconds, to wait for the RADIUS server to respond.</p>
    pub fn radius_timeout(mut self, input: i32) -> Self {
        self.radius_timeout = ::std::option::Option::Some(input);
        self
    }
    /// <p>The amount of time, in seconds, to wait for the RADIUS server to respond.</p>
    pub fn set_radius_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
        self.radius_timeout = input;
        self
    }
    /// <p>The amount of time, in seconds, to wait for the RADIUS server to respond.</p>
    pub fn get_radius_timeout(&self) -> &::std::option::Option<i32> {
        &self.radius_timeout
    }
    /// <p>The maximum number of times that communication with the RADIUS server is attempted.</p>
    pub fn radius_retries(mut self, input: i32) -> Self {
        self.radius_retries = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of times that communication with the RADIUS server is attempted.</p>
    pub fn set_radius_retries(mut self, input: ::std::option::Option<i32>) -> Self {
        self.radius_retries = input;
        self
    }
    /// <p>The maximum number of times that communication with the RADIUS server is attempted.</p>
    pub fn get_radius_retries(&self) -> &::std::option::Option<i32> {
        &self.radius_retries
    }
    /// <p>Required for enabling RADIUS on the directory.</p>
    pub fn shared_secret(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.shared_secret = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Required for enabling RADIUS on the directory.</p>
    pub fn set_shared_secret(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.shared_secret = input;
        self
    }
    /// <p>Required for enabling RADIUS on the directory.</p>
    pub fn get_shared_secret(&self) -> &::std::option::Option<::std::string::String> {
        &self.shared_secret
    }
    /// <p>The protocol specified for your RADIUS endpoints.</p>
    pub fn authentication_protocol(mut self, input: crate::types::RadiusAuthenticationProtocol) -> Self {
        self.authentication_protocol = ::std::option::Option::Some(input);
        self
    }
    /// <p>The protocol specified for your RADIUS endpoints.</p>
    pub fn set_authentication_protocol(mut self, input: ::std::option::Option<crate::types::RadiusAuthenticationProtocol>) -> Self {
        self.authentication_protocol = input;
        self
    }
    /// <p>The protocol specified for your RADIUS endpoints.</p>
    pub fn get_authentication_protocol(&self) -> &::std::option::Option<crate::types::RadiusAuthenticationProtocol> {
        &self.authentication_protocol
    }
    /// <p>Not currently used.</p>
    pub fn display_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.display_label = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Not currently used.</p>
    pub fn set_display_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.display_label = input;
        self
    }
    /// <p>Not currently used.</p>
    pub fn get_display_label(&self) -> &::std::option::Option<::std::string::String> {
        &self.display_label
    }
    /// <p>Not currently used.</p>
    pub fn use_same_username(mut self, input: bool) -> Self {
        self.use_same_username = ::std::option::Option::Some(input);
        self
    }
    /// <p>Not currently used.</p>
    pub fn set_use_same_username(mut self, input: ::std::option::Option<bool>) -> Self {
        self.use_same_username = input;
        self
    }
    /// <p>Not currently used.</p>
    pub fn get_use_same_username(&self) -> &::std::option::Option<bool> {
        &self.use_same_username
    }
    /// Consumes the builder and constructs a [`RadiusSettings`](crate::types::RadiusSettings).
    pub fn build(self) -> crate::types::RadiusSettings {
        crate::types::RadiusSettings {
            radius_servers: self.radius_servers,
            radius_port: self.radius_port,
            radius_timeout: self.radius_timeout,
            radius_retries: self.radius_retries.unwrap_or_default(),
            shared_secret: self.shared_secret,
            authentication_protocol: self.authentication_protocol,
            display_label: self.display_label,
            use_same_username: self.use_same_username.unwrap_or_default(),
        }
    }
}
impl ::std::fmt::Debug for RadiusSettingsBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("RadiusSettingsBuilder");
        formatter.field("radius_servers", &self.radius_servers);
        formatter.field("radius_port", &self.radius_port);
        formatter.field("radius_timeout", &self.radius_timeout);
        formatter.field("radius_retries", &self.radius_retries);
        formatter.field("shared_secret", &"*** Sensitive Data Redacted ***");
        formatter.field("authentication_protocol", &self.authentication_protocol);
        formatter.field("display_label", &self.display_label);
        formatter.field("use_same_username", &self.use_same_username);
        formatter.finish()
    }
}