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 TranslatePinDataInput {
    /// <p>The <code>keyARN</code> of the encryption key under which incoming PIN block data is encrypted. This key type can be PEK or BDK.</p>
    /// <p>For dynamic keys, it is the <code>keyARN</code> of KEK of the TR-31 wrapped PEK. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    pub incoming_key_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The <code>keyARN</code> of the encryption key for encrypting outgoing PIN block data. This key type can be PEK or BDK.</p>
    /// <p>For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    pub outgoing_key_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The format of the incoming PIN block data for translation within Amazon Web Services Payment Cryptography.</p>
    pub incoming_translation_attributes: ::std::option::Option<crate::types::TranslationIsoFormats>,
    /// <p>The format of the outgoing PIN block data after translation by Amazon Web Services Payment Cryptography.</p>
    pub outgoing_translation_attributes: ::std::option::Option<crate::types::TranslationIsoFormats>,
    /// <p>The encrypted PIN block data that Amazon Web Services Payment Cryptography translates.</p>
    pub encrypted_pin_block: ::std::option::Option<::std::string::String>,
    /// <p>The attributes and values to use for incoming DUKPT encryption key for PIN block translation.</p>
    pub incoming_dukpt_attributes: ::std::option::Option<crate::types::DukptDerivationAttributes>,
    /// <p>The attributes and values to use for outgoing DUKPT encryption key after PIN block translation.</p>
    pub outgoing_dukpt_attributes: ::std::option::Option<crate::types::DukptDerivationAttributes>,
    /// <p>The WrappedKeyBlock containing the encryption key under which incoming PIN block data is encrypted.</p>
    pub incoming_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
    /// <p>The WrappedKeyBlock containing the encryption key for encrypting outgoing PIN block data.</p>
    pub outgoing_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
    /// <p>The attributes and values to use for incoming AS2805 encryption key for PIN block translation.</p>
    pub incoming_as2805_attributes: ::std::option::Option<crate::types::As2805PekDerivationAttributes>,
}
impl TranslatePinDataInput {
    /// <p>The <code>keyARN</code> of the encryption key under which incoming PIN block data is encrypted. This key type can be PEK or BDK.</p>
    /// <p>For dynamic keys, it is the <code>keyARN</code> of KEK of the TR-31 wrapped PEK. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    pub fn incoming_key_identifier(&self) -> ::std::option::Option<&str> {
        self.incoming_key_identifier.as_deref()
    }
    /// <p>The <code>keyARN</code> of the encryption key for encrypting outgoing PIN block data. This key type can be PEK or BDK.</p>
    /// <p>For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    pub fn outgoing_key_identifier(&self) -> ::std::option::Option<&str> {
        self.outgoing_key_identifier.as_deref()
    }
    /// <p>The format of the incoming PIN block data for translation within Amazon Web Services Payment Cryptography.</p>
    pub fn incoming_translation_attributes(&self) -> ::std::option::Option<&crate::types::TranslationIsoFormats> {
        self.incoming_translation_attributes.as_ref()
    }
    /// <p>The format of the outgoing PIN block data after translation by Amazon Web Services Payment Cryptography.</p>
    pub fn outgoing_translation_attributes(&self) -> ::std::option::Option<&crate::types::TranslationIsoFormats> {
        self.outgoing_translation_attributes.as_ref()
    }
    /// <p>The encrypted PIN block data that Amazon Web Services Payment Cryptography translates.</p>
    pub fn encrypted_pin_block(&self) -> ::std::option::Option<&str> {
        self.encrypted_pin_block.as_deref()
    }
    /// <p>The attributes and values to use for incoming DUKPT encryption key for PIN block translation.</p>
    pub fn incoming_dukpt_attributes(&self) -> ::std::option::Option<&crate::types::DukptDerivationAttributes> {
        self.incoming_dukpt_attributes.as_ref()
    }
    /// <p>The attributes and values to use for outgoing DUKPT encryption key after PIN block translation.</p>
    pub fn outgoing_dukpt_attributes(&self) -> ::std::option::Option<&crate::types::DukptDerivationAttributes> {
        self.outgoing_dukpt_attributes.as_ref()
    }
    /// <p>The WrappedKeyBlock containing the encryption key under which incoming PIN block data is encrypted.</p>
    pub fn incoming_wrapped_key(&self) -> ::std::option::Option<&crate::types::WrappedKey> {
        self.incoming_wrapped_key.as_ref()
    }
    /// <p>The WrappedKeyBlock containing the encryption key for encrypting outgoing PIN block data.</p>
    pub fn outgoing_wrapped_key(&self) -> ::std::option::Option<&crate::types::WrappedKey> {
        self.outgoing_wrapped_key.as_ref()
    }
    /// <p>The attributes and values to use for incoming AS2805 encryption key for PIN block translation.</p>
    pub fn incoming_as2805_attributes(&self) -> ::std::option::Option<&crate::types::As2805PekDerivationAttributes> {
        self.incoming_as2805_attributes.as_ref()
    }
}
impl ::std::fmt::Debug for TranslatePinDataInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("TranslatePinDataInput");
        formatter.field("incoming_key_identifier", &self.incoming_key_identifier);
        formatter.field("outgoing_key_identifier", &self.outgoing_key_identifier);
        formatter.field("incoming_translation_attributes", &self.incoming_translation_attributes);
        formatter.field("outgoing_translation_attributes", &self.outgoing_translation_attributes);
        formatter.field("encrypted_pin_block", &"*** Sensitive Data Redacted ***");
        formatter.field("incoming_dukpt_attributes", &self.incoming_dukpt_attributes);
        formatter.field("outgoing_dukpt_attributes", &self.outgoing_dukpt_attributes);
        formatter.field("incoming_wrapped_key", &self.incoming_wrapped_key);
        formatter.field("outgoing_wrapped_key", &self.outgoing_wrapped_key);
        formatter.field("incoming_as2805_attributes", &self.incoming_as2805_attributes);
        formatter.finish()
    }
}
impl TranslatePinDataInput {
    /// Creates a new builder-style object to manufacture [`TranslatePinDataInput`](crate::operation::translate_pin_data::TranslatePinDataInput).
    pub fn builder() -> crate::operation::translate_pin_data::builders::TranslatePinDataInputBuilder {
        crate::operation::translate_pin_data::builders::TranslatePinDataInputBuilder::default()
    }
}

