aws_sdk_paymentcryptographydata/operation/generate_pin_data/
_generate_pin_data_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GeneratePinDataInput {
6    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses for pin data generation.</p>
7    pub generation_key_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
9    pub encryption_key_identifier: ::std::option::Option<::std::string::String>,
10    /// <p>The attributes and values to use for PIN, PVV, or PIN Offset generation.</p>
11    pub generation_attributes: ::std::option::Option<crate::types::PinGenerationAttributes>,
12    /// <p>The length of PIN under generation.</p>
13    pub pin_data_length: ::std::option::Option<i32>,
14    /// <p>The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.</p>
15    pub primary_account_number: ::std::option::Option<::std::string::String>,
16    /// <p>The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment Cryptography supports <code>ISO_Format_0</code>, <code>ISO_Format_3</code> and <code>ISO_Format_4</code>.</p>
17    /// <p>The <code>ISO_Format_0</code> PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.</p>
18    /// <p>The <code>ISO_Format_3</code> PIN block format is the same as <code>ISO_Format_0</code> except that the fill digits are random values from 10 to 15.</p>
19    /// <p>The <code>ISO_Format_4</code> PIN block format is the only one supporting AES encryption. It is similar to <code>ISO_Format_3</code> but doubles the pin block length by padding with fill digit A and random values from 10 to 15.</p>
20    pub pin_block_format: ::std::option::Option<crate::types::PinBlockFormatForPinData>,
21    /// <p>Parameter information of a WrappedKeyBlock for encryption key exchange.</p>
22    pub encryption_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
23}
24impl GeneratePinDataInput {
25    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses for pin data generation.</p>
26    pub fn generation_key_identifier(&self) -> ::std::option::Option<&str> {
27        self.generation_key_identifier.as_deref()
28    }
29    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
30    pub fn encryption_key_identifier(&self) -> ::std::option::Option<&str> {
31        self.encryption_key_identifier.as_deref()
32    }
33    /// <p>The attributes and values to use for PIN, PVV, or PIN Offset generation.</p>
34    pub fn generation_attributes(&self) -> ::std::option::Option<&crate::types::PinGenerationAttributes> {
35        self.generation_attributes.as_ref()
36    }
37    /// <p>The length of PIN under generation.</p>
38    pub fn pin_data_length(&self) -> ::std::option::Option<i32> {
39        self.pin_data_length
40    }
41    /// <p>The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.</p>
42    pub fn primary_account_number(&self) -> ::std::option::Option<&str> {
43        self.primary_account_number.as_deref()
44    }
45    /// <p>The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment Cryptography supports <code>ISO_Format_0</code>, <code>ISO_Format_3</code> and <code>ISO_Format_4</code>.</p>
46    /// <p>The <code>ISO_Format_0</code> PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.</p>
47    /// <p>The <code>ISO_Format_3</code> PIN block format is the same as <code>ISO_Format_0</code> except that the fill digits are random values from 10 to 15.</p>
48    /// <p>The <code>ISO_Format_4</code> PIN block format is the only one supporting AES encryption. It is similar to <code>ISO_Format_3</code> but doubles the pin block length by padding with fill digit A and random values from 10 to 15.</p>
49    pub fn pin_block_format(&self) -> ::std::option::Option<&crate::types::PinBlockFormatForPinData> {
50        self.pin_block_format.as_ref()
51    }
52    /// <p>Parameter information of a WrappedKeyBlock for encryption key exchange.</p>
53    pub fn encryption_wrapped_key(&self) -> ::std::option::Option<&crate::types::WrappedKey> {
54        self.encryption_wrapped_key.as_ref()
55    }
56}
57impl ::std::fmt::Debug for GeneratePinDataInput {
58    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
59        let mut formatter = f.debug_struct("GeneratePinDataInput");
60        formatter.field("generation_key_identifier", &self.generation_key_identifier);
61        formatter.field("encryption_key_identifier", &self.encryption_key_identifier);
62        formatter.field("generation_attributes", &self.generation_attributes);
63        formatter.field("pin_data_length", &self.pin_data_length);
64        formatter.field("primary_account_number", &"*** Sensitive Data Redacted ***");
65        formatter.field("pin_block_format", &self.pin_block_format);
66        formatter.field("encryption_wrapped_key", &self.encryption_wrapped_key);
67        formatter.finish()
68    }
69}
70impl GeneratePinDataInput {
71    /// Creates a new builder-style object to manufacture [`GeneratePinDataInput`](crate::operation::generate_pin_data::GeneratePinDataInput).
72    pub fn builder() -> crate::operation::generate_pin_data::builders::GeneratePinDataInputBuilder {
73        crate::operation::generate_pin_data::builders::GeneratePinDataInputBuilder::default()
74    }
75}
76
77/// A builder for [`GeneratePinDataInput`](crate::operation::generate_pin_data::GeneratePinDataInput).
78#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
79#[non_exhaustive]
80pub struct GeneratePinDataInputBuilder {
81    pub(crate) generation_key_identifier: ::std::option::Option<::std::string::String>,
82    pub(crate) encryption_key_identifier: ::std::option::Option<::std::string::String>,
83    pub(crate) generation_attributes: ::std::option::Option<crate::types::PinGenerationAttributes>,
84    pub(crate) pin_data_length: ::std::option::Option<i32>,
85    pub(crate) primary_account_number: ::std::option::Option<::std::string::String>,
86    pub(crate) pin_block_format: ::std::option::Option<crate::types::PinBlockFormatForPinData>,
87    pub(crate) encryption_wrapped_key: ::std::option::Option<crate::types::WrappedKey>,
88}
89impl GeneratePinDataInputBuilder {
90    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses for pin data generation.</p>
91    /// This field is required.
92    pub fn generation_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93        self.generation_key_identifier = ::std::option::Option::Some(input.into());
94        self
95    }
96    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses for pin data generation.</p>
97    pub fn set_generation_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98        self.generation_key_identifier = input;
99        self
100    }
101    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses for pin data generation.</p>
102    pub fn get_generation_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
103        &self.generation_key_identifier
104    }
105    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
106    /// This field is required.
107    pub fn encryption_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.encryption_key_identifier = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
112    pub fn set_encryption_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.encryption_key_identifier = input;
114        self
115    }
116    /// <p>The <code>keyARN</code> of the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block. For ECDH, it is the <code>keyARN</code> of the asymmetric ECC key.</p>
117    pub fn get_encryption_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
118        &self.encryption_key_identifier
119    }
120    /// <p>The attributes and values to use for PIN, PVV, or PIN Offset generation.</p>
121    /// This field is required.
122    pub fn generation_attributes(mut self, input: crate::types::PinGenerationAttributes) -> Self {
123        self.generation_attributes = ::std::option::Option::Some(input);
124        self
125    }
126    /// <p>The attributes and values to use for PIN, PVV, or PIN Offset generation.</p>
127    pub fn set_generation_attributes(mut self, input: ::std::option::Option<crate::types::PinGenerationAttributes>) -> Self {
128        self.generation_attributes = input;
129        self
130    }
131    /// <p>The attributes and values to use for PIN, PVV, or PIN Offset generation.</p>
132    pub fn get_generation_attributes(&self) -> &::std::option::Option<crate::types::PinGenerationAttributes> {
133        &self.generation_attributes
134    }
135    /// <p>The length of PIN under generation.</p>
136    pub fn pin_data_length(mut self, input: i32) -> Self {
137        self.pin_data_length = ::std::option::Option::Some(input);
138        self
139    }
140    /// <p>The length of PIN under generation.</p>
141    pub fn set_pin_data_length(mut self, input: ::std::option::Option<i32>) -> Self {
142        self.pin_data_length = input;
143        self
144    }
145    /// <p>The length of PIN under generation.</p>
146    pub fn get_pin_data_length(&self) -> &::std::option::Option<i32> {
147        &self.pin_data_length
148    }
149    /// <p>The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.</p>
150    pub fn primary_account_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151        self.primary_account_number = ::std::option::Option::Some(input.into());
152        self
153    }
154    /// <p>The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.</p>
155    pub fn set_primary_account_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156        self.primary_account_number = input;
157        self
158    }
159    /// <p>The Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.</p>
160    pub fn get_primary_account_number(&self) -> &::std::option::Option<::std::string::String> {
161        &self.primary_account_number
162    }
163    /// <p>The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment Cryptography supports <code>ISO_Format_0</code>, <code>ISO_Format_3</code> and <code>ISO_Format_4</code>.</p>
164    /// <p>The <code>ISO_Format_0</code> PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.</p>
165    /// <p>The <code>ISO_Format_3</code> PIN block format is the same as <code>ISO_Format_0</code> except that the fill digits are random values from 10 to 15.</p>
166    /// <p>The <code>ISO_Format_4</code> PIN block format is the only one supporting AES encryption. It is similar to <code>ISO_Format_3</code> but doubles the pin block length by padding with fill digit A and random values from 10 to 15.</p>
167    /// This field is required.
168    pub fn pin_block_format(mut self, input: crate::types::PinBlockFormatForPinData) -> Self {
169        self.pin_block_format = ::std::option::Option::Some(input);
170        self
171    }
172    /// <p>The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment Cryptography supports <code>ISO_Format_0</code>, <code>ISO_Format_3</code> and <code>ISO_Format_4</code>.</p>
173    /// <p>The <code>ISO_Format_0</code> PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.</p>
174    /// <p>The <code>ISO_Format_3</code> PIN block format is the same as <code>ISO_Format_0</code> except that the fill digits are random values from 10 to 15.</p>
175    /// <p>The <code>ISO_Format_4</code> PIN block format is the only one supporting AES encryption. It is similar to <code>ISO_Format_3</code> but doubles the pin block length by padding with fill digit A and random values from 10 to 15.</p>
176    pub fn set_pin_block_format(mut self, input: ::std::option::Option<crate::types::PinBlockFormatForPinData>) -> Self {
177        self.pin_block_format = input;
178        self
179    }
180    /// <p>The PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment Cryptography supports <code>ISO_Format_0</code>, <code>ISO_Format_3</code> and <code>ISO_Format_4</code>.</p>
181    /// <p>The <code>ISO_Format_0</code> PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.</p>
182    /// <p>The <code>ISO_Format_3</code> PIN block format is the same as <code>ISO_Format_0</code> except that the fill digits are random values from 10 to 15.</p>
183    /// <p>The <code>ISO_Format_4</code> PIN block format is the only one supporting AES encryption. It is similar to <code>ISO_Format_3</code> but doubles the pin block length by padding with fill digit A and random values from 10 to 15.</p>
184    pub fn get_pin_block_format(&self) -> &::std::option::Option<crate::types::PinBlockFormatForPinData> {
185        &self.pin_block_format
186    }
187    /// <p>Parameter information of a WrappedKeyBlock for encryption key exchange.</p>
188    pub fn encryption_wrapped_key(mut self, input: crate::types::WrappedKey) -> Self {
189        self.encryption_wrapped_key = ::std::option::Option::Some(input);
190        self
191    }
192    /// <p>Parameter information of a WrappedKeyBlock for encryption key exchange.</p>
193    pub fn set_encryption_wrapped_key(mut self, input: ::std::option::Option<crate::types::WrappedKey>) -> Self {
194        self.encryption_wrapped_key = input;
195        self
196    }
197    /// <p>Parameter information of a WrappedKeyBlock for encryption key exchange.</p>
198    pub fn get_encryption_wrapped_key(&self) -> &::std::option::Option<crate::types::WrappedKey> {
199        &self.encryption_wrapped_key
200    }
201    /// Consumes the builder and constructs a [`GeneratePinDataInput`](crate::operation::generate_pin_data::GeneratePinDataInput).
202    pub fn build(
203        self,
204    ) -> ::std::result::Result<crate::operation::generate_pin_data::GeneratePinDataInput, ::aws_smithy_types::error::operation::BuildError> {
205        ::std::result::Result::Ok(crate::operation::generate_pin_data::GeneratePinDataInput {
206            generation_key_identifier: self.generation_key_identifier,
207            encryption_key_identifier: self.encryption_key_identifier,
208            generation_attributes: self.generation_attributes,
209            pin_data_length: self.pin_data_length,
210            primary_account_number: self.primary_account_number,
211            pin_block_format: self.pin_block_format,
212            encryption_wrapped_key: self.encryption_wrapped_key,
213        })
214    }
215}
216impl ::std::fmt::Debug for GeneratePinDataInputBuilder {
217    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
218        let mut formatter = f.debug_struct("GeneratePinDataInputBuilder");
219        formatter.field("generation_key_identifier", &self.generation_key_identifier);
220        formatter.field("encryption_key_identifier", &self.encryption_key_identifier);
221        formatter.field("generation_attributes", &self.generation_attributes);
222        formatter.field("pin_data_length", &self.pin_data_length);
223        formatter.field("primary_account_number", &"*** Sensitive Data Redacted ***");
224        formatter.field("pin_block_format", &self.pin_block_format);
225        formatter.field("encryption_wrapped_key", &self.encryption_wrapped_key);
226        formatter.finish()
227    }
228}