aws-sdk-directory 1.16.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 RegisterCertificateInput {
    /// <p>The identifier of the directory.</p>
    pub directory_id: ::std::option::Option<::std::string::String>,
    /// <p>The certificate PEM string that needs to be registered.</p>
    pub certificate_data: ::std::option::Option<::std::string::String>,
    /// <p>The function that the registered certificate performs. Valid values include <code>ClientLDAPS</code> or <code>ClientCertAuth</code>. The default value is <code>ClientLDAPS</code>.</p>
    pub r#type: ::std::option::Option<crate::types::CertificateType>,
    /// <p>A <code>ClientCertAuthSettings</code> object that contains client certificate authentication settings.</p>
    pub client_cert_auth_settings: ::std::option::Option<crate::types::ClientCertAuthSettings>,
}
impl RegisterCertificateInput {
    /// <p>The identifier of the directory.</p>
    pub fn directory_id(&self) -> ::std::option::Option<&str> {
        self.directory_id.as_deref()
    }
    /// <p>The certificate PEM string that needs to be registered.</p>
    pub fn certificate_data(&self) -> ::std::option::Option<&str> {
        self.certificate_data.as_deref()
    }
    /// <p>The function that the registered certificate performs. Valid values include <code>ClientLDAPS</code> or <code>ClientCertAuth</code>. The default value is <code>ClientLDAPS</code>.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::CertificateType> {
        self.r#type.as_ref()
    }
    /// <p>A <code>ClientCertAuthSettings</code> object that contains client certificate authentication settings.</p>
    pub fn client_cert_auth_settings(&self) -> ::std::option::Option<&crate::types::ClientCertAuthSettings> {
        self.client_cert_auth_settings.as_ref()
    }
}
impl RegisterCertificateInput {
    /// Creates a new builder-style object to manufacture [`RegisterCertificateInput`](crate::operation::register_certificate::RegisterCertificateInput).
    pub fn builder() -> crate::operation::register_certificate::builders::RegisterCertificateInputBuilder {
        crate::operation::register_certificate::builders::RegisterCertificateInputBuilder::default()
    }
}

/// A builder for [`RegisterCertificateInput`](crate::operation::register_certificate::RegisterCertificateInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RegisterCertificateInputBuilder {
    pub(crate) directory_id: ::std::option::Option<::std::string::String>,
    pub(crate) certificate_data: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::CertificateType>,
    pub(crate) client_cert_auth_settings: ::std::option::Option<crate::types::ClientCertAuthSettings>,
}
impl RegisterCertificateInputBuilder {
    /// <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 certificate PEM string that needs to be registered.</p>
    /// This field is required.
    pub fn certificate_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.certificate_data = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The certificate PEM string that needs to be registered.</p>
    pub fn set_certificate_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.certificate_data = input;
        self
    }
    /// <p>The certificate PEM string that needs to be registered.</p>
    pub fn get_certificate_data(&self) -> &::std::option::Option<::std::string::String> {
        &self.certificate_data
    }
    /// <p>The function that the registered certificate performs. Valid values include <code>ClientLDAPS</code> or <code>ClientCertAuth</code>. The default value is <code>ClientLDAPS</code>.</p>
    pub fn r#type(mut self, input: crate::types::CertificateType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The function that the registered certificate performs. Valid values include <code>ClientLDAPS</code> or <code>ClientCertAuth</code>. The default value is <code>ClientLDAPS</code>.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::CertificateType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The function that the registered certificate performs. Valid values include <code>ClientLDAPS</code> or <code>ClientCertAuth</code>. The default value is <code>ClientLDAPS</code>.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::CertificateType> {
        &self.r#type
    }
    /// <p>A <code>ClientCertAuthSettings</code> object that contains client certificate authentication settings.</p>
    pub fn client_cert_auth_settings(mut self, input: crate::types::ClientCertAuthSettings) -> Self {
        self.client_cert_auth_settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>A <code>ClientCertAuthSettings</code> object that contains client certificate authentication settings.</p>
    pub fn set_client_cert_auth_settings(mut self, input: ::std::option::Option<crate::types::ClientCertAuthSettings>) -> Self {
        self.client_cert_auth_settings = input;
        self
    }
    /// <p>A <code>ClientCertAuthSettings</code> object that contains client certificate authentication settings.</p>
    pub fn get_client_cert_auth_settings(&self) -> &::std::option::Option<crate::types::ClientCertAuthSettings> {
        &self.client_cert_auth_settings
    }
    /// Consumes the builder and constructs a [`RegisterCertificateInput`](crate::operation::register_certificate::RegisterCertificateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::register_certificate::RegisterCertificateInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::register_certificate::RegisterCertificateInput {
            directory_id: self.directory_id,
            certificate_data: self.certificate_data,
            r#type: self.r#type,
            client_cert_auth_settings: self.client_cert_auth_settings,
        })
    }
}