aws-sdk-cloudhsm 1.100.0

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>
    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>
    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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 ::std::convert::Into<::std::string::String>) -> Self {
        self.label = ::std::option::Option::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 label for the client.</p>
    pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
        &self.label
    }
    /// <p>The contents of a Base64-Encoded X.509 v3 certificate to be installed on the HSMs used by this client.</p>
    /// This field is required.
    pub fn certificate(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.certificate = ::std::option::Option::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
    }
    /// <p>The contents of a Base64-Encoded X.509 v3 certificate to be installed on the HSMs used by this client.</p>
    pub fn get_certificate(&self) -> &::std::option::Option<::std::string::String> {
        &self.certificate
    }
    /// Consumes the builder and constructs a [`CreateLunaClientInput`](crate::operation::create_luna_client::CreateLunaClientInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_luna_client::CreateLunaClientInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_luna_client::CreateLunaClientInput {
            label: self.label,
            certificate: self.certificate,
        })
    }
}