aws-sdk-cloudhsm 0.25.1

AWS SDK for Amazon CloudHSM
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains the inputs for the <code>CreateLunaClient</code> action.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateLunaClientInput {
    /// <p>The label for the client.</p>
    #[doc(hidden)]
    pub label: std::option::Option<std::string::String>,
    /// <p>The contents of a Base64-Encoded X.509 v3 certificate to be installed on the HSMs used by this client.</p>
    #[doc(hidden)]
    pub certificate: std::option::Option<std::string::String>,
}
impl CreateLunaClientInput {
    /// <p>The label for the client.</p>
    pub fn label(&self) -> std::option::Option<&str> {
        self.label.as_deref()
    }
    /// <p>The contents of a Base64-Encoded X.509 v3 certificate to be installed on the HSMs used by this client.</p>
    pub fn certificate(&self) -> std::option::Option<&str> {
        self.certificate.as_deref()
    }
}
impl CreateLunaClientInput {
    /// Creates a new builder-style object to manufacture [`CreateLunaClientInput`](crate::operation::create_luna_client::CreateLunaClientInput).
    pub fn builder() -> crate::operation::create_luna_client::builders::CreateLunaClientInputBuilder
    {
        crate::operation::create_luna_client::builders::CreateLunaClientInputBuilder::default()
    }
}

/// A builder for [`CreateLunaClientInput`](crate::operation::create_luna_client::CreateLunaClientInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreateLunaClientInputBuilder {
    pub(crate) label: std::option::Option<std::string::String>,
    pub(crate) certificate: std::option::Option<std::string::String>,
}
impl CreateLunaClientInputBuilder {
    /// <p>The label for the client.</p>
    pub fn label(mut self, input: impl Into<std::string::String>) -> Self {
        self.label = Some(input.into());
        self
    }
    /// <p>The label for the client.</p>
    pub fn set_label(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.label = input;
        self
    }
    /// <p>The contents of a Base64-Encoded X.509 v3 certificate to be installed on the HSMs used by this client.</p>
    pub fn certificate(mut self, input: impl Into<std::string::String>) -> Self {
        self.certificate = Some(input.into());
        self
    }
    /// <p>The contents of a Base64-Encoded X.509 v3 certificate to be installed on the HSMs used by this client.</p>
    pub fn set_certificate(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.certificate = input;
        self
    }
    /// Consumes the builder and constructs a [`CreateLunaClientInput`](crate::operation::create_luna_client::CreateLunaClientInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::create_luna_client::CreateLunaClientInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(
            crate::operation::create_luna_client::CreateLunaClientInput {
                label: self.label,
                certificate: self.certificate,
            },
        )
    }
}