aws-sdk-paymentcryptography 1.106.0

AWS SDK for Payment Cryptography Control Plane
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateAliasInput {
    /// <p>The alias whose associated key is changing.</p>
    pub alias_name: ::std::option::Option<::std::string::String>,
    /// <p>The <code>KeyARN</code> for the key that you are updating or removing from the alias.</p>
    pub key_arn: ::std::option::Option<::std::string::String>,
}
impl UpdateAliasInput {
    /// <p>The alias whose associated key is changing.</p>
    pub fn alias_name(&self) -> ::std::option::Option<&str> {
        self.alias_name.as_deref()
    }
    /// <p>The <code>KeyARN</code> for the key that you are updating or removing from the alias.</p>
    pub fn key_arn(&self) -> ::std::option::Option<&str> {
        self.key_arn.as_deref()
    }
}
impl UpdateAliasInput {
    /// Creates a new builder-style object to manufacture [`UpdateAliasInput`](crate::operation::update_alias::UpdateAliasInput).
    pub fn builder() -> crate::operation::update_alias::builders::UpdateAliasInputBuilder {
        crate::operation::update_alias::builders::UpdateAliasInputBuilder::default()
    }
}

/// A builder for [`UpdateAliasInput`](crate::operation::update_alias::UpdateAliasInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateAliasInputBuilder {
    pub(crate) alias_name: ::std::option::Option<::std::string::String>,
    pub(crate) key_arn: ::std::option::Option<::std::string::String>,
}
impl UpdateAliasInputBuilder {
    /// <p>The alias whose associated key is changing.</p>
    /// This field is required.
    pub fn alias_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.alias_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The alias whose associated key is changing.</p>
    pub fn set_alias_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.alias_name = input;
        self
    }
    /// <p>The alias whose associated key is changing.</p>
    pub fn get_alias_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.alias_name
    }
    /// <p>The <code>KeyARN</code> for the key that you are updating or removing from the alias.</p>
    pub fn key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.key_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>KeyARN</code> for the key that you are updating or removing from the alias.</p>
    pub fn set_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.key_arn = input;
        self
    }
    /// <p>The <code>KeyARN</code> for the key that you are updating or removing from the alias.</p>
    pub fn get_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.key_arn
    }
    /// Consumes the builder and constructs a [`UpdateAliasInput`](crate::operation::update_alias::UpdateAliasInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_alias::UpdateAliasInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_alias::UpdateAliasInput {
            alias_name: self.alias_name,
            key_arn: self.key_arn,
        })
    }
}