aws-sdk-pinpoint 1.94.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 SendMessagesInput {
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    pub application_id: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the configuration and other settings for a message.</p>
    pub message_request: ::std::option::Option<crate::types::MessageRequest>,
}
impl SendMessagesInput {
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    pub fn application_id(&self) -> ::std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>Specifies the configuration and other settings for a message.</p>
    pub fn message_request(&self) -> ::std::option::Option<&crate::types::MessageRequest> {
        self.message_request.as_ref()
    }
}
impl SendMessagesInput {
    /// Creates a new builder-style object to manufacture [`SendMessagesInput`](crate::operation::send_messages::SendMessagesInput).
    pub fn builder() -> crate::operation::send_messages::builders::SendMessagesInputBuilder {
        crate::operation::send_messages::builders::SendMessagesInputBuilder::default()
    }
}

/// A builder for [`SendMessagesInput`](crate::operation::send_messages::SendMessagesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SendMessagesInputBuilder {
    pub(crate) application_id: ::std::option::Option<::std::string::String>,
    pub(crate) message_request: ::std::option::Option<crate::types::MessageRequest>,
}
impl SendMessagesInputBuilder {
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    /// This field is required.
    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_id = input;
        self
    }
    /// <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_id
    }
    /// <p>Specifies the configuration and other settings for a message.</p>
    /// This field is required.
    pub fn message_request(mut self, input: crate::types::MessageRequest) -> Self {
        self.message_request = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the configuration and other settings for a message.</p>
    pub fn set_message_request(mut self, input: ::std::option::Option<crate::types::MessageRequest>) -> Self {
        self.message_request = input;
        self
    }
    /// <p>Specifies the configuration and other settings for a message.</p>
    pub fn get_message_request(&self) -> &::std::option::Option<crate::types::MessageRequest> {
        &self.message_request
    }
    /// Consumes the builder and constructs a [`SendMessagesInput`](crate::operation::send_messages::SendMessagesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::send_messages::SendMessagesInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::send_messages::SendMessagesInput {
            application_id: self.application_id,
            message_request: self.message_request,
        })
    }
}