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 GeneratePinDataOutput {
    /// <p>The <code>keyARN</code> of the pin data generation key that Amazon Web Services Payment Cryptography uses for PIN, PVV or PIN Offset generation.</p>
    pub generation_key_arn: ::std::string::String,
    /// <p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p>
    /// <p>Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.</p>
    pub generation_key_check_value: ::std::string::String,
    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses for encrypted pin block generation. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    pub encryption_key_arn: ::std::string::String,
    /// <p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p>
    /// <p>Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.</p>
    pub encryption_key_check_value: ::std::string::String,
    /// <p>The PIN block encrypted under PEK from Amazon Web Services Payment Cryptography. The encrypted PIN block is a composite of PAN (Primary Account Number) and PIN (Personal Identification Number), generated in accordance with ISO 9564 standard.</p>
    pub encrypted_pin_block: ::std::string::String,
    /// <p>The attributes and values Amazon Web Services Payment Cryptography uses for pin data generation.</p>
    pub pin_data: ::std::option::Option<crate::types::PinData>,
    _request_id: Option<String>,
}
impl GeneratePinDataOutput {
    /// <p>The <code>keyARN</code> of the pin data generation key that Amazon Web Services Payment Cryptography uses for PIN, PVV or PIN Offset generation.</p>
    pub fn generation_key_arn(&self) -> &str {
        use std::ops::Deref;
        self.generation_key_arn.deref()
    }
    /// <p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p>
    /// <p>Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.</p>
    pub fn generation_key_check_value(&self) -> &str {
        use std::ops::Deref;
        self.generation_key_check_value.deref()
    }
    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses for encrypted pin block generation. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    pub fn encryption_key_arn(&self) -> &str {
        use std::ops::Deref;
        self.encryption_key_arn.deref()
    }
    /// <p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p>
    /// <p>Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.</p>
    pub fn encryption_key_check_value(&self) -> &str {
        use std::ops::Deref;
        self.encryption_key_check_value.deref()
    }
    /// <p>The PIN block encrypted under PEK from Amazon Web Services Payment Cryptography. The encrypted PIN block is a composite of PAN (Primary Account Number) and PIN (Personal Identification Number), generated in accordance with ISO 9564 standard.</p>
    pub fn encrypted_pin_block(&self) -> &str {
        use std::ops::Deref;
        self.encrypted_pin_block.deref()
    }
    /// <p>The attributes and values Amazon Web Services Payment Cryptography uses for pin data generation.</p>
    pub fn pin_data(&self) -> ::std::option::Option<&crate::types::PinData> {
        self.pin_data.as_ref()
    }
}
impl ::std::fmt::Debug for GeneratePinDataOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GeneratePinDataOutput");
        formatter.field("generation_key_arn", &self.generation_key_arn);
        formatter.field("generation_key_check_value", &self.generation_key_check_value);
        formatter.field("encryption_key_arn", &self.encryption_key_arn);
        formatter.field("encryption_key_check_value", &self.encryption_key_check_value);
        formatter.field("encrypted_pin_block", &"*** Sensitive Data Redacted ***");
        formatter.field("pin_data", &self.pin_data);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for GeneratePinDataOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GeneratePinDataOutput {
    /// Creates a new builder-style object to manufacture [`GeneratePinDataOutput`](crate::operation::generate_pin_data::GeneratePinDataOutput).
    pub fn builder() -> crate::operation::generate_pin_data::builders::GeneratePinDataOutputBuilder {
        crate::operation::generate_pin_data::builders::GeneratePinDataOutputBuilder::default()
    }
}

