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
// 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, ::std::fmt::Debug)]
pub struct GenerateMacInput {
    /// <p>The <code>keyARN</code> of the MAC generation encryption key.</p>
    pub key_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The data for which a MAC is under generation.</p>
    pub message_data: ::std::option::Option<::std::string::String>,
    /// <p>The attributes and data values to use for MAC generation within Amazon Web Services Payment Cryptography.</p>
    pub generation_attributes: ::std::option::Option<crate::types::MacAttributes>,
    /// <p>The length of a MAC under generation.</p>
    pub mac_length: ::std::option::Option<i32>,
}
impl GenerateMacInput {
    /// <p>The <code>keyARN</code> of the MAC generation encryption key.</p>
    pub fn key_identifier(&self) -> ::std::option::Option<&str> {
        self.key_identifier.as_deref()
    }
    /// <p>The data for which a MAC is under generation.</p>
    pub fn message_data(&self) -> ::std::option::Option<&str> {
        self.message_data.as_deref()
    }
    /// <p>The attributes and data values to use for MAC generation within Amazon Web Services Payment Cryptography.</p>
    pub fn generation_attributes(&self) -> ::std::option::Option<&crate::types::MacAttributes> {
        self.generation_attributes.as_ref()
    }
    /// <p>The length of a MAC under generation.</p>
    pub fn mac_length(&self) -> ::std::option::Option<i32> {
        self.mac_length
    }
}
impl GenerateMacInput {
    /// Creates a new builder-style object to manufacture [`GenerateMacInput`](crate::operation::generate_mac::GenerateMacInput).
    pub fn builder() -> crate::operation::generate_mac::builders::GenerateMacInputBuilder {
        crate::operation::generate_mac::builders::GenerateMacInputBuilder::default()
    }
}

/// A builder for [`GenerateMacInput`](crate::operation::generate_mac::GenerateMacInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GenerateMacInputBuilder {
    pub(crate) key_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) message_data: ::std::option::Option<::std::string::String>,
    pub(crate) generation_attributes: ::std::option::Option<crate::types::MacAttributes>,
    pub(crate) mac_length: ::std::option::Option<i32>,
}
impl GenerateMacInputBuilder {
    /// <p>The <code>keyARN</code> of the MAC generation encryption key.</p>
    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 MAC generation encryption key.</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 MAC generation encryption key.</p>
    pub fn get_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.key_identifier
    }
    /// <p>The data for which a MAC is under generation.</p>
    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 for which a MAC is under generation.</p>
    pub fn set_message_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.message_data = input;
        self
    }
    /// <p>The data for which a MAC is under generation.</p>
    pub fn get_message_data(&self) -> &::std::option::Option<::std::string::String> {
        &self.message_data
    }
    /// <p>The attributes and data values to use for MAC generation within Amazon Web Services Payment Cryptography.</p>
    pub fn generation_attributes(mut self, input: crate::types::MacAttributes) -> Self {
        self.generation_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The attributes and data values to use for MAC generation within Amazon Web Services Payment Cryptography.</p>
    pub fn set_generation_attributes(mut self, input: ::std::option::Option<crate::types::MacAttributes>) -> Self {
        self.generation_attributes = input;
        self
    }
    /// <p>The attributes and data values to use for MAC generation within Amazon Web Services Payment Cryptography.</p>
    pub fn get_generation_attributes(&self) -> &::std::option::Option<crate::types::MacAttributes> {
        &self.generation_attributes
    }
    /// <p>The length of a MAC under generation.</p>
    pub fn mac_length(mut self, input: i32) -> Self {
        self.mac_length = ::std::option::Option::Some(input);
        self
    }
    /// <p>The length of a MAC under generation.</p>
    pub fn set_mac_length(mut self, input: ::std::option::Option<i32>) -> Self {
        self.mac_length = input;
        self
    }
    /// <p>The length of a MAC under generation.</p>
    pub fn get_mac_length(&self) -> &::std::option::Option<i32> {
        &self.mac_length
    }
    /// Consumes the builder and constructs a [`GenerateMacInput`](crate::operation::generate_mac::GenerateMacInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::generate_mac::GenerateMacInput, ::aws_smithy_http::operation::error::BuildError> {
        ::std::result::Result::Ok(crate::operation::generate_mac::GenerateMacInput {
            key_identifier: self.key_identifier,
            message_data: self.message_data,
            generation_attributes: self.generation_attributes,
            mac_length: self.mac_length,
        })
    }
}