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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Parameters that are required to generate or verify Ibm3624 PIN from offset PIN.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Ibm3624PinFromOffset {
    /// <p>The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal.</p>
    pub decimalization_table: ::std::string::String,
    /// <p>The padding character for validation data.</p>
    pub pin_validation_data_pad_character: ::std::string::String,
    /// <p>The unique data for cardholder identification.</p>
    pub pin_validation_data: ::std::string::String,
    /// <p>The PIN offset value.</p>
    pub pin_offset: ::std::string::String,
}
impl Ibm3624PinFromOffset {
    /// <p>The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal.</p>
    pub fn decimalization_table(&self) -> &str {
        use std::ops::Deref;
        self.decimalization_table.deref()
    }
    /// <p>The padding character for validation data.</p>
    pub fn pin_validation_data_pad_character(&self) -> &str {
        use std::ops::Deref;
        self.pin_validation_data_pad_character.deref()
    }
    /// <p>The unique data for cardholder identification.</p>
    pub fn pin_validation_data(&self) -> &str {
        use std::ops::Deref;
        self.pin_validation_data.deref()
    }
    /// <p>The PIN offset value.</p>
    pub fn pin_offset(&self) -> &str {
        use std::ops::Deref;
        self.pin_offset.deref()
    }
}
impl ::std::fmt::Debug for Ibm3624PinFromOffset {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Ibm3624PinFromOffset");
        formatter.field("decimalization_table", &"*** Sensitive Data Redacted ***");
        formatter.field("pin_validation_data_pad_character", &self.pin_validation_data_pad_character);
        formatter.field("pin_validation_data", &"*** Sensitive Data Redacted ***");
        formatter.field("pin_offset", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl Ibm3624PinFromOffset {
    /// Creates a new builder-style object to manufacture [`Ibm3624PinFromOffset`](crate::types::Ibm3624PinFromOffset).
    pub fn builder() -> crate::types::builders::Ibm3624PinFromOffsetBuilder {
        crate::types::builders::Ibm3624PinFromOffsetBuilder::default()
    }
}

/// A builder for [`Ibm3624PinFromOffset`](crate::types::Ibm3624PinFromOffset).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct Ibm3624PinFromOffsetBuilder {
    pub(crate) decimalization_table: ::std::option::Option<::std::string::String>,
    pub(crate) pin_validation_data_pad_character: ::std::option::Option<::std::string::String>,
    pub(crate) pin_validation_data: ::std::option::Option<::std::string::String>,
    pub(crate) pin_offset: ::std::option::Option<::std::string::String>,
}
impl Ibm3624PinFromOffsetBuilder {
    /// <p>The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal.</p>
    /// This field is required.
    pub fn decimalization_table(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.decimalization_table = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal.</p>
    pub fn set_decimalization_table(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.decimalization_table = input;
        self
    }
    /// <p>The decimalization table to use for IBM 3624 PIN algorithm. The table is used to convert the algorithm intermediate result from hexadecimal characters to decimal.</p>
    pub fn get_decimalization_table(&self) -> &::std::option::Option<::std::string::String> {
        &self.decimalization_table
    }
    /// <p>The padding character for validation data.</p>
    /// This field is required.
    pub fn pin_validation_data_pad_character(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.pin_validation_data_pad_character = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The padding character for validation data.</p>
    pub fn set_pin_validation_data_pad_character(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pin_validation_data_pad_character = input;
        self
    }
    /// <p>The padding character for validation data.</p>
    pub fn get_pin_validation_data_pad_character(&self) -> &::std::option::Option<::std::string::String> {
        &self.pin_validation_data_pad_character
    }
    /// <p>The unique data for cardholder identification.</p>
    /// This field is required.
    pub fn pin_validation_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.pin_validation_data = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique data for cardholder identification.</p>
    pub fn set_pin_validation_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pin_validation_data = input;
        self
    }
    /// <p>The unique data for cardholder identification.</p>
    pub fn get_pin_validation_data(&self) -> &::std::option::Option<::std::string::String> {
        &self.pin_validation_data
    }
    /// <p>The PIN offset value.</p>
    /// This field is required.
    pub fn pin_offset(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.pin_offset = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The PIN offset value.</p>
    pub fn set_pin_offset(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.pin_offset = input;
        self
    }
    /// <p>The PIN offset value.</p>
    pub fn get_pin_offset(&self) -> &::std::option::Option<::std::string::String> {
        &self.pin_offset
    }
    /// Consumes the builder and constructs a [`Ibm3624PinFromOffset`](crate::types::Ibm3624PinFromOffset).
    /// This method will fail if any of the following fields are not set:
    /// - [`decimalization_table`](crate::types::builders::Ibm3624PinFromOffsetBuilder::decimalization_table)
    /// - [`pin_validation_data_pad_character`](crate::types::builders::Ibm3624PinFromOffsetBuilder::pin_validation_data_pad_character)
    /// - [`pin_validation_data`](crate::types::builders::Ibm3624PinFromOffsetBuilder::pin_validation_data)
    /// - [`pin_offset`](crate::types::builders::Ibm3624PinFromOffsetBuilder::pin_offset)
    pub fn build(self) -> ::std::result::Result<crate::types::Ibm3624PinFromOffset, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Ibm3624PinFromOffset {
            decimalization_table: self.decimalization_table.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "decimalization_table",
                    "decimalization_table was not specified but it is required when building Ibm3624PinFromOffset",
                )
            })?,
            pin_validation_data_pad_character: self.pin_validation_data_pad_character.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "pin_validation_data_pad_character",
                    "pin_validation_data_pad_character was not specified but it is required when building Ibm3624PinFromOffset",
                )
            })?,
            pin_validation_data: self.pin_validation_data.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "pin_validation_data",
                    "pin_validation_data was not specified but it is required when building Ibm3624PinFromOffset",
                )
            })?,
            pin_offset: self.pin_offset.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "pin_offset",
                    "pin_offset was not specified but it is required when building Ibm3624PinFromOffset",
                )
            })?,
        })
    }
}
impl ::std::fmt::Debug for Ibm3624PinFromOffsetBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Ibm3624PinFromOffsetBuilder");
        formatter.field("decimalization_table", &"*** Sensitive Data Redacted ***");
        formatter.field("pin_validation_data_pad_character", &self.pin_validation_data_pad_character);
        formatter.field("pin_validation_data", &"*** Sensitive Data Redacted ***");
        formatter.field("pin_offset", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}