1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
// 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()
}
}