aws-sdk-cloudhsm 1.57.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>DeleteHsm</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteHsmInput {
    /// <p>The ARN of the HSM to delete.</p>
    pub hsm_arn: ::std::option::Option<::std::string::String>,
}
impl DeleteHsmInput {
    /// <p>The ARN of the HSM to delete.</p>
    pub fn hsm_arn(&self) -> ::std::option::Option<&str> {
        self.hsm_arn.as_deref()
    }
}
impl DeleteHsmInput {
    /// Creates a new builder-style object to manufacture [`DeleteHsmInput`](crate::operation::delete_hsm::DeleteHsmInput).
    pub fn builder() -> crate::operation::delete_hsm::builders::DeleteHsmInputBuilder {
        crate::operation::delete_hsm::builders::DeleteHsmInputBuilder::default()
    }
}

/// A builder for [`DeleteHsmInput`](crate::operation::delete_hsm::DeleteHsmInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteHsmInputBuilder {
    pub(crate) hsm_arn: ::std::option::Option<::std::string::String>,
}
impl DeleteHsmInputBuilder {
    /// <p>The ARN of the HSM to delete.</p>
    /// This field is required.
    pub fn hsm_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.hsm_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the HSM to delete.</p>
    pub fn set_hsm_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.hsm_arn = input;
        self
    }
    /// <p>The ARN of the HSM to delete.</p>
    pub fn get_hsm_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.hsm_arn
    }
    /// Consumes the builder and constructs a [`DeleteHsmInput`](crate::operation::delete_hsm::DeleteHsmInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::delete_hsm::DeleteHsmInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_hsm::DeleteHsmInput { hsm_arn: self.hsm_arn })
    }
}