aws_sdk_ses/operation/update_template/
_update_template_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateTemplateInput {
6    /// <p>The content of the email, composed of a subject line and either an HTML part or a text-only part.</p>
7    pub template: ::std::option::Option<crate::types::Template>,
8}
9impl UpdateTemplateInput {
10    /// <p>The content of the email, composed of a subject line and either an HTML part or a text-only part.</p>
11    pub fn template(&self) -> ::std::option::Option<&crate::types::Template> {
12        self.template.as_ref()
13    }
14}
15impl UpdateTemplateInput {
16    /// Creates a new builder-style object to manufacture [`UpdateTemplateInput`](crate::operation::update_template::UpdateTemplateInput).
17    pub fn builder() -> crate::operation::update_template::builders::UpdateTemplateInputBuilder {
18        crate::operation::update_template::builders::UpdateTemplateInputBuilder::default()
19    }
20}
21
22/// A builder for [`UpdateTemplateInput`](crate::operation::update_template::UpdateTemplateInput).
23#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
24#[non_exhaustive]
25pub struct UpdateTemplateInputBuilder {
26    pub(crate) template: ::std::option::Option<crate::types::Template>,
27}
28impl UpdateTemplateInputBuilder {
29    /// <p>The content of the email, composed of a subject line and either an HTML part or a text-only part.</p>
30    /// This field is required.
31    pub fn template(mut self, input: crate::types::Template) -> Self {
32        self.template = ::std::option::Option::Some(input);
33        self
34    }
35    /// <p>The content of the email, composed of a subject line and either an HTML part or a text-only part.</p>
36    pub fn set_template(mut self, input: ::std::option::Option<crate::types::Template>) -> Self {
37        self.template = input;
38        self
39    }
40    /// <p>The content of the email, composed of a subject line and either an HTML part or a text-only part.</p>
41    pub fn get_template(&self) -> &::std::option::Option<crate::types::Template> {
42        &self.template
43    }
44    /// Consumes the builder and constructs a [`UpdateTemplateInput`](crate::operation::update_template::UpdateTemplateInput).
45    pub fn build(
46        self,
47    ) -> ::std::result::Result<crate::operation::update_template::UpdateTemplateInput, ::aws_smithy_types::error::operation::BuildError> {
48        ::std::result::Result::Ok(crate::operation::update_template::UpdateTemplateInput { template: self.template })
49    }
50}