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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Specifies the "From" address for an email message that's sent to participants in a journey.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct JourneyEmailMessage {
    /// <p>The verified email address to send the email message from. The default address is the FromAddress specified for the email channel for the application.</p>
    pub from_address: ::std::option::Option<::std::string::String>,
}
impl JourneyEmailMessage {
    /// <p>The verified email address to send the email message from. The default address is the FromAddress specified for the email channel for the application.</p>
    pub fn from_address(&self) -> ::std::option::Option<&str> {
        self.from_address.as_deref()
    }
}
impl JourneyEmailMessage {
    /// Creates a new builder-style object to manufacture [`JourneyEmailMessage`](crate::types::JourneyEmailMessage).
    pub fn builder() -> crate::types::builders::JourneyEmailMessageBuilder {
        crate::types::builders::JourneyEmailMessageBuilder::default()
    }
}

/// A builder for [`JourneyEmailMessage`](crate::types::JourneyEmailMessage).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct JourneyEmailMessageBuilder {
    pub(crate) from_address: ::std::option::Option<::std::string::String>,
}
impl JourneyEmailMessageBuilder {
    /// <p>The verified email address to send the email message from. The default address is the FromAddress specified for the email channel for the application.</p>
    pub fn from_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.from_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The verified email address to send the email message from. The default address is the FromAddress specified for the email channel for the application.</p>
    pub fn set_from_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.from_address = input;
        self
    }
    /// <p>The verified email address to send the email message from. The default address is the FromAddress specified for the email channel for the application.</p>
    pub fn get_from_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.from_address
    }
    /// Consumes the builder and constructs a [`JourneyEmailMessage`](crate::types::JourneyEmailMessage).
    pub fn build(self) -> crate::types::JourneyEmailMessage {
        crate::types::JourneyEmailMessage {
            from_address: self.from_address,
        }
    }
}