aws_sdk_ses/operation/send_email/
_send_email_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SendEmailOutput {
7 pub message_id: ::std::string::String,
9 _request_id: Option<String>,
10}
11impl SendEmailOutput {
12 pub fn message_id(&self) -> &str {
14 use std::ops::Deref;
15 self.message_id.deref()
16 }
17}
18impl ::aws_types::request_id::RequestId for SendEmailOutput {
19 fn request_id(&self) -> Option<&str> {
20 self._request_id.as_deref()
21 }
22}
23impl SendEmailOutput {
24 pub fn builder() -> crate::operation::send_email::builders::SendEmailOutputBuilder {
26 crate::operation::send_email::builders::SendEmailOutputBuilder::default()
27 }
28}
29
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct SendEmailOutputBuilder {
34 pub(crate) message_id: ::std::option::Option<::std::string::String>,
35 _request_id: Option<String>,
36}
37impl SendEmailOutputBuilder {
38 pub fn message_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41 self.message_id = ::std::option::Option::Some(input.into());
42 self
43 }
44 pub fn set_message_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46 self.message_id = input;
47 self
48 }
49 pub fn get_message_id(&self) -> &::std::option::Option<::std::string::String> {
51 &self.message_id
52 }
53 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
54 self._request_id = Some(request_id.into());
55 self
56 }
57
58 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
59 self._request_id = request_id;
60 self
61 }
62 pub fn build(self) -> ::std::result::Result<crate::operation::send_email::SendEmailOutput, ::aws_smithy_types::error::operation::BuildError> {
66 ::std::result::Result::Ok(crate::operation::send_email::SendEmailOutput {
67 message_id: self.message_id.ok_or_else(|| {
68 ::aws_smithy_types::error::operation::BuildError::missing_field(
69 "message_id",
70 "message_id was not specified but it is required when building SendEmailOutput",
71 )
72 })?,
73 _request_id: self._request_id,
74 })
75 }
76}