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
// 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 VerifyMacInput {
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.</p>
    pub key_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The data on for which MAC is under verification.</p>
    pub message_data: ::std::option::Option<::std::string::String>,
    /// <p>The MAC being verified.</p>
    pub mac: ::std::option::Option<::std::string::String>,
    /// <p>The attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.</p>
    pub verification_attributes: ::std::option::Option<crate::types::MacAttributes>,
    /// <p>The length of the MAC.</p>
    pub mac_length: ::std::option::Option<i32>,
}
impl VerifyMacInput {
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.</p>
    pub fn key_identifier(&self) -> ::std::option::Option<&str> {
        self.key_identifier.as_deref()
    }
    /// <p>The data on for which MAC is under verification.</p>
    pub fn message_data(&self) -> ::std::option::Option<&str> {
        self.message_data.as_deref()
    }
    /// <p>The MAC being verified.</p>
    pub fn mac(&self) -> ::std::option::Option<&str> {
        self.mac.as_deref()
    }
    /// <p>The attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.</p>
    pub fn verification_attributes(&self) -> ::std::option::Option<&crate::types::MacAttributes> {
        self.verification_attributes.as_ref()
    }
    /// <p>The length of the MAC.</p>
    pub fn mac_length(&self) -> ::std::option::Option<i32> {
        self.mac_length
    }
}
impl ::std::fmt::Debug for VerifyMacInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("VerifyMacInput");
        formatter.field("key_identifier", &self.key_identifier);
        formatter.field("message_data", &"*** Sensitive Data Redacted ***");
        formatter.field("mac", &"*** Sensitive Data Redacted ***");
        formatter.field("verification_attributes", &self.verification_attributes);
        formatter.field("mac_length", &self.mac_length);
        formatter.finish()
    }
}
impl VerifyMacInput {
    /// Creates a new builder-style object to manufacture [`VerifyMacInput`](crate::operation::verify_mac::VerifyMacInput).
    pub fn builder() -> crate::operation::verify_mac::builders::VerifyMacInputBuilder {
        crate::operation::verify_mac::builders::VerifyMacInputBuilder::default()
    }
}

/// A builder for [`VerifyMacInput`](crate::operation::verify_mac::VerifyMacInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct VerifyMacInputBuilder {
    pub(crate) key_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) message_data: ::std::option::Option<::std::string::String>,
    pub(crate) mac: ::std::option::Option<::std::string::String>,
    pub(crate) verification_attributes: ::std::option::Option<crate::types::MacAttributes>,
    pub(crate) mac_length: ::std::option::Option<i32>,
}
impl VerifyMacInputBuilder {
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.</p>
    /// This field is required.
    pub fn key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.key_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.</p>
    pub fn set_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.key_identifier = input;
        self
    }
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.</p>
    pub fn get_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.key_identifier
    }
    /// <p>The data on for which MAC is under verification.</p>
    /// This field is required.
    pub fn message_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.message_data = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The data on for which MAC is under verification.</p>
    pub fn set_message_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.message_data = input;
        self
    }
    /// <p>The data on for which MAC is under verification.</p>
    pub fn get_message_data(&self) -> &::std::option::Option<::std::string::String> {
        &self.message_data
    }
    /// <p>The MAC being verified.</p>
    /// This field is required.
    pub fn mac(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.mac = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The MAC being verified.</p>
    pub fn set_mac(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.mac = input;
        self
    }
    /// <p>The MAC being verified.</p>
    pub fn get_mac(&self) -> &::std::option::Option<::std::string::String> {
        &self.mac
    }
    /// <p>The attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.</p>
    /// This field is required.
    pub fn verification_attributes(mut self, input: crate::types::MacAttributes) -> Self {
        self.verification_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.</p>
    pub fn set_verification_attributes(mut self, input: ::std::option::Option<crate::types::MacAttributes>) -> Self {
        self.verification_attributes = input;
        self
    }
    /// <p>The attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.</p>
    pub fn get_verification_attributes(&self) -> &::std::option::Option<crate::types::MacAttributes> {
        &self.verification_attributes
    }
    /// <p>The length of the MAC.</p>
    pub fn mac_length(mut self, input: i32) -> Self {
        self.mac_length = ::std::option::Option::Some(input);
        self
    }
    /// <p>The length of the MAC.</p>
    pub fn set_mac_length(mut self, input: ::std::option::Option<i32>) -> Self {
        self.mac_length = input;
        self
    }
    /// <p>The length of the MAC.</p>
    pub fn get_mac_length(&self) -> &::std::option::Option<i32> {
        &self.mac_length
    }
    /// Consumes the builder and constructs a [`VerifyMacInput`](crate::operation::verify_mac::VerifyMacInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::verify_mac::VerifyMacInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::verify_mac::VerifyMacInput {
            key_identifier: self.key_identifier,
            message_data: self.message_data,
            mac: self.mac,
            verification_attributes: self.verification_attributes,
            mac_length: self.mac_length,
        })
    }
}
impl ::std::fmt::Debug for VerifyMacInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("VerifyMacInputBuilder");
        formatter.field("key_identifier", &self.key_identifier);
        formatter.field("message_data", &"*** Sensitive Data Redacted ***");
        formatter.field("mac", &"*** Sensitive Data Redacted ***");
        formatter.field("verification_attributes", &self.verification_attributes);
        formatter.field("mac_length", &self.mac_length);
        formatter.finish()
    }
}