aws_sdk_appstream/operation/disable_user/
_disable_user_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct DisableUserInput {
6 pub user_name: ::std::option::Option<::std::string::String>,
10 pub authentication_type: ::std::option::Option<crate::types::AuthenticationType>,
12}
13impl DisableUserInput {
14 pub fn user_name(&self) -> ::std::option::Option<&str> {
18 self.user_name.as_deref()
19 }
20 pub fn authentication_type(&self) -> ::std::option::Option<&crate::types::AuthenticationType> {
22 self.authentication_type.as_ref()
23 }
24}
25impl ::std::fmt::Debug for DisableUserInput {
26 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27 let mut formatter = f.debug_struct("DisableUserInput");
28 formatter.field("user_name", &"*** Sensitive Data Redacted ***");
29 formatter.field("authentication_type", &self.authentication_type);
30 formatter.finish()
31 }
32}
33impl DisableUserInput {
34 pub fn builder() -> crate::operation::disable_user::builders::DisableUserInputBuilder {
36 crate::operation::disable_user::builders::DisableUserInputBuilder::default()
37 }
38}
39
40#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
42#[non_exhaustive]
43pub struct DisableUserInputBuilder {
44 pub(crate) user_name: ::std::option::Option<::std::string::String>,
45 pub(crate) authentication_type: ::std::option::Option<crate::types::AuthenticationType>,
46}
47impl DisableUserInputBuilder {
48 pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.user_name = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.user_name = input;
61 self
62 }
63 pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
67 &self.user_name
68 }
69 pub fn authentication_type(mut self, input: crate::types::AuthenticationType) -> Self {
72 self.authentication_type = ::std::option::Option::Some(input);
73 self
74 }
75 pub fn set_authentication_type(mut self, input: ::std::option::Option<crate::types::AuthenticationType>) -> Self {
77 self.authentication_type = input;
78 self
79 }
80 pub fn get_authentication_type(&self) -> &::std::option::Option<crate::types::AuthenticationType> {
82 &self.authentication_type
83 }
84 pub fn build(self) -> ::std::result::Result<crate::operation::disable_user::DisableUserInput, ::aws_smithy_types::error::operation::BuildError> {
86 ::std::result::Result::Ok(crate::operation::disable_user::DisableUserInput {
87 user_name: self.user_name,
88 authentication_type: self.authentication_type,
89 })
90 }
91}
92impl ::std::fmt::Debug for DisableUserInputBuilder {
93 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
94 let mut formatter = f.debug_struct("DisableUserInputBuilder");
95 formatter.field("user_name", &"*** Sensitive Data Redacted ***");
96 formatter.field("authentication_type", &self.authentication_type);
97 formatter.finish()
98 }
99}