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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provides the MIME content of the updated email message as an S3 object. All MIME content must meet the following criteria:</p>
/// <ul>
/// <li>
/// <p>Each part of a multipart MIME message must be formatted properly.</p>
/// </li>
/// <li>
/// <p>Attachments must be of a content type that Amazon SES supports. For more information, see
/// <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mime-types-appendix.html">Unsupported Attachment Types</a>.</p>
/// </li>
/// <li>
/// <p>If any of the MIME parts in a message contain content that is outside of the 7-bit ASCII character range, we recommend
/// encoding that content.</p>
/// </li>
/// <li>
/// <p>Per <a href="https://tools.ietf.org/html/rfc5321#section-4.5.3.1.6">RFC 5321</a>, the maximum length of each line of
/// text, including the <CRLF>, must not exceed 1,000 characters.</p>
/// </li>
/// <li>
/// <p>The message must contain all the required header fields. Check the returned error message for more information.</p>
/// </li>
/// <li>
/// <p>The value of immutable headers must remain unchanged. Check the returned error message for more information.</p>
/// </li>
/// <li>
/// <p>Certain unique headers can only appear once. Check the returned error message for more information.</p>
/// </li>
/// </ul>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RawMessageContent {
    /// <p>The S3 reference of an email message.</p>
    pub s3_reference: std::option::Option<crate::model::S3Reference>,
}
impl RawMessageContent {
    /// <p>The S3 reference of an email message.</p>
    pub fn s3_reference(&self) -> std::option::Option<&crate::model::S3Reference> {
        self.s3_reference.as_ref()
    }
}
impl std::fmt::Debug for RawMessageContent {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("RawMessageContent");
        formatter.field("s3_reference", &self.s3_reference);
        formatter.finish()
    }
}
/// See [`RawMessageContent`](crate::model::RawMessageContent)
pub mod raw_message_content {
    /// A builder for [`RawMessageContent`](crate::model::RawMessageContent)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) s3_reference: std::option::Option<crate::model::S3Reference>,
    }
    impl Builder {
        /// <p>The S3 reference of an email message.</p>
        pub fn s3_reference(mut self, input: crate::model::S3Reference) -> Self {
            self.s3_reference = Some(input);
            self
        }
        /// <p>The S3 reference of an email message.</p>
        pub fn set_s3_reference(
            mut self,
            input: std::option::Option<crate::model::S3Reference>,
        ) -> Self {
            self.s3_reference = input;
            self
        }
        /// Consumes the builder and constructs a [`RawMessageContent`](crate::model::RawMessageContent)
        pub fn build(self) -> crate::model::RawMessageContent {
            crate::model::RawMessageContent {
                s3_reference: self.s3_reference,
            }
        }
    }
}
impl RawMessageContent {
    /// Creates a new builder-style object to manufacture [`RawMessageContent`](crate::model::RawMessageContent)
    pub fn builder() -> crate::model::raw_message_content::Builder {
        crate::model::raw_message_content::Builder::default()
    }
}

/// <p>Amazon S3 object representing the updated message content, in MIME format.</p>
/// <note>
/// <p>The region for the S3 bucket containing the S3 object must match the region used for WorkMail operations. Also, for WorkMail to process
/// an S3 object, it must have permission to access that object. For more information, see
/// <a href="https://docs.aws.amazon.com/workmail/latest/adminguide/update-with-lambda.html">
/// Updating message content with AWS Lambda</a>.</p>
/// </note>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct S3Reference {
    /// <p>The S3 bucket name.</p>
    pub bucket: std::option::Option<std::string::String>,
    /// <p>The S3 key object name.</p>
    pub key: std::option::Option<std::string::String>,
    /// <p>If you enable versioning for the bucket, you can specify the object version.</p>
    pub object_version: std::option::Option<std::string::String>,
}
impl S3Reference {
    /// <p>The S3 bucket name.</p>
    pub fn bucket(&self) -> std::option::Option<&str> {
        self.bucket.as_deref()
    }
    /// <p>The S3 key object name.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>If you enable versioning for the bucket, you can specify the object version.</p>
    pub fn object_version(&self) -> std::option::Option<&str> {
        self.object_version.as_deref()
    }
}
impl std::fmt::Debug for S3Reference {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("S3Reference");
        formatter.field("bucket", &self.bucket);
        formatter.field("key", &self.key);
        formatter.field("object_version", &self.object_version);
        formatter.finish()
    }
}
/// See [`S3Reference`](crate::model::S3Reference)
pub mod s3_reference {
    /// A builder for [`S3Reference`](crate::model::S3Reference)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bucket: std::option::Option<std::string::String>,
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) object_version: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The S3 bucket name.</p>
        pub fn bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.bucket = Some(input.into());
            self
        }
        /// <p>The S3 bucket name.</p>
        pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.bucket = input;
            self
        }
        /// <p>The S3 key object name.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The S3 key object name.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// <p>If you enable versioning for the bucket, you can specify the object version.</p>
        pub fn object_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.object_version = Some(input.into());
            self
        }
        /// <p>If you enable versioning for the bucket, you can specify the object version.</p>
        pub fn set_object_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.object_version = input;
            self
        }
        /// Consumes the builder and constructs a [`S3Reference`](crate::model::S3Reference)
        pub fn build(self) -> crate::model::S3Reference {
            crate::model::S3Reference {
                bucket: self.bucket,
                key: self.key,
                object_version: self.object_version,
            }
        }
    }
}
impl S3Reference {
    /// Creates a new builder-style object to manufacture [`S3Reference`](crate::model::S3Reference)
    pub fn builder() -> crate::model::s3_reference::Builder {
        crate::model::s3_reference::Builder::default()
    }
}