aws_sdk_directory/operation/enable_client_authentication/
_enable_client_authentication_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 EnableClientAuthenticationInput {
6    /// <p>The identifier of the specified directory.</p>
7    pub directory_id: ::std::option::Option<::std::string::String>,
8    /// <p>The type of client authentication to enable. Currently only the value <code>SmartCard</code> is supported. Smart card authentication in AD Connector requires that you enable Kerberos Constrained Delegation for the Service User to the LDAP service in your self-managed AD.</p>
9    pub r#type: ::std::option::Option<crate::types::ClientAuthenticationType>,
10}
11impl EnableClientAuthenticationInput {
12    /// <p>The identifier of the specified directory.</p>
13    pub fn directory_id(&self) -> ::std::option::Option<&str> {
14        self.directory_id.as_deref()
15    }
16    /// <p>The type of client authentication to enable. Currently only the value <code>SmartCard</code> is supported. Smart card authentication in AD Connector requires that you enable Kerberos Constrained Delegation for the Service User to the LDAP service in your self-managed AD.</p>
17    pub fn r#type(&self) -> ::std::option::Option<&crate::types::ClientAuthenticationType> {
18        self.r#type.as_ref()
19    }
20}
21impl EnableClientAuthenticationInput {
22    /// Creates a new builder-style object to manufacture [`EnableClientAuthenticationInput`](crate::operation::enable_client_authentication::EnableClientAuthenticationInput).
23    pub fn builder() -> crate::operation::enable_client_authentication::builders::EnableClientAuthenticationInputBuilder {
24        crate::operation::enable_client_authentication::builders::EnableClientAuthenticationInputBuilder::default()
25    }
26}
27
28/// A builder for [`EnableClientAuthenticationInput`](crate::operation::enable_client_authentication::EnableClientAuthenticationInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct EnableClientAuthenticationInputBuilder {
32    pub(crate) directory_id: ::std::option::Option<::std::string::String>,
33    pub(crate) r#type: ::std::option::Option<crate::types::ClientAuthenticationType>,
34}
35impl EnableClientAuthenticationInputBuilder {
36    /// <p>The identifier of the specified directory.</p>
37    /// This field is required.
38    pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.directory_id = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The identifier of the specified directory.</p>
43    pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.directory_id = input;
45        self
46    }
47    /// <p>The identifier of the specified directory.</p>
48    pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
49        &self.directory_id
50    }
51    /// <p>The type of client authentication to enable. Currently only the value <code>SmartCard</code> is supported. Smart card authentication in AD Connector requires that you enable Kerberos Constrained Delegation for the Service User to the LDAP service in your self-managed AD.</p>
52    /// This field is required.
53    pub fn r#type(mut self, input: crate::types::ClientAuthenticationType) -> Self {
54        self.r#type = ::std::option::Option::Some(input);
55        self
56    }
57    /// <p>The type of client authentication to enable. Currently only the value <code>SmartCard</code> is supported. Smart card authentication in AD Connector requires that you enable Kerberos Constrained Delegation for the Service User to the LDAP service in your self-managed AD.</p>
58    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ClientAuthenticationType>) -> Self {
59        self.r#type = input;
60        self
61    }
62    /// <p>The type of client authentication to enable. Currently only the value <code>SmartCard</code> is supported. Smart card authentication in AD Connector requires that you enable Kerberos Constrained Delegation for the Service User to the LDAP service in your self-managed AD.</p>
63    pub fn get_type(&self) -> &::std::option::Option<crate::types::ClientAuthenticationType> {
64        &self.r#type
65    }
66    /// Consumes the builder and constructs a [`EnableClientAuthenticationInput`](crate::operation::enable_client_authentication::EnableClientAuthenticationInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<
70        crate::operation::enable_client_authentication::EnableClientAuthenticationInput,
71        ::aws_smithy_types::error::operation::BuildError,
72    > {
73        ::std::result::Result::Ok(crate::operation::enable_client_authentication::EnableClientAuthenticationInput {
74            directory_id: self.directory_id,
75            r#type: self.r#type,
76        })
77    }
78}