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
// 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 EncryptDataInput {
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.</p>
    pub key_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The plaintext to be encrypted.</p>
    pub plain_text: ::std::option::Option<::std::string::String>,
    /// <p>The encryption key type and attributes for plaintext encryption.</p>
    pub encryption_attributes: ::std::option::Option<crate::types::EncryptionDecryptionAttributes>,
}
impl EncryptDataInput {
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.</p>
    pub fn key_identifier(&self) -> ::std::option::Option<&str> {
        self.key_identifier.as_deref()
    }
    /// <p>The plaintext to be encrypted.</p>
    pub fn plain_text(&self) -> ::std::option::Option<&str> {
        self.plain_text.as_deref()
    }
    /// <p>The encryption key type and attributes for plaintext encryption.</p>
    pub fn encryption_attributes(&self) -> ::std::option::Option<&crate::types::EncryptionDecryptionAttributes> {
        self.encryption_attributes.as_ref()
    }
}
impl ::std::fmt::Debug for EncryptDataInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("EncryptDataInput");
        formatter.field("key_identifier", &self.key_identifier);
        formatter.field("plain_text", &"*** Sensitive Data Redacted ***");
        formatter.field("encryption_attributes", &self.encryption_attributes);
        formatter.finish()
    }
}
impl EncryptDataInput {
    /// Creates a new builder-style object to manufacture [`EncryptDataInput`](crate::operation::encrypt_data::EncryptDataInput).
    pub fn builder() -> crate::operation::encrypt_data::builders::EncryptDataInputBuilder {
        crate::operation::encrypt_data::builders::EncryptDataInputBuilder::default()
    }
}

/// A builder for [`EncryptDataInput`](crate::operation::encrypt_data::EncryptDataInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct EncryptDataInputBuilder {
    pub(crate) key_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) plain_text: ::std::option::Option<::std::string::String>,
    pub(crate) encryption_attributes: ::std::option::Option<crate::types::EncryptionDecryptionAttributes>,
}
impl EncryptDataInputBuilder {
    /// <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.</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 encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.</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 for plaintext encryption.</p>
    pub fn get_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.key_identifier
    }
    /// <p>The plaintext to be encrypted.</p>
    pub fn plain_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.plain_text = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The plaintext to be encrypted.</p>
    pub fn set_plain_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.plain_text = input;
        self
    }
    /// <p>The plaintext to be encrypted.</p>
    pub fn get_plain_text(&self) -> &::std::option::Option<::std::string::String> {
        &self.plain_text
    }
    /// <p>The encryption key type and attributes for plaintext encryption.</p>
    pub fn encryption_attributes(mut self, input: crate::types::EncryptionDecryptionAttributes) -> Self {
        self.encryption_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The encryption key type and attributes for plaintext encryption.</p>
    pub fn set_encryption_attributes(mut self, input: ::std::option::Option<crate::types::EncryptionDecryptionAttributes>) -> Self {
        self.encryption_attributes = input;
        self
    }
    /// <p>The encryption key type and attributes for plaintext encryption.</p>
    pub fn get_encryption_attributes(&self) -> &::std::option::Option<crate::types::EncryptionDecryptionAttributes> {
        &self.encryption_attributes
    }
    /// Consumes the builder and constructs a [`EncryptDataInput`](crate::operation::encrypt_data::EncryptDataInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::encrypt_data::EncryptDataInput, ::aws_smithy_http::operation::error::BuildError> {
        ::std::result::Result::Ok(crate::operation::encrypt_data::EncryptDataInput {
            key_identifier: self.key_identifier,
            plain_text: self.plain_text,
            encryption_attributes: self.encryption_attributes,
        })
    }
}
impl ::std::fmt::Debug for EncryptDataInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("EncryptDataInputBuilder");
        formatter.field("key_identifier", &self.key_identifier);
        formatter.field("plain_text", &"*** Sensitive Data Redacted ***");
        formatter.field("encryption_attributes", &self.encryption_attributes);
        formatter.finish()
    }
}