/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.pinpoint.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Specifies the content and settings for a push notification that's sent to recipients of a campaign. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Message implements Serializable, Cloneable, StructuredPojo { /** *

* The action to occur if a recipient taps the push notification. Valid values are: *

* */ private String action; /** *

* The body of the notification message. The maximum number of characters is 200. *

*/ private String body; /** *

* The URL of the image to display as the push-notification icon, such as the icon for the app. *

*/ private String imageIconUrl; /** *

* The URL of the image to display as the small, push-notification icon, such as a small version of the icon for the * app. *

*/ private String imageSmallIconUrl; /** *

* The URL of an image to display in the push notification. *

*/ private String imageUrl; /** *

* The JSON payload to use for a silent push notification. *

*/ private String jsonBody; /** *

* The URL of the image or video to display in the push notification. *

*/ private String mediaUrl; /** *

* The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value * overrides all other content for the message. *

*/ private String rawContent; /** *

* Specifies whether the 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, displaying messages in an in-app message center, or supporting phone home functionality. *

*/ private Boolean silentPush; /** *

* The number of seconds that the push-notification service should keep the message, if the service is unable to * deliver the notification the first time. This value is converted to an expiration value when it's sent to a * push-notification service. If this value is 0, the service treats the notification as if it expires immediately * and the service doesn't store or try to deliver the notification again. *

*

* This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service. *

*/ private Integer timeToLive; /** *

* The title to display above the notification message on a recipient's device. *

*/ private String title; /** *

* The 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. *

*/ private String url; /** *

* The action to occur if a recipient taps the push notification. Valid values are: *

* * * @param action * The action to occur if a recipient taps the push notification. Valid values are:

*