/// A builder for [`GeneratePinDataOutput`](crate::operation::generate_pin_data::GeneratePinDataOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GeneratePinDataOutputBuilder {
    pub(crate) generation_key_arn: ::std::option::Option<::std::string::String>,
    pub(crate) generation_key_check_value: ::std::option::Option<::std::string::String>,
    pub(crate) encryption_key_arn: ::std::option::Option<::std::string::String>,
    pub(crate) encryption_key_check_value: ::std::option::Option<::std::string::String>,
    pub(crate) encrypted_pin_block: ::std::option::Option<::std::string::String>,
    pub(crate) pin_data: ::std::option::Option<crate::types::PinData>,
    _request_id: Option<String>,
}
impl GeneratePinDataOutputBuilder {
    /// <p>The <code>keyARN</code> of the pin data generation key that Amazon Web Services Payment Cryptography uses for PIN, PVV or PIN Offset generation.</p>
    /// This field is required.
    pub fn generation_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.generation_key_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>keyARN</code> of the pin data generation key that Amazon Web Services Payment Cryptography uses for PIN, PVV or PIN Offset generation.</p>
    pub fn set_generation_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.generation_key_arn = input;
        self
    }
    /// <p>The <code>keyARN</code> of the pin data generation key that Amazon Web Services Payment Cryptography uses for PIN, PVV or PIN Offset generation.</p>
    pub fn get_generation_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.generation_key_arn
    }
    /// <p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p>
    /// <p>Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.</p>
    /// This field is required.
    pub fn generation_key_check_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.generation_key_check_value = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p>
    /// <p>Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.</p>
    pub fn set_generation_key_check_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.generation_key_check_value = input;
        self
    }
    /// <p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p>
    /// <p>Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.</p>
    pub fn get_generation_key_check_value(&self) -> &::std::option::Option<::std::string::String> {
        &self.generation_key_check_value
    }
    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses for encrypted pin block generation. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    /// This field is required.
    pub fn encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.encryption_key_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses for encrypted pin block generation. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    pub fn set_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.encryption_key_arn = input;
        self
    }
    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses for encrypted pin block generation. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
    pub fn get_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.encryption_key_arn
    }
    /// <p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p>
    /// <p>Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.</p>
    /// This field is required.
    pub fn encryption_key_check_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.encryption_key_check_value = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p>
    /// <p>Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.</p>
    pub fn set_encryption_key_check_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.encryption_key_check_value = input;
        self
    }
    /// <p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p>
    /// <p>Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.</p>
    pub fn get_encryption_key_check_value(&self) -> &::std::option::Option<::std::string::String> {
        &self.encryption_key_check_value
    }
    /// <p>The PIN block encrypted under PEK from Amazon Web Services Payment Cryptography. The encrypted PIN block is a composite of PAN (Primary Account Number) and PIN (Personal Identification Number), generated in accordance with ISO 9564 standard.</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 PIN block encrypted under PEK from Amazon Web Services Payment Cryptography. The encrypted PIN block is a composite of PAN (Primary Account Number) and PIN (Personal Identification Number), generated in accordance with ISO 9564 standard.</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 PIN block encrypted under PEK from Amazon Web Services Payment Cryptography. The encrypted PIN block is a composite of PAN (Primary Account Number) and PIN (Personal Identification Number), generated in accordance with ISO 9564 standard.</p>
    pub fn get_encrypted_pin_block(&self) -> &::std::option::Option<::std::string::String> {
        &self.encrypted_pin_block
    }
    /// <p>The attributes and values Amazon Web Services Payment Cryptography uses for pin data generation.</p>
    /// This field is required.
    pub fn pin_data(mut self, input: crate::types::PinData) -> Self {
        self.pin_data = ::std::option::Option::Some(input);
        self
    }
    /// <p>The attributes and values Amazon Web Services Payment Cryptography uses for pin data generation.</p>
    pub fn set_pin_data(mut self, input: ::std::option::Option<crate::types::PinData>) -> Self {
        self.pin_data = input;
        self
    }
    /// <p>The attributes and values Amazon Web Services Payment Cryptography uses for pin data generation.</p>
    pub fn get_pin_data(&self) -> &::std::option::Option<crate::types::PinData> {
        &self.pin_data
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GeneratePinDataOutput`](crate::operation::generate_pin_data::GeneratePinDataOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`generation_key_arn`](crate::operation::generate_pin_data::builders::GeneratePinDataOutputBuilder::generation_key_arn)
    /// - [`generation_key_check_value`](crate::operation::generate_pin_data::builders::GeneratePinDataOutputBuilder::generation_key_check_value)
    /// - [`encryption_key_arn`](crate::operation::generate_pin_data::builders::GeneratePinDataOutputBuilder::encryption_key_arn)
    /// - [`encryption_key_check_value`](crate::operation::generate_pin_data::builders::GeneratePinDataOutputBuilder::encryption_key_check_value)
    /// - [`encrypted_pin_block`](crate::operation::generate_pin_data::builders::GeneratePinDataOutputBuilder::encrypted_pin_block)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::generate_pin_data::GeneratePinDataOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::generate_pin_data::GeneratePinDataOutput {
            generation_key_arn: self.generation_key_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "generation_key_arn",
                    "generation_key_arn was not specified but it is required when building GeneratePinDataOutput",
                )
            })?,
            generation_key_check_value: self.generation_key_check_value.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "generation_key_check_value",
                    "generation_key_check_value was not specified but it is required when building GeneratePinDataOutput",
                )
            })?,
            encryption_key_arn: self.encryption_key_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "encryption_key_arn",
                    "encryption_key_arn was not specified but it is required when building GeneratePinDataOutput",
                )
            })?,
            encryption_key_check_value: self.encryption_key_check_value.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "encryption_key_check_value",
                    "encryption_key_check_value was not specified but it is required when building GeneratePinDataOutput",
                )
            })?,
            encrypted_pin_block: self.encrypted_pin_block.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "encrypted_pin_block",
                    "encrypted_pin_block was not specified but it is required when building GeneratePinDataOutput",
                )
            })?,
            pin_data: self.pin_data,
            _request_id: self._request_id,
        })
    }
}
impl ::std::fmt::Debug for GeneratePinDataOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GeneratePinDataOutputBuilder");
        formatter.field("generation_key_arn", &self.generation_key_arn);
        formatter.field("generation_key_check_value", &self.generation_key_check_value);
        formatter.field("encryption_key_arn", &self.encryption_key_arn);
        formatter.field("encryption_key_check_value", &self.encryption_key_check_value);
        formatter.field("encrypted_pin_block", &"*** Sensitive Data Redacted ***");
        formatter.field("pin_data", &self.pin_data);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}