aws-sdk-paymentcryptographydata 1.105.0

AWS SDK for Payment Cryptography Data 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)]
pub struct VerifyMacInput {
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.</p>
    pub key_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The data on for which MAC is under verification. This value must be hexBinary.</p>
    pub message_data: ::std::option::Option<::std::string::String>,
    /// <p>The MAC being verified.</p>
    pub mac: ::std::option::Option<::std::string::String>,
    /// <p>The attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.</p>
    pub verification_attributes: ::std::option::Option<crate::types::MacAttributes>,
    /// <p>The length of the MAC.</p>
    pub mac_length: ::std::option::Option<i32>,
}
impl VerifyMacInput {
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.</p>
    pub fn key_identifier(&self) -> ::std::option::Option<&str> {
        self.key_identifier.as_deref()
    }
    /// <p>The data on for which MAC is under verification. This value must be hexBinary.</p>
    pub fn message_data(&self) -> ::std::option::Option<&str> {
        self.message_data.as_deref()
    }
    /// <p>The MAC being verified.</p>
    pub fn mac(&self) -> ::std::option::Option<&str> {
        self.mac.as_deref()
    }
    /// <p>The attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.</p>
    pub fn verification_attributes(&self) -> ::std::option::Option<&crate::types::MacAttributes> {
        self.verification_attributes.as_ref()
    }
    /// <p>The length of the MAC.</p>
    pub fn mac_length(&self) -> ::std::option::Option<i32> {
        self.mac_length
    }
}
impl ::std::fmt::Debug for VerifyMacInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("VerifyMacInput");
        formatter.field("key_identifier", &self.key_identifier);
        formatter.field("message_data", &"*** Sensitive Data Redacted ***");
        formatter.field("mac", &"*** Sensitive Data Redacted ***");
        formatter.field("verification_attributes", &self.verification_attributes);
        formatter.field("mac_length", &self.mac_length);
        formatter.finish()
    }
}
impl VerifyMacInput {
    /// Creates a new builder-style object to manufacture [`VerifyMacInput`](crate::operation::verify_mac::VerifyMacInput).
    pub fn builder() -> crate::operation::verify_mac::builders::VerifyMacInputBuilder {
        crate::operation::verify_mac::builders::VerifyMacInputBuilder::default()
    }
}

/// A builder for [`VerifyMacInput`](crate::operation::verify_mac::VerifyMacInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct VerifyMacInputBuilder {
    pub(crate) key_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) message_data: ::std::option::Option<::std::string::String>,
    pub(crate) mac: ::std::option::Option<::std::string::String>,
    pub(crate) verification_attributes: ::std::option::Option<crate::types::MacAttributes>,
    pub(crate) mac_length: ::std::option::Option<i32>,
}
impl VerifyMacInputBuilder {
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.</p>
    /// This field is required.
    pub fn key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.key_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.</p>
    pub fn set_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.key_identifier = input;
        self
    }
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.</p>
    pub fn get_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.key_identifier
    }
    /// <p>The data on for which MAC is under verification. This value must be hexBinary.</p>
    /// This field is required.
    pub fn message_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.message_data = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The data on for which MAC is under verification. This value must be hexBinary.</p>
    pub fn set_message_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.message_data = input;
        self
    }
    /// <p>The data on for which MAC is under verification. This value must be hexBinary.</p>
    pub fn get_message_data(&self) -> &::std::option::Option<::std::string::String> {
        &self.message_data
    }
    /// <p>The MAC being verified.</p>
    /// This field is required.
    pub fn mac(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.mac = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The MAC being verified.</p>
    pub fn set_mac(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.mac = input;
        self
    }
    /// <p>The MAC being verified.</p>
    pub fn get_mac(&self) -> &::std::option::Option<::std::string::String> {
        &self.mac
    }
    /// <p>The attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.</p>
    /// This field is required.
    pub fn verification_attributes(mut self, input: crate::types::MacAttributes) -> Self {
        self.verification_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.</p>
    pub fn set_verification_attributes(mut self, input: ::std::option::Option<crate::types::MacAttributes>) -> Self {
        self.verification_attributes = input;
        self
    }
    /// <p>The attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.</p>
    pub fn get_verification_attributes(&self) -> &::std::option::Option<crate::types::MacAttributes> {
        &self.verification_attributes
    }
    /// <p>The length of the MAC.</p>
    pub fn mac_length(mut self, input: i32) -> Self {
        self.mac_length = ::std::option::Option::Some(input);
        self
    }
    /// <p>The length of the MAC.</p>
    pub fn set_mac_length(mut self, input: ::std::option::Option<i32>) -> Self {
        self.mac_length = input;
        self
    }
    /// <p>The length of the MAC.</p>
    pub fn get_mac_length(&self) -> &::std::option::Option<i32> {
        &self.mac_length
    }
    /// Consumes the builder and constructs a [`VerifyMacInput`](crate::operation::verify_mac::VerifyMacInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::verify_mac::VerifyMacInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::verify_mac::VerifyMacInput {
            key_identifier: self.key_identifier,
            message_data: self.message_data,
            mac: self.mac,
            verification_attributes: self.verification_attributes,
            mac_length: self.mac_length,
        })
    }
}
impl ::std::fmt::Debug for VerifyMacInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("VerifyMacInputBuilder");
        formatter.field("key_identifier", &self.key_identifier);
        formatter.field("message_data", &"*** Sensitive Data Redacted ***");
        formatter.field("mac", &"*** Sensitive Data Redacted ***");
        formatter.field("verification_attributes", &self.verification_attributes);
        formatter.field("mac_length", &self.mac_length);
        formatter.finish()
    }
}