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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents a request to create an email template. For more information, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/send-personalized-email-api.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateTemplateInput {
/// <p>The content of the email, composed of a subject line and either an HTML part or a text-only part.</p>
pub template: ::std::option::Option<crate::types::Template>,
}
impl CreateTemplateInput {
/// <p>The content of the email, composed of a subject line and either an HTML part or a text-only part.</p>
pub fn template(&self) -> ::std::option::Option<&crate::types::Template> {
self.template.as_ref()
}
}
impl CreateTemplateInput {
/// Creates a new builder-style object to manufacture [`CreateTemplateInput`](crate::operation::create_template::CreateTemplateInput).
pub fn builder() -> crate::operation::create_template::builders::CreateTemplateInputBuilder {
crate::operation::create_template::builders::CreateTemplateInputBuilder::default()
}
}
/// A builder for [`CreateTemplateInput`](crate::operation::create_template::CreateTemplateInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateTemplateInputBuilder {
pub(crate) template: ::std::option::Option<crate::types::Template>,
}
impl CreateTemplateInputBuilder {
/// <p>The content of the email, composed of a subject line and either an HTML part or a text-only part.</p>
/// This field is required.
pub fn template(mut self, input: crate::types::Template) -> Self {
self.template = ::std::option::Option::Some(input);
self
}
/// <p>The content of the email, composed of a subject line and either an HTML part or a text-only part.</p>
pub fn set_template(mut self, input: ::std::option::Option<crate::types::Template>) -> Self {
self.template = input;
self
}
/// <p>The content of the email, composed of a subject line and either an HTML part or a text-only part.</p>
pub fn get_template(&self) -> &::std::option::Option<crate::types::Template> {
&self.template
}
/// Consumes the builder and constructs a [`CreateTemplateInput`](crate::operation::create_template::CreateTemplateInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_template::CreateTemplateInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_template::CreateTemplateInput { template: self.template })
}
}