/// A builder for [`TranslatePinDataInput`](crate::operation::translate_pin_data::TranslatePinDataInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct TranslatePinDataInputBuilder {
    pub(crate) incoming_key_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) outgoing_key_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) incoming_translation_attributes: ::std::option::Option<crate::types::TranslationIsoFormats>,
    pub(crate) outgoing_translation_attributes: ::std::option::Option<crate::types::TranslationIsoFormats>,
    pub(crate) encrypted_pin_block: ::std::option::Option<::std::string::String>,
    pub(crate) incoming_dukpt_attributes: ::std::option::Option<crate::types::DukptDerivationAttributes>,
    pub(crate) outgoing_dukpt_attributes: ::std::option::Option<crate::types::DukptDerivationAttributes>,
    pub(crate) incoming_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
    pub(crate) outgoing_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
    pub(crate) incoming_as2805_attributes: ::std::option::Option<crate::types::As2805PekDerivationAttributes>,
}
impl TranslatePinDataInputBuilder {
    /// <p>The <code>keyARN</code> of the encryption key under which incoming PIN block data is encrypted. This key type can be PEK or BDK.</p>
    /// <p>For dynamic keys, it is the <code>keyARN</code> of KEK of the TR-31 wrapped PEK. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    /// This field is required.
    pub fn incoming_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.incoming_key_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>keyARN</code> of the encryption key under which incoming PIN block data is encrypted. This key type can be PEK or BDK.</p>
    /// <p>For dynamic keys, it is the <code>keyARN</code> of KEK of the TR-31 wrapped PEK. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    pub fn set_incoming_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.incoming_key_identifier = input;
        self
    }
    /// <p>The <code>keyARN</code> of the encryption key under which incoming PIN block data is encrypted. This key type can be PEK or BDK.</p>
    /// <p>For dynamic keys, it is the <code>keyARN</code> of KEK of the TR-31 wrapped PEK. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    pub fn get_incoming_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.incoming_key_identifier
    }
    /// <p>The <code>keyARN</code> of the encryption key for encrypting outgoing PIN block data. This key type can be PEK or BDK.</p>
    /// <p>For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    /// This field is required.
    pub fn outgoing_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.outgoing_key_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>keyARN</code> of the encryption key for encrypting outgoing PIN block data. This key type can be PEK or BDK.</p>
    /// <p>For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    pub fn set_outgoing_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.outgoing_key_identifier = input;
        self
    }
    /// <p>The <code>keyARN</code> of the encryption key for encrypting outgoing PIN block data. This key type can be PEK or BDK.</p>
    /// <p>For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    pub fn get_outgoing_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.outgoing_key_identifier
    }
    /// <p>The format of the incoming PIN block data for translation within Amazon Web Services Payment Cryptography.</p>
    /// This field is required.
    pub fn incoming_translation_attributes(mut self, input: crate::types::TranslationIsoFormats) -> Self {
        self.incoming_translation_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The format of the incoming PIN block data for translation within Amazon Web Services Payment Cryptography.</p>
    pub fn set_incoming_translation_attributes(mut self, input: ::std::option::Option<crate::types::TranslationIsoFormats>) -> Self {
        self.incoming_translation_attributes = input;
        self
    }
    /// <p>The format of the incoming PIN block data for translation within Amazon Web Services Payment Cryptography.</p>
    pub fn get_incoming_translation_attributes(&self) -> &::std::option::Option<crate::types::TranslationIsoFormats> {
        &self.incoming_translation_attributes
    }
    /// <p>The format of the outgoing PIN block data after translation by Amazon Web Services Payment Cryptography.</p>
    /// This field is required.
    pub fn outgoing_translation_attributes(mut self, input: crate::types::TranslationIsoFormats) -> Self {
        self.outgoing_translation_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The format of the outgoing PIN block data after translation by Amazon Web Services Payment Cryptography.</p>
    pub fn set_outgoing_translation_attributes(mut self, input: ::std::option::Option<crate::types::TranslationIsoFormats>) -> Self {
        self.outgoing_translation_attributes = input;
        self
    }
    /// <p>The format of the outgoing PIN block data after translation by Amazon Web Services Payment Cryptography.</p>
    pub fn get_outgoing_translation_attributes(&self) -> &::std::option::Option<crate::types::TranslationIsoFormats> {
        &self.outgoing_translation_attributes
    }
    /// <p>The encrypted PIN block data that Amazon Web Services Payment Cryptography translates.</p>
    /// This field is required.
    pub fn encrypted_pin_block(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.encrypted_pin_block = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The encrypted PIN block data that Amazon Web Services Payment Cryptography translates.</p>
    pub fn set_encrypted_pin_block(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.encrypted_pin_block = input;
        self
    }
    /// <p>The encrypted PIN block data that Amazon Web Services Payment Cryptography translates.</p>
    pub fn get_encrypted_pin_block(&self) -> &::std::option::Option<::std::string::String> {
        &self.encrypted_pin_block
    }
    /// <p>The attributes and values to use for incoming DUKPT encryption key for PIN block translation.</p>
    pub fn incoming_dukpt_attributes(mut self, input: crate::types::DukptDerivationAttributes) -> Self {
        self.incoming_dukpt_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The attributes and values to use for incoming DUKPT encryption key for PIN block translation.</p>
    pub fn set_incoming_dukpt_attributes(mut self, input: ::std::option::Option<crate::types::DukptDerivationAttributes>) -> Self {
        self.incoming_dukpt_attributes = input;
        self
    }
    /// <p>The attributes and values to use for incoming DUKPT encryption key for PIN block translation.</p>
    pub fn get_incoming_dukpt_attributes(&self) -> &::std::option::Option<crate::types::DukptDerivationAttributes> {
        &self.incoming_dukpt_attributes
    }
    /// <p>The attributes and values to use for outgoing DUKPT encryption key after PIN block translation.</p>
    pub fn outgoing_dukpt_attributes(mut self, input: crate::types::DukptDerivationAttributes) -> Self {
        self.outgoing_dukpt_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The attributes and values to use for outgoing DUKPT encryption key after PIN block translation.</p>
    pub fn set_outgoing_dukpt_attributes(mut self, input: ::std::option::Option<crate::types::DukptDerivationAttributes>) -> Self {
        self.outgoing_dukpt_attributes = input;
        self
    }
    /// <p>The attributes and values to use for outgoing DUKPT encryption key after PIN block translation.</p>
    pub fn get_outgoing_dukpt_attributes(&self) -> &::std::option::Option<crate::types::DukptDerivationAttributes> {
        &self.outgoing_dukpt_attributes
    }
    /// <p>The WrappedKeyBlock containing the encryption key under which incoming PIN block data is encrypted.</p>
    pub fn incoming_wrapped_key(mut self, input: crate::types::WrappedKey) -> Self {
        self.incoming_wrapped_key = ::std::option::Option::Some(input);
        self
    }
    /// <p>The WrappedKeyBlock containing the encryption key under which incoming PIN block data is encrypted.</p>
    pub fn set_incoming_wrapped_key(mut self, input: ::std::option::Option<crate::types::WrappedKey>) -> Self {
        self.incoming_wrapped_key = input;
        self
    }
    /// <p>The WrappedKeyBlock containing the encryption key under which incoming PIN block data is encrypted.</p>
    pub fn get_incoming_wrapped_key(&self) -> &::std::option::Option<crate::types::WrappedKey> {
        &self.incoming_wrapped_key
    }
    /// <p>The WrappedKeyBlock containing the encryption key for encrypting outgoing PIN block data.</p>
    pub fn outgoing_wrapped_key(mut self, input: crate::types::WrappedKey) -> Self {
        self.outgoing_wrapped_key = ::std::option::Option::Some(input);
        self
    }
    /// <p>The WrappedKeyBlock containing the encryption key for encrypting outgoing PIN block data.</p>
    pub fn set_outgoing_wrapped_key(mut self, input: ::std::option::Option<crate::types::WrappedKey>) -> Self {
        self.outgoing_wrapped_key = input;
        self
    }
    /// <p>The WrappedKeyBlock containing the encryption key for encrypting outgoing PIN block data.</p>
    pub fn get_outgoing_wrapped_key(&self) -> &::std::option::Option<crate::types::WrappedKey> {
        &self.outgoing_wrapped_key
    }
    /// <p>The attributes and values to use for incoming AS2805 encryption key for PIN block translation.</p>
    pub fn incoming_as2805_attributes(mut self, input: crate::types::As2805PekDerivationAttributes) -> Self {
        self.incoming_as2805_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The attributes and values to use for incoming AS2805 encryption key for PIN block translation.</p>
    pub fn set_incoming_as2805_attributes(mut self, input: ::std::option::Option<crate::types::As2805PekDerivationAttributes>) -> Self {
        self.incoming_as2805_attributes = input;
        self
    }
    /// <p>The attributes and values to use for incoming AS2805 encryption key for PIN block translation.</p>
    pub fn get_incoming_as2805_attributes(&self) -> &::std::option::Option<crate::types::As2805PekDerivationAttributes> {
        &self.incoming_as2805_attributes
    }
    /// Consumes the builder and constructs a [`TranslatePinDataInput`](crate::operation::translate_pin_data::TranslatePinDataInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::translate_pin_data::TranslatePinDataInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::translate_pin_data::TranslatePinDataInput {
            incoming_key_identifier: self.incoming_key_identifier,
            outgoing_key_identifier: self.outgoing_key_identifier,
            incoming_translation_attributes: self.incoming_translation_attributes,
            outgoing_translation_attributes: self.outgoing_translation_attributes,
            encrypted_pin_block: self.encrypted_pin_block,
            incoming_dukpt_attributes: self.incoming_dukpt_attributes,
            outgoing_dukpt_attributes: self.outgoing_dukpt_attributes,
            incoming_wrapped_key: self.incoming_wrapped_key,
            outgoing_wrapped_key: self.outgoing_wrapped_key,
            incoming_as2805_attributes: self.incoming_as2805_attributes,
        })
    }
}
impl ::std::fmt::Debug for TranslatePinDataInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("TranslatePinDataInputBuilder");
        formatter.field("incoming_key_identifier", &self.incoming_key_identifier);
        formatter.field("outgoing_key_identifier", &self.outgoing_key_identifier);
        formatter.field("incoming_translation_attributes", &self.incoming_translation_attributes);
        formatter.field("outgoing_translation_attributes", &self.outgoing_translation_attributes);
        formatter.field("encrypted_pin_block", &"*** Sensitive Data Redacted ***");
        formatter.field("incoming_dukpt_attributes", &self.incoming_dukpt_attributes);
        formatter.field("outgoing_dukpt_attributes", &self.outgoing_dukpt_attributes);
        formatter.field("incoming_wrapped_key", &self.incoming_wrapped_key);
        formatter.field("outgoing_wrapped_key", &self.outgoing_wrapped_key);
        formatter.field("incoming_as2805_attributes", &self.incoming_as2805_attributes);
        formatter.finish()
    }
}