#[non_exhaustive]pub struct DefaultPushNotificationMessageBuilder { /* private fields */ }Expand description
A builder for DefaultPushNotificationMessage.
Implementations§
source§impl DefaultPushNotificationMessageBuilder
impl DefaultPushNotificationMessageBuilder
sourcepub fn action(self, input: Action) -> Self
pub fn action(self, input: Action) -> Self
The default action to occur if a recipient taps the push notification. Valid values are:
OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.
DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
sourcepub fn set_action(self, input: Option<Action>) -> Self
pub fn set_action(self, input: Option<Action>) -> Self
The default action to occur if a recipient taps the push notification. Valid values are:
OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.
DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
sourcepub fn get_action(&self) -> &Option<Action>
pub fn get_action(&self) -> &Option<Action>
The default action to occur if a recipient taps the push notification. Valid values are:
OPEN_APP - Your app opens or it becomes the foreground app if it was sent to the background. This is the default action.
DEEP_LINK - Your app opens and displays a designated user interface in the app. This setting uses the deep-linking features of the iOS and Android platforms.
URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you specify.
sourcepub fn body(self, input: impl Into<String>) -> Self
pub fn body(self, input: impl Into<String>) -> Self
The default body of the notification message.
sourcepub fn set_body(self, input: Option<String>) -> Self
pub fn set_body(self, input: Option<String>) -> Self
The default body of the notification message.
sourcepub fn data(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn data(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to data.
To override the contents of this collection use set_data.
The JSON data payload to use for the default push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.
sourcepub fn set_data(self, input: Option<HashMap<String, String>>) -> Self
pub fn set_data(self, input: Option<HashMap<String, String>>) -> Self
The JSON data payload to use for the default push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.
sourcepub fn get_data(&self) -> &Option<HashMap<String, String>>
pub fn get_data(&self) -> &Option<HashMap<String, String>>
The JSON data payload to use for the default push notification, if the notification is a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.
sourcepub fn silent_push(self, input: bool) -> Self
pub fn silent_push(self, input: bool) -> Self
Specifies whether the default notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or delivering messages to an in-app notification center.
sourcepub fn set_silent_push(self, input: Option<bool>) -> Self
pub fn set_silent_push(self, input: Option<bool>) -> Self
Specifies whether the default notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or delivering messages to an in-app notification center.
sourcepub fn get_silent_push(&self) -> &Option<bool>
pub fn get_silent_push(&self) -> &Option<bool>
Specifies whether the default notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration or delivering messages to an in-app notification center.
sourcepub fn substitutions(self, k: impl Into<String>, v: Vec<String>) -> Self
pub fn substitutions(self, k: impl Into<String>, v: Vec<String>) -> Self
Adds a key-value pair to substitutions.
To override the contents of this collection use set_substitutions.
The default message variables to use in the notification message. You can override the default variables with individual address variables.
sourcepub fn set_substitutions(
self,
input: Option<HashMap<String, Vec<String>>>
) -> Self
pub fn set_substitutions( self, input: Option<HashMap<String, Vec<String>>> ) -> Self
The default message variables to use in the notification message. You can override the default variables with individual address variables.
sourcepub fn get_substitutions(&self) -> &Option<HashMap<String, Vec<String>>>
pub fn get_substitutions(&self) -> &Option<HashMap<String, Vec<String>>>
The default message variables to use in the notification message. You can override the default variables with individual address variables.
sourcepub fn title(self, input: impl Into<String>) -> Self
pub fn title(self, input: impl Into<String>) -> Self
The default title to display above the notification message on a recipient's device.
sourcepub fn set_title(self, input: Option<String>) -> Self
pub fn set_title(self, input: Option<String>) -> Self
The default title to display above the notification message on a recipient's device.
sourcepub fn get_title(&self) -> &Option<String>
pub fn get_title(&self) -> &Option<String>
The default title to display above the notification message on a recipient's device.
sourcepub fn url(self, input: impl Into<String>) -> Self
pub fn url(self, input: impl Into<String>) -> Self
The default URL to open in a recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.
sourcepub fn set_url(self, input: Option<String>) -> Self
pub fn set_url(self, input: Option<String>) -> Self
The default URL to open in a recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.
sourcepub fn get_url(&self) -> &Option<String>
pub fn get_url(&self) -> &Option<String>
The default URL to open in a recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.
sourcepub fn build(self) -> DefaultPushNotificationMessage
pub fn build(self) -> DefaultPushNotificationMessage
Consumes the builder and constructs a DefaultPushNotificationMessage.
Trait Implementations§
source§impl Clone for DefaultPushNotificationMessageBuilder
impl Clone for DefaultPushNotificationMessageBuilder
source§fn clone(&self) -> DefaultPushNotificationMessageBuilder
fn clone(&self) -> DefaultPushNotificationMessageBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for DefaultPushNotificationMessageBuilder
impl Default for DefaultPushNotificationMessageBuilder
source§fn default() -> DefaultPushNotificationMessageBuilder
fn default() -> DefaultPushNotificationMessageBuilder
source§impl PartialEq for DefaultPushNotificationMessageBuilder
impl PartialEq for DefaultPushNotificationMessageBuilder
source§fn eq(&self, other: &DefaultPushNotificationMessageBuilder) -> bool
fn eq(&self, other: &DefaultPushNotificationMessageBuilder) -> bool
self and other values to be equal, and is used
by ==.