aws-sdk-directory 1.56.0

AWS SDK for AWS Directory Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct EnableLdapsInput {
    /// <p>The identifier of the directory.</p>
    pub directory_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of LDAP security to enable. Currently only the value <code>Client</code> is supported.</p>
    pub r#type: ::std::option::Option<crate::types::LdapsType>,
}
impl EnableLdapsInput {
    /// <p>The identifier of the directory.</p>
    pub fn directory_id(&self) -> ::std::option::Option<&str> {
        self.directory_id.as_deref()
    }
    /// <p>The type of LDAP security to enable. Currently only the value <code>Client</code> is supported.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::LdapsType> {
        self.r#type.as_ref()
    }
}
impl EnableLdapsInput {
    /// Creates a new builder-style object to manufacture [`EnableLdapsInput`](crate::operation::enable_ldaps::EnableLdapsInput).
    pub fn builder() -> crate::operation::enable_ldaps::builders::EnableLdapsInputBuilder {
        crate::operation::enable_ldaps::builders::EnableLdapsInputBuilder::default()
    }
}

/// A builder for [`EnableLdapsInput`](crate::operation::enable_ldaps::EnableLdapsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct EnableLdapsInputBuilder {
    pub(crate) directory_id: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::LdapsType>,
}
impl EnableLdapsInputBuilder {
    /// <p>The identifier of the directory.</p>
    /// This field is required.
    pub fn directory_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.directory_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the directory.</p>
    pub fn set_directory_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.directory_id = input;
        self
    }
    /// <p>The identifier of the directory.</p>
    pub fn get_directory_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.directory_id
    }
    /// <p>The type of LDAP security to enable. Currently only the value <code>Client</code> is supported.</p>
    /// This field is required.
    pub fn r#type(mut self, input: crate::types::LdapsType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of LDAP security to enable. Currently only the value <code>Client</code> is supported.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::LdapsType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of LDAP security to enable. Currently only the value <code>Client</code> is supported.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::LdapsType> {
        &self.r#type
    }
    /// Consumes the builder and constructs a [`EnableLdapsInput`](crate::operation::enable_ldaps::EnableLdapsInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::enable_ldaps::EnableLdapsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::enable_ldaps::EnableLdapsInput {
            directory_id: self.directory_id,
            r#type: self.r#type,
        })
    }
}