aws-sdk-cloudhsm 1.102.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>ModifyHsm</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ModifyHsmInput {
    /// <p>The ARN of the HSM to modify.</p>
    pub hsm_arn: ::std::option::Option<::std::string::String>,
    /// <p>The new identifier of the subnet that the HSM is in. The new subnet must be in the same Availability Zone as the current subnet.</p>
    pub subnet_id: ::std::option::Option<::std::string::String>,
    /// <p>The new IP address for the elastic network interface (ENI) attached to the HSM.</p>
    /// <p>If the HSM is moved to a different subnet, and an IP address is not specified, an IP address will be randomly chosen from the CIDR range of the new subnet.</p>
    pub eni_ip: ::std::option::Option<::std::string::String>,
    /// <p>The new IAM role ARN.</p>
    pub iam_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>The new external ID.</p>
    pub external_id: ::std::option::Option<::std::string::String>,
    /// <p>The new IP address for the syslog monitoring server. The AWS CloudHSM service only supports one syslog monitoring server.</p>
    pub syslog_ip: ::std::option::Option<::std::string::String>,
}
impl ModifyHsmInput {
    /// <p>The ARN of the HSM to modify.</p>
    pub fn hsm_arn(&self) -> ::std::option::Option<&str> {
        self.hsm_arn.as_deref()
    }
    /// <p>The new identifier of the subnet that the HSM is in. The new subnet must be in the same Availability Zone as the current subnet.</p>
    pub fn subnet_id(&self) -> ::std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The new IP address for the elastic network interface (ENI) attached to the HSM.</p>
    /// <p>If the HSM is moved to a different subnet, and an IP address is not specified, an IP address will be randomly chosen from the CIDR range of the new subnet.</p>
    pub fn eni_ip(&self) -> ::std::option::Option<&str> {
        self.eni_ip.as_deref()
    }
    /// <p>The new IAM role ARN.</p>
    pub fn iam_role_arn(&self) -> ::std::option::Option<&str> {
        self.iam_role_arn.as_deref()
    }
    /// <p>The new external ID.</p>
    pub fn external_id(&self) -> ::std::option::Option<&str> {
        self.external_id.as_deref()
    }
    /// <p>The new IP address for the syslog monitoring server. The AWS CloudHSM service only supports one syslog monitoring server.</p>
    pub fn syslog_ip(&self) -> ::std::option::Option<&str> {
        self.syslog_ip.as_deref()
    }
}
impl ModifyHsmInput {
    /// Creates a new builder-style object to manufacture [`ModifyHsmInput`](crate::operation::modify_hsm::ModifyHsmInput).
    pub fn builder() -> crate::operation::modify_hsm::builders::ModifyHsmInputBuilder {
        crate::operation::modify_hsm::builders::ModifyHsmInputBuilder::default()
    }
}

/// A builder for [`ModifyHsmInput`](crate::operation::modify_hsm::ModifyHsmInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyHsmInputBuilder {
    pub(crate) hsm_arn: ::std::option::Option<::std::string::String>,
    pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
    pub(crate) eni_ip: ::std::option::Option<::std::string::String>,
    pub(crate) iam_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) external_id: ::std::option::Option<::std::string::String>,
    pub(crate) syslog_ip: ::std::option::Option<::std::string::String>,
}
impl ModifyHsmInputBuilder {
    /// <p>The ARN of the HSM to modify.</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 modify.</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 modify.</p>
    pub fn get_hsm_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.hsm_arn
    }
    /// <p>The new identifier of the subnet that the HSM is in. The new subnet must be in the same Availability Zone as the current subnet.</p>
    pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.subnet_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The new identifier of the subnet that the HSM is in. The new subnet must be in the same Availability Zone as the current subnet.</p>
    pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subnet_id = input;
        self
    }
    /// <p>The new identifier of the subnet that the HSM is in. The new subnet must be in the same Availability Zone as the current subnet.</p>
    pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.subnet_id
    }
    /// <p>The new IP address for the elastic network interface (ENI) attached to the HSM.</p>
    /// <p>If the HSM is moved to a different subnet, and an IP address is not specified, an IP address will be randomly chosen from the CIDR range of the new subnet.</p>
    pub fn eni_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.eni_ip = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The new IP address for the elastic network interface (ENI) attached to the HSM.</p>
    /// <p>If the HSM is moved to a different subnet, and an IP address is not specified, an IP address will be randomly chosen from the CIDR range of the new subnet.</p>
    pub fn set_eni_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.eni_ip = input;
        self
    }
    /// <p>The new IP address for the elastic network interface (ENI) attached to the HSM.</p>
    /// <p>If the HSM is moved to a different subnet, and an IP address is not specified, an IP address will be randomly chosen from the CIDR range of the new subnet.</p>
    pub fn get_eni_ip(&self) -> &::std::option::Option<::std::string::String> {
        &self.eni_ip
    }
    /// <p>The new IAM role ARN.</p>
    pub fn iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.iam_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The new IAM role ARN.</p>
    pub fn set_iam_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.iam_role_arn = input;
        self
    }
    /// <p>The new IAM role ARN.</p>
    pub fn get_iam_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.iam_role_arn
    }
    /// <p>The new external ID.</p>
    pub fn external_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.external_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The new external ID.</p>
    pub fn set_external_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.external_id = input;
        self
    }
    /// <p>The new external ID.</p>
    pub fn get_external_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.external_id
    }
    /// <p>The new IP address for the syslog monitoring server. The AWS CloudHSM service only supports one syslog monitoring server.</p>
    pub fn syslog_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.syslog_ip = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The new IP address for the syslog monitoring server. The AWS CloudHSM service only supports one syslog monitoring server.</p>
    pub fn set_syslog_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.syslog_ip = input;
        self
    }
    /// <p>The new IP address for the syslog monitoring server. The AWS CloudHSM service only supports one syslog monitoring server.</p>
    pub fn get_syslog_ip(&self) -> &::std::option::Option<::std::string::String> {
        &self.syslog_ip
    }
    /// Consumes the builder and constructs a [`ModifyHsmInput`](crate::operation::modify_hsm::ModifyHsmInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::modify_hsm::ModifyHsmInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::modify_hsm::ModifyHsmInput {
            hsm_arn: self.hsm_arn,
            subnet_id: self.subnet_id,
            eni_ip: self.eni_ip,
            iam_role_arn: self.iam_role_arn,
            external_id: self.external_id,
            syslog_ip: self.syslog_ip,
        })
    }
}