aws-sdk-paymentcryptographydata 1.104.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 ReEncryptDataInput {
    /// <p>The <code>keyARN</code> of the encryption key of incoming ciphertext data.</p>
    /// <p>When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation.</p>
    pub incoming_key_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The <code>keyARN</code> of the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
    pub outgoing_key_identifier: ::std::option::Option<::std::string::String>,
    /// <p>Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.</p>
    pub cipher_text: ::std::option::Option<::std::string::String>,
    /// <p>The attributes and values for incoming ciphertext.</p>
    pub incoming_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
    /// <p>The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
    pub outgoing_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
    /// <p>The WrappedKeyBlock containing the encryption key of incoming ciphertext data.</p>
    pub incoming_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
    /// <p>The WrappedKeyBlock containing the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
    pub outgoing_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
}
impl ReEncryptDataInput {
    /// <p>The <code>keyARN</code> of the encryption key of incoming ciphertext data.</p>
    /// <p>When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation.</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 of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
    pub fn outgoing_key_identifier(&self) -> ::std::option::Option<&str> {
        self.outgoing_key_identifier.as_deref()
    }
    /// <p>Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.</p>
    pub fn cipher_text(&self) -> ::std::option::Option<&str> {
        self.cipher_text.as_deref()
    }
    /// <p>The attributes and values for incoming ciphertext.</p>
    pub fn incoming_encryption_attributes(&self) -> ::std::option::Option<&crate::types::ReEncryptionAttributes> {
        self.incoming_encryption_attributes.as_ref()
    }
    /// <p>The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
    pub fn outgoing_encryption_attributes(&self) -> ::std::option::Option<&crate::types::ReEncryptionAttributes> {
        self.outgoing_encryption_attributes.as_ref()
    }
    /// <p>The WrappedKeyBlock containing the encryption key of incoming ciphertext data.</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 of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
    pub fn outgoing_wrapped_key(&self) -> ::std::option::Option<&crate::types::WrappedKey> {
        self.outgoing_wrapped_key.as_ref()
    }
}
impl ::std::fmt::Debug for ReEncryptDataInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ReEncryptDataInput");
        formatter.field("incoming_key_identifier", &self.incoming_key_identifier);
        formatter.field("outgoing_key_identifier", &self.outgoing_key_identifier);
        formatter.field("cipher_text", &"*** Sensitive Data Redacted ***");
        formatter.field("incoming_encryption_attributes", &self.incoming_encryption_attributes);
        formatter.field("outgoing_encryption_attributes", &self.outgoing_encryption_attributes);
        formatter.field("incoming_wrapped_key", &self.incoming_wrapped_key);
        formatter.field("outgoing_wrapped_key", &self.outgoing_wrapped_key);
        formatter.finish()
    }
}
impl ReEncryptDataInput {
    /// Creates a new builder-style object to manufacture [`ReEncryptDataInput`](crate::operation::re_encrypt_data::ReEncryptDataInput).
    pub fn builder() -> crate::operation::re_encrypt_data::builders::ReEncryptDataInputBuilder {
        crate::operation::re_encrypt_data::builders::ReEncryptDataInputBuilder::default()
    }
}

/// A builder for [`ReEncryptDataInput`](crate::operation::re_encrypt_data::ReEncryptDataInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ReEncryptDataInputBuilder {
    pub(crate) incoming_key_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) outgoing_key_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) cipher_text: ::std::option::Option<::std::string::String>,
    pub(crate) incoming_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
    pub(crate) outgoing_encryption_attributes: ::std::option::Option<crate::types::ReEncryptionAttributes>,
    pub(crate) incoming_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
    pub(crate) outgoing_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
}
impl ReEncryptDataInputBuilder {
    /// <p>The <code>keyARN</code> of the encryption key of incoming ciphertext data.</p>
    /// <p>When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation.</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 of incoming ciphertext data.</p>
    /// <p>When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation.</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 of incoming ciphertext data.</p>
    /// <p>When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation.</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 of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</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 of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</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 of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
    pub fn get_outgoing_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.outgoing_key_identifier
    }
    /// <p>Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.</p>
    /// This field is required.
    pub fn cipher_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cipher_text = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.</p>
    pub fn set_cipher_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cipher_text = input;
        self
    }
    /// <p>Ciphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.</p>
    pub fn get_cipher_text(&self) -> &::std::option::Option<::std::string::String> {
        &self.cipher_text
    }
    /// <p>The attributes and values for incoming ciphertext.</p>
    /// This field is required.
    pub fn incoming_encryption_attributes(mut self, input: crate::types::ReEncryptionAttributes) -> Self {
        self.incoming_encryption_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The attributes and values for incoming ciphertext.</p>
    pub fn set_incoming_encryption_attributes(mut self, input: ::std::option::Option<crate::types::ReEncryptionAttributes>) -> Self {
        self.incoming_encryption_attributes = input;
        self
    }
    /// <p>The attributes and values for incoming ciphertext.</p>
    pub fn get_incoming_encryption_attributes(&self) -> &::std::option::Option<crate::types::ReEncryptionAttributes> {
        &self.incoming_encryption_attributes
    }
    /// <p>The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
    /// This field is required.
    pub fn outgoing_encryption_attributes(mut self, input: crate::types::ReEncryptionAttributes) -> Self {
        self.outgoing_encryption_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
    pub fn set_outgoing_encryption_attributes(mut self, input: ::std::option::Option<crate::types::ReEncryptionAttributes>) -> Self {
        self.outgoing_encryption_attributes = input;
        self
    }
    /// <p>The attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
    pub fn get_outgoing_encryption_attributes(&self) -> &::std::option::Option<crate::types::ReEncryptionAttributes> {
        &self.outgoing_encryption_attributes
    }
    /// <p>The WrappedKeyBlock containing the encryption key of incoming ciphertext data.</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 of incoming ciphertext data.</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 of incoming ciphertext data.</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 of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</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 of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</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 of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.</p>
    pub fn get_outgoing_wrapped_key(&self) -> &::std::option::Option<crate::types::WrappedKey> {
        &self.outgoing_wrapped_key
    }
    /// Consumes the builder and constructs a [`ReEncryptDataInput`](crate::operation::re_encrypt_data::ReEncryptDataInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::re_encrypt_data::ReEncryptDataInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::re_encrypt_data::ReEncryptDataInput {
            incoming_key_identifier: self.incoming_key_identifier,
            outgoing_key_identifier: self.outgoing_key_identifier,
            cipher_text: self.cipher_text,
            incoming_encryption_attributes: self.incoming_encryption_attributes,
            outgoing_encryption_attributes: self.outgoing_encryption_attributes,
            incoming_wrapped_key: self.incoming_wrapped_key,
            outgoing_wrapped_key: self.outgoing_wrapped_key,
        })
    }
}
impl ::std::fmt::Debug for ReEncryptDataInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ReEncryptDataInputBuilder");
        formatter.field("incoming_key_identifier", &self.incoming_key_identifier);
        formatter.field("outgoing_key_identifier", &self.outgoing_key_identifier);
        formatter.field("cipher_text", &"*** Sensitive Data Redacted ***");
        formatter.field("incoming_encryption_attributes", &self.incoming_encryption_attributes);
        formatter.field("outgoing_encryption_attributes", &self.outgoing_encryption_attributes);
        formatter.field("incoming_wrapped_key", &self.incoming_wrapped_key);
        formatter.field("outgoing_wrapped_key", &self.outgoing_wrapped_key);
        formatter.finish()
    }
}