/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Pinpoint { namespace Model { /** *

Specifies the default settings and content for a message template that can be * used in messages that are sent through a push notification * channel.

See Also:

AWS * API Reference

*/ class DefaultPushNotificationTemplate { public: AWS_PINPOINT_API DefaultPushNotificationTemplate(); AWS_PINPOINT_API DefaultPushNotificationTemplate(Aws::Utils::Json::JsonView jsonValue); AWS_PINPOINT_API DefaultPushNotificationTemplate& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The action to occur if a recipient taps a push notification that's based on * the message template. 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.

*/ inline const Action& GetAction() const{ return m_action; } /** *

The action to occur if a recipient taps a push notification that's based on * the message template. 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.

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

The action to occur if a recipient taps a push notification that's based on * the message template. 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.

*/ inline void SetAction(const Action& value) { m_actionHasBeenSet = true; m_action = value; } /** *

The action to occur if a recipient taps a push notification that's based on * the message template. 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.

*/ inline void SetAction(Action&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

The action to occur if a recipient taps a push notification that's based on * the message template. 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.

*/ inline DefaultPushNotificationTemplate& WithAction(const Action& value) { SetAction(value); return *this;} /** *

The action to occur if a recipient taps a push notification that's based on * the message template. 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.

*/ inline DefaultPushNotificationTemplate& WithAction(Action&& value) { SetAction(std::move(value)); return *this;} /** *

The message body to use in push notifications that are based on the message * template.

*/ inline const Aws::String& GetBody() const{ return m_body; } /** *

The message body to use in push notifications that are based on the message * template.

*/ inline bool BodyHasBeenSet() const { return m_bodyHasBeenSet; } /** *

The message body to use in push notifications that are based on the message * template.

*/ inline void SetBody(const Aws::String& value) { m_bodyHasBeenSet = true; m_body = value; } /** *

The message body to use in push notifications that are based on the message * template.

*/ inline void SetBody(Aws::String&& value) { m_bodyHasBeenSet = true; m_body = std::move(value); } /** *

The message body to use in push notifications that are based on the message * template.

*/ inline void SetBody(const char* value) { m_bodyHasBeenSet = true; m_body.assign(value); } /** *

The message body to use in push notifications that are based on the message * template.

*/ inline DefaultPushNotificationTemplate& WithBody(const Aws::String& value) { SetBody(value); return *this;} /** *

The message body to use in push notifications that are based on the message * template.

*/ inline DefaultPushNotificationTemplate& WithBody(Aws::String&& value) { SetBody(std::move(value)); return *this;} /** *

The message body to use in push notifications that are based on the message * template.

*/ inline DefaultPushNotificationTemplate& WithBody(const char* value) { SetBody(value); return *this;} /** *

The sound to play when a recipient receives a push notification that's based * on the message template. You can use the default stream or specify the file name * of a sound resource that's bundled in your app. On an Android platform, the * sound file must reside in /res/raw/.

For an iOS platform, this value is * the key for the name of a sound file in your app's main bundle or the * Library/Sounds folder in your app's data container. If the sound file can't be * found or you specify default for the value, the system plays the default alert * sound.

*/ inline const Aws::String& GetSound() const{ return m_sound; } /** *

The sound to play when a recipient receives a push notification that's based * on the message template. You can use the default stream or specify the file name * of a sound resource that's bundled in your app. On an Android platform, the * sound file must reside in /res/raw/.

For an iOS platform, this value is * the key for the name of a sound file in your app's main bundle or the * Library/Sounds folder in your app's data container. If the sound file can't be * found or you specify default for the value, the system plays the default alert * sound.

*/ inline bool SoundHasBeenSet() const { return m_soundHasBeenSet; } /** *

The sound to play when a recipient receives a push notification that's based * on the message template. You can use the default stream or specify the file name * of a sound resource that's bundled in your app. On an Android platform, the * sound file must reside in /res/raw/.

For an iOS platform, this value is * the key for the name of a sound file in your app's main bundle or the * Library/Sounds folder in your app's data container. If the sound file can't be * found or you specify default for the value, the system plays the default alert * sound.

*/ inline void SetSound(const Aws::String& value) { m_soundHasBeenSet = true; m_sound = value; } /** *

The sound to play when a recipient receives a push notification that's based * on the message template. You can use the default stream or specify the file name * of a sound resource that's bundled in your app. On an Android platform, the * sound file must reside in /res/raw/.

For an iOS platform, this value is * the key for the name of a sound file in your app's main bundle or the * Library/Sounds folder in your app's data container. If the sound file can't be * found or you specify default for the value, the system plays the default alert * sound.

*/ inline void SetSound(Aws::String&& value) { m_soundHasBeenSet = true; m_sound = std::move(value); } /** *

The sound to play when a recipient receives a push notification that's based * on the message template. You can use the default stream or specify the file name * of a sound resource that's bundled in your app. On an Android platform, the * sound file must reside in /res/raw/.

For an iOS platform, this value is * the key for the name of a sound file in your app's main bundle or the * Library/Sounds folder in your app's data container. If the sound file can't be * found or you specify default for the value, the system plays the default alert * sound.

*/ inline void SetSound(const char* value) { m_soundHasBeenSet = true; m_sound.assign(value); } /** *

The sound to play when a recipient receives a push notification that's based * on the message template. You can use the default stream or specify the file name * of a sound resource that's bundled in your app. On an Android platform, the * sound file must reside in /res/raw/.

For an iOS platform, this value is * the key for the name of a sound file in your app's main bundle or the * Library/Sounds folder in your app's data container. If the sound file can't be * found or you specify default for the value, the system plays the default alert * sound.

*/ inline DefaultPushNotificationTemplate& WithSound(const Aws::String& value) { SetSound(value); return *this;} /** *

The sound to play when a recipient receives a push notification that's based * on the message template. You can use the default stream or specify the file name * of a sound resource that's bundled in your app. On an Android platform, the * sound file must reside in /res/raw/.

For an iOS platform, this value is * the key for the name of a sound file in your app's main bundle or the * Library/Sounds folder in your app's data container. If the sound file can't be * found or you specify default for the value, the system plays the default alert * sound.

*/ inline DefaultPushNotificationTemplate& WithSound(Aws::String&& value) { SetSound(std::move(value)); return *this;} /** *

The sound to play when a recipient receives a push notification that's based * on the message template. You can use the default stream or specify the file name * of a sound resource that's bundled in your app. On an Android platform, the * sound file must reside in /res/raw/.

For an iOS platform, this value is * the key for the name of a sound file in your app's main bundle or the * Library/Sounds folder in your app's data container. If the sound file can't be * found or you specify default for the value, the system plays the default alert * sound.

*/ inline DefaultPushNotificationTemplate& WithSound(const char* value) { SetSound(value); return *this;} /** *

The title to use in push notifications that are based on the message * template. This title appears above the notification message on a recipient's * device.

*/ inline const Aws::String& GetTitle() const{ return m_title; } /** *

The title to use in push notifications that are based on the message * template. This title appears above the notification message on a recipient's * device.

*/ inline bool TitleHasBeenSet() const { return m_titleHasBeenSet; } /** *

The title to use in push notifications that are based on the message * template. This title appears above the notification message on a recipient's * device.

*/ inline void SetTitle(const Aws::String& value) { m_titleHasBeenSet = true; m_title = value; } /** *

The title to use in push notifications that are based on the message * template. This title appears above the notification message on a recipient's * device.

*/ inline void SetTitle(Aws::String&& value) { m_titleHasBeenSet = true; m_title = std::move(value); } /** *

The title to use in push notifications that are based on the message * template. This title appears above the notification message on a recipient's * device.

*/ inline void SetTitle(const char* value) { m_titleHasBeenSet = true; m_title.assign(value); } /** *

The title to use in push notifications that are based on the message * template. This title appears above the notification message on a recipient's * device.

*/ inline DefaultPushNotificationTemplate& WithTitle(const Aws::String& value) { SetTitle(value); return *this;} /** *

The title to use in push notifications that are based on the message * template. This title appears above the notification message on a recipient's * device.

*/ inline DefaultPushNotificationTemplate& WithTitle(Aws::String&& value) { SetTitle(std::move(value)); return *this;} /** *

The title to use in push notifications that are based on the message * template. This title appears above the notification message on a recipient's * device.

*/ inline DefaultPushNotificationTemplate& WithTitle(const char* value) { SetTitle(value); return *this;} /** *

The URL to open in a recipient's default mobile browser, if a recipient taps * a push notification that's based on the message template and the value of the * Action property is URL.

*/ inline const Aws::String& GetUrl() const{ return m_url; } /** *

The URL to open in a recipient's default mobile browser, if a recipient taps * a push notification that's based on the message template and the value of the * Action property is URL.

*/ inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; } /** *

The URL to open in a recipient's default mobile browser, if a recipient taps * a push notification that's based on the message template and the value of the * Action property is URL.

*/ inline void SetUrl(const Aws::String& value) { m_urlHasBeenSet = true; m_url = value; } /** *

The URL to open in a recipient's default mobile browser, if a recipient taps * a push notification that's based on the message template and the value of the * Action property is URL.

*/ inline void SetUrl(Aws::String&& value) { m_urlHasBeenSet = true; m_url = std::move(value); } /** *

The URL to open in a recipient's default mobile browser, if a recipient taps * a push notification that's based on the message template and the value of the * Action property is URL.

*/ inline void SetUrl(const char* value) { m_urlHasBeenSet = true; m_url.assign(value); } /** *

The URL to open in a recipient's default mobile browser, if a recipient taps * a push notification that's based on the message template and the value of the * Action property is URL.

*/ inline DefaultPushNotificationTemplate& WithUrl(const Aws::String& value) { SetUrl(value); return *this;} /** *

The URL to open in a recipient's default mobile browser, if a recipient taps * a push notification that's based on the message template and the value of the * Action property is URL.

*/ inline DefaultPushNotificationTemplate& WithUrl(Aws::String&& value) { SetUrl(std::move(value)); return *this;} /** *

The URL to open in a recipient's default mobile browser, if a recipient taps * a push notification that's based on the message template and the value of the * Action property is URL.

*/ inline DefaultPushNotificationTemplate& WithUrl(const char* value) { SetUrl(value); return *this;} private: Action m_action; bool m_actionHasBeenSet = false; Aws::String m_body; bool m_bodyHasBeenSet = false; Aws::String m_sound; bool m_soundHasBeenSet = false; Aws::String m_title; bool m_titleHasBeenSet = false; Aws::String m_url; bool m_urlHasBeenSet = false; }; } // namespace Model } // namespace Pinpoint } // namespace Aws