aws-sdk-cloudhsm 1.103.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>DescribeHsm</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeHsmInput {
    /// <p>The ARN of the HSM. Either the <code>HsmArn</code> or the <code>SerialNumber</code> parameter must be specified.</p>
    pub hsm_arn: ::std::option::Option<::std::string::String>,
    /// <p>The serial number of the HSM. Either the <code>HsmArn</code> or the <code>HsmSerialNumber</code> parameter must be specified.</p>
    pub hsm_serial_number: ::std::option::Option<::std::string::String>,
}
impl DescribeHsmInput {
    /// <p>The ARN of the HSM. Either the <code>HsmArn</code> or the <code>SerialNumber</code> parameter must be specified.</p>
    pub fn hsm_arn(&self) -> ::std::option::Option<&str> {
        self.hsm_arn.as_deref()
    }
    /// <p>The serial number of the HSM. Either the <code>HsmArn</code> or the <code>HsmSerialNumber</code> parameter must be specified.</p>
    pub fn hsm_serial_number(&self) -> ::std::option::Option<&str> {
        self.hsm_serial_number.as_deref()
    }
}
impl DescribeHsmInput {
    /// Creates a new builder-style object to manufacture [`DescribeHsmInput`](crate::operation::describe_hsm::DescribeHsmInput).
    pub fn builder() -> crate::operation::describe_hsm::builders::DescribeHsmInputBuilder {
        crate::operation::describe_hsm::builders::DescribeHsmInputBuilder::default()
    }
}

/// A builder for [`DescribeHsmInput`](crate::operation::describe_hsm::DescribeHsmInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeHsmInputBuilder {
    pub(crate) hsm_arn: ::std::option::Option<::std::string::String>,
    pub(crate) hsm_serial_number: ::std::option::Option<::std::string::String>,
}
impl DescribeHsmInputBuilder {
    /// <p>The ARN of the HSM. Either the <code>HsmArn</code> or the <code>SerialNumber</code> parameter must be specified.</p>
    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. Either the <code>HsmArn</code> or the <code>SerialNumber</code> parameter must be specified.</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. Either the <code>HsmArn</code> or the <code>SerialNumber</code> parameter must be specified.</p>
    pub fn get_hsm_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.hsm_arn
    }
    /// <p>The serial number of the HSM. Either the <code>HsmArn</code> or the <code>HsmSerialNumber</code> parameter must be specified.</p>
    pub fn hsm_serial_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.hsm_serial_number = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The serial number of the HSM. Either the <code>HsmArn</code> or the <code>HsmSerialNumber</code> parameter must be specified.</p>
    pub fn set_hsm_serial_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.hsm_serial_number = input;
        self
    }
    /// <p>The serial number of the HSM. Either the <code>HsmArn</code> or the <code>HsmSerialNumber</code> parameter must be specified.</p>
    pub fn get_hsm_serial_number(&self) -> &::std::option::Option<::std::string::String> {
        &self.hsm_serial_number
    }
    /// Consumes the builder and constructs a [`DescribeHsmInput`](crate::operation::describe_hsm::DescribeHsmInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::describe_hsm::DescribeHsmInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::describe_hsm::DescribeHsmInput {
            hsm_arn: self.hsm_arn,
            hsm_serial_number: self.hsm_serial_number,
        })
    }
}