aws-sdk-pinpoint 1.85.0

AWS SDK for Amazon Pinpoint
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListTemplatesOutput {
    /// <p>Provides information about all the message templates that are associated with your Amazon Pinpoint account.</p>
    pub templates_response: ::std::option::Option<crate::types::TemplatesResponse>,
    _request_id: Option<String>,
}
impl ListTemplatesOutput {
    /// <p>Provides information about all the message templates that are associated with your Amazon Pinpoint account.</p>
    pub fn templates_response(&self) -> ::std::option::Option<&crate::types::TemplatesResponse> {
        self.templates_response.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for ListTemplatesOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListTemplatesOutput {
    /// Creates a new builder-style object to manufacture [`ListTemplatesOutput`](crate::operation::list_templates::ListTemplatesOutput).
    pub fn builder() -> crate::operation::list_templates::builders::ListTemplatesOutputBuilder {
        crate::operation::list_templates::builders::ListTemplatesOutputBuilder::default()
    }
}

/// A builder for [`ListTemplatesOutput`](crate::operation::list_templates::ListTemplatesOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListTemplatesOutputBuilder {
    pub(crate) templates_response: ::std::option::Option<crate::types::TemplatesResponse>,
    _request_id: Option<String>,
}
impl ListTemplatesOutputBuilder {
    /// <p>Provides information about all the message templates that are associated with your Amazon Pinpoint account.</p>
    /// This field is required.
    pub fn templates_response(mut self, input: crate::types::TemplatesResponse) -> Self {
        self.templates_response = ::std::option::Option::Some(input);
        self
    }
    /// <p>Provides information about all the message templates that are associated with your Amazon Pinpoint account.</p>
    pub fn set_templates_response(mut self, input: ::std::option::Option<crate::types::TemplatesResponse>) -> Self {
        self.templates_response = input;
        self
    }
    /// <p>Provides information about all the message templates that are associated with your Amazon Pinpoint account.</p>
    pub fn get_templates_response(&self) -> &::std::option::Option<crate::types::TemplatesResponse> {
        &self.templates_response
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`ListTemplatesOutput`](crate::operation::list_templates::ListTemplatesOutput).
    pub fn build(self) -> crate::operation::list_templates::ListTemplatesOutput {
        crate::operation::list_templates::ListTemplatesOutput {
            templates_response: self.templates_response,
            _request_id: self._request_id,
        }
    }
}