aws_sdk_paymentcryptographydata/operation/verify_mac/
_verify_mac_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct VerifyMacInput {
6 pub key_identifier: ::std::option::Option<::std::string::String>,
8 pub message_data: ::std::option::Option<::std::string::String>,
10 pub mac: ::std::option::Option<::std::string::String>,
12 pub verification_attributes: ::std::option::Option<crate::types::MacAttributes>,
14 pub mac_length: ::std::option::Option<i32>,
16}
17impl VerifyMacInput {
18 pub fn key_identifier(&self) -> ::std::option::Option<&str> {
20 self.key_identifier.as_deref()
21 }
22 pub fn message_data(&self) -> ::std::option::Option<&str> {
24 self.message_data.as_deref()
25 }
26 pub fn mac(&self) -> ::std::option::Option<&str> {
28 self.mac.as_deref()
29 }
30 pub fn verification_attributes(&self) -> ::std::option::Option<&crate::types::MacAttributes> {
32 self.verification_attributes.as_ref()
33 }
34 pub fn mac_length(&self) -> ::std::option::Option<i32> {
36 self.mac_length
37 }
38}
39impl ::std::fmt::Debug for VerifyMacInput {
40 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
41 let mut formatter = f.debug_struct("VerifyMacInput");
42 formatter.field("key_identifier", &self.key_identifier);
43 formatter.field("message_data", &"*** Sensitive Data Redacted ***");
44 formatter.field("mac", &"*** Sensitive Data Redacted ***");
45 formatter.field("verification_attributes", &self.verification_attributes);
46 formatter.field("mac_length", &self.mac_length);
47 formatter.finish()
48 }
49}
50impl VerifyMacInput {
51 pub fn builder() -> crate::operation::verify_mac::builders::VerifyMacInputBuilder {
53 crate::operation::verify_mac::builders::VerifyMacInputBuilder::default()
54 }
55}
56
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
59#[non_exhaustive]
60pub struct VerifyMacInputBuilder {
61 pub(crate) key_identifier: ::std::option::Option<::std::string::String>,
62 pub(crate) message_data: ::std::option::Option<::std::string::String>,
63 pub(crate) mac: ::std::option::Option<::std::string::String>,
64 pub(crate) verification_attributes: ::std::option::Option<crate::types::MacAttributes>,
65 pub(crate) mac_length: ::std::option::Option<i32>,
66}
67impl VerifyMacInputBuilder {
68 pub fn key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.key_identifier = ::std::option::Option::Some(input.into());
72 self
73 }
74 pub fn set_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.key_identifier = input;
77 self
78 }
79 pub fn get_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
81 &self.key_identifier
82 }
83 pub fn message_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.message_data = ::std::option::Option::Some(input.into());
87 self
88 }
89 pub fn set_message_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.message_data = input;
92 self
93 }
94 pub fn get_message_data(&self) -> &::std::option::Option<::std::string::String> {
96 &self.message_data
97 }
98 pub fn mac(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101 self.mac = ::std::option::Option::Some(input.into());
102 self
103 }
104 pub fn set_mac(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106 self.mac = input;
107 self
108 }
109 pub fn get_mac(&self) -> &::std::option::Option<::std::string::String> {
111 &self.mac
112 }
113 pub fn verification_attributes(mut self, input: crate::types::MacAttributes) -> Self {
116 self.verification_attributes = ::std::option::Option::Some(input);
117 self
118 }
119 pub fn set_verification_attributes(mut self, input: ::std::option::Option<crate::types::MacAttributes>) -> Self {
121 self.verification_attributes = input;
122 self
123 }
124 pub fn get_verification_attributes(&self) -> &::std::option::Option<crate::types::MacAttributes> {
126 &self.verification_attributes
127 }
128 pub fn mac_length(mut self, input: i32) -> Self {
130 self.mac_length = ::std::option::Option::Some(input);
131 self
132 }
133 pub fn set_mac_length(mut self, input: ::std::option::Option<i32>) -> Self {
135 self.mac_length = input;
136 self
137 }
138 pub fn get_mac_length(&self) -> &::std::option::Option<i32> {
140 &self.mac_length
141 }
142 pub fn build(self) -> ::std::result::Result<crate::operation::verify_mac::VerifyMacInput, ::aws_smithy_types::error::operation::BuildError> {
144 ::std::result::Result::Ok(crate::operation::verify_mac::VerifyMacInput {
145 key_identifier: self.key_identifier,
146 message_data: self.message_data,
147 mac: self.mac,
148 verification_attributes: self.verification_attributes,
149 mac_length: self.mac_length,
150 })
151 }
152}
153impl ::std::fmt::Debug for VerifyMacInputBuilder {
154 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
155 let mut formatter = f.debug_struct("VerifyMacInputBuilder");
156 formatter.field("key_identifier", &self.key_identifier);
157 formatter.field("message_data", &"*** Sensitive Data Redacted ***");
158 formatter.field("mac", &"*** Sensitive Data Redacted ***");
159 formatter.field("verification_attributes", &self.verification_attributes);
160 formatter.field("mac_length", &self.mac_length);
161 formatter.finish()
162 }
163}