/* * 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 settings for a one-time message that's sent directly to an endpoint through the APNs (Apple Push * Notification service) channel. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class APNSMessage implements Serializable, Cloneable, StructuredPojo { /** ** The type of push notification to send. Valid values are: *
** alert - For a standard notification that's displayed on recipients' devices and prompts a recipient to interact * with the notification. *
** background - For a silent notification that delivers content in the background and isn't displayed on recipients' * devices. *
** complication - For a notification that contains update information for an app’s complication timeline. *
** fileprovider - For a notification that signals changes to a File Provider extension. *
** mdm - For a notification that tells managed devices to contact the MDM server. *
** voip - For a notification that provides information about an incoming VoIP call. *
** Amazon Pinpoint specifies this value in the apns-push-type request header when it sends the notification message * to APNs. If you don't specify a value for this property, Amazon Pinpoint sets the value to alert or background * automatically, based on the value that you specify for the SilentPush or RawContent property of the message. *
** For more information about the apns-push-type request header, see Sending Notification Requests to APNs on the Apple Developer website. *
*/ private String aPNSPushType; /** ** The action to occur if the 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 platform. *
** URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you * specify. *
** The key that indicates whether and how to modify the badge of your app's icon when the recipient receives the * push notification. If this key isn't included in the dictionary, the badge doesn't change. To remove the badge, * set this value to 0. *
*/ private Integer badge; /** ** The body of the notification message. *
*/ private String body; /** ** The key that indicates the notification type for the push notification. This key is a value that's defined by the * identifier property of one of your app's registered categories. *
*/ private String category; /** ** An arbitrary identifier that, if assigned to multiple messages, APNs uses to coalesce the messages into a single * push notification instead of delivering each message individually. This value can't exceed 64 bytes. *
** Amazon Pinpoint specifies this value in the apns-collapse-id request header when it sends the notification * message to APNs. *
*/ private String collapseId; /** ** The JSON payload to use for a silent push notification. This payload is added to the data.pinpoint.jsonBody * object of the notification. *
*/ private java.util.Map* The URL of an image or video to display in the push notification. *
*/ private String mediaUrl; /** ** The authentication method that you want Amazon Pinpoint to use when authenticating with APNs, CERTIFICATE or * TOKEN. *
*/ private String preferredAuthenticationMethod; /** ** para>5 - Low priority, the notification might be delayed, delivered as part of a group, or throttled. *
* /listitem>* 10 - High priority, the notification is sent immediately. This is the default value. A high priority notification * should trigger an alert, play a sound, or badge your app's icon on the recipient's device. *
** Amazon Pinpoint specifies this value in the apns-priority request header when it sends the notification message * to APNs. *
** The equivalent values for Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), are normal, for * 5, and high, for 10. If you specify an FCM value for this property, Amazon Pinpoint accepts and converts the * value to the corresponding APNs value. *
*/ private String priority; /** ** 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. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. The value of the content-available key has to be an integer, and can only be 0 or 1. If * you're sending a standard notification, set the value of content-available to 0. If you're sending a silent * (background) notification, set the value of content-available to 1. Additionally, silent notification payloads * can't include the alert, badge, or sound keys. For more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** Specifies whether the notification is a silent push notification. A silent (or background) push notification * isn't displayed on recipients' devices. You can use silent push notifications to make small updates to your app, * or to display messages in an in-app message center. *
** Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header when it * sends the notification message to APNs. If you specify a value of true for this property, Amazon Pinpoint sets * the value for the apns-push-type header field to background. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. For silent (background) notifications, set the value of content-available to 1. * Additionally, the message payload for a silent notification can't include the alert, badge, or sound keys. For * more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** Apple has indicated that they will throttle "excessive" background notifications based on current traffic * volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 silent push * notifications to each recipient per hour. *
** The key for the sound to play when the recipient receives the push notification. The value for this key is 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. *
*/ private String sound; /** ** The default message variables to use in the notification message. You can override these default variables with * individual address variables. *
*/ private java.util.Map* The key that represents your app-specific identifier for grouping notifications. If you provide a Notification * Content app extension, you can use this value to group your notifications together. *
*/ private String threadId; /** ** The amount of time, in seconds, that APNs should store and attempt to deliver the push notification, if the * service is unable to deliver the notification the first time. If this value is 0, APNs treats the notification as * if it expires immediately and the service doesn't store or try to deliver the notification again. *
** Amazon Pinpoint specifies this value in the apns-expiration request header when it sends the notification message * to APNs. *
*/ private Integer timeToLive; /** ** The title to display above the notification message on the recipient's device. *
*/ private String title; /** ** The URL to open in the 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 type of push notification to send. Valid values are: *
** alert - For a standard notification that's displayed on recipients' devices and prompts a recipient to interact * with the notification. *
** background - For a silent notification that delivers content in the background and isn't displayed on recipients' * devices. *
** complication - For a notification that contains update information for an app’s complication timeline. *
** fileprovider - For a notification that signals changes to a File Provider extension. *
** mdm - For a notification that tells managed devices to contact the MDM server. *
** voip - For a notification that provides information about an incoming VoIP call. *
** Amazon Pinpoint specifies this value in the apns-push-type request header when it sends the notification message * to APNs. If you don't specify a value for this property, Amazon Pinpoint sets the value to alert or background * automatically, based on the value that you specify for the SilentPush or RawContent property of the message. *
** For more information about the apns-push-type request header, see Sending Notification Requests to APNs on the Apple Developer website. *
* * @param aPNSPushType * The type of push notification to send. Valid values are: ** alert - For a standard notification that's displayed on recipients' devices and prompts a recipient to * interact with the notification. *
** background - For a silent notification that delivers content in the background and isn't displayed on * recipients' devices. *
** complication - For a notification that contains update information for an app’s complication timeline. *
** fileprovider - For a notification that signals changes to a File Provider extension. *
** mdm - For a notification that tells managed devices to contact the MDM server. *
** voip - For a notification that provides information about an incoming VoIP call. *
** Amazon Pinpoint specifies this value in the apns-push-type request header when it sends the notification * message to APNs. If you don't specify a value for this property, Amazon Pinpoint sets the value to alert * or background automatically, based on the value that you specify for the SilentPush or RawContent property * of the message. *
** For more information about the apns-push-type request header, see Sending Notification Requests to APNs on the Apple Developer website. */ public void setAPNSPushType(String aPNSPushType) { this.aPNSPushType = aPNSPushType; } /** *
* The type of push notification to send. Valid values are: *
** alert - For a standard notification that's displayed on recipients' devices and prompts a recipient to interact * with the notification. *
** background - For a silent notification that delivers content in the background and isn't displayed on recipients' * devices. *
** complication - For a notification that contains update information for an app’s complication timeline. *
** fileprovider - For a notification that signals changes to a File Provider extension. *
** mdm - For a notification that tells managed devices to contact the MDM server. *
** voip - For a notification that provides information about an incoming VoIP call. *
** Amazon Pinpoint specifies this value in the apns-push-type request header when it sends the notification message * to APNs. If you don't specify a value for this property, Amazon Pinpoint sets the value to alert or background * automatically, based on the value that you specify for the SilentPush or RawContent property of the message. *
** For more information about the apns-push-type request header, see Sending Notification Requests to APNs on the Apple Developer website. *
* * @return The type of push notification to send. Valid values are: ** alert - For a standard notification that's displayed on recipients' devices and prompts a recipient to * interact with the notification. *
** background - For a silent notification that delivers content in the background and isn't displayed on * recipients' devices. *
** complication - For a notification that contains update information for an app’s complication timeline. *
** fileprovider - For a notification that signals changes to a File Provider extension. *
** mdm - For a notification that tells managed devices to contact the MDM server. *
** voip - For a notification that provides information about an incoming VoIP call. *
** Amazon Pinpoint specifies this value in the apns-push-type request header when it sends the notification * message to APNs. If you don't specify a value for this property, Amazon Pinpoint sets the value to alert * or background automatically, based on the value that you specify for the SilentPush or RawContent * property of the message. *
** For more information about the apns-push-type request header, see Sending Notification Requests to APNs on the Apple Developer website. */ public String getAPNSPushType() { return this.aPNSPushType; } /** *
* The type of push notification to send. Valid values are: *
** alert - For a standard notification that's displayed on recipients' devices and prompts a recipient to interact * with the notification. *
** background - For a silent notification that delivers content in the background and isn't displayed on recipients' * devices. *
** complication - For a notification that contains update information for an app’s complication timeline. *
** fileprovider - For a notification that signals changes to a File Provider extension. *
** mdm - For a notification that tells managed devices to contact the MDM server. *
** voip - For a notification that provides information about an incoming VoIP call. *
** Amazon Pinpoint specifies this value in the apns-push-type request header when it sends the notification message * to APNs. If you don't specify a value for this property, Amazon Pinpoint sets the value to alert or background * automatically, based on the value that you specify for the SilentPush or RawContent property of the message. *
** For more information about the apns-push-type request header, see Sending Notification Requests to APNs on the Apple Developer website. *
* * @param aPNSPushType * The type of push notification to send. Valid values are: ** alert - For a standard notification that's displayed on recipients' devices and prompts a recipient to * interact with the notification. *
** background - For a silent notification that delivers content in the background and isn't displayed on * recipients' devices. *
** complication - For a notification that contains update information for an app’s complication timeline. *
** fileprovider - For a notification that signals changes to a File Provider extension. *
** mdm - For a notification that tells managed devices to contact the MDM server. *
** voip - For a notification that provides information about an incoming VoIP call. *
** Amazon Pinpoint specifies this value in the apns-push-type request header when it sends the notification * message to APNs. If you don't specify a value for this property, Amazon Pinpoint sets the value to alert * or background automatically, based on the value that you specify for the SilentPush or RawContent property * of the message. *
** For more information about the apns-push-type request header, see Sending Notification Requests to APNs on the Apple Developer website. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withAPNSPushType(String aPNSPushType) { setAPNSPushType(aPNSPushType); return this; } /** *
* The action to occur if the 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 platform. *
** URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you * specify. *
** 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 platform. *
** URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you * specify. *
** The action to occur if the 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 platform. *
** URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you * specify. *
** 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 platform. *
** URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you * specify. *
** The action to occur if the 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 platform. *
** URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you * specify. *
** 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 platform. *
** URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you * specify. *
** The action to occur if the 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 platform. *
** URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you * specify. *
** 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 platform. *
** URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you * specify. *
** The action to occur if the 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 platform. *
** URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you * specify. *
** 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 platform. *
** URL - The default mobile browser on the recipient's device opens and loads the web page at a URL that you * specify. *
** The key that indicates whether and how to modify the badge of your app's icon when the recipient receives the * push notification. If this key isn't included in the dictionary, the badge doesn't change. To remove the badge, * set this value to 0. *
* * @param badge * The key that indicates whether and how to modify the badge of your app's icon when the recipient receives * the push notification. If this key isn't included in the dictionary, the badge doesn't change. To remove * the badge, set this value to 0. */ public void setBadge(Integer badge) { this.badge = badge; } /** ** The key that indicates whether and how to modify the badge of your app's icon when the recipient receives the * push notification. If this key isn't included in the dictionary, the badge doesn't change. To remove the badge, * set this value to 0. *
* * @return The key that indicates whether and how to modify the badge of your app's icon when the recipient receives * the push notification. If this key isn't included in the dictionary, the badge doesn't change. To remove * the badge, set this value to 0. */ public Integer getBadge() { return this.badge; } /** ** The key that indicates whether and how to modify the badge of your app's icon when the recipient receives the * push notification. If this key isn't included in the dictionary, the badge doesn't change. To remove the badge, * set this value to 0. *
* * @param badge * The key that indicates whether and how to modify the badge of your app's icon when the recipient receives * the push notification. If this key isn't included in the dictionary, the badge doesn't change. To remove * the badge, set this value to 0. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withBadge(Integer badge) { setBadge(badge); return this; } /** ** The body of the notification message. *
* * @param body * The body of the notification message. */ public void setBody(String body) { this.body = body; } /** ** The body of the notification message. *
* * @return The body of the notification message. */ public String getBody() { return this.body; } /** ** The body of the notification message. *
* * @param body * The body of the notification message. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withBody(String body) { setBody(body); return this; } /** ** The key that indicates the notification type for the push notification. This key is a value that's defined by the * identifier property of one of your app's registered categories. *
* * @param category * The key that indicates the notification type for the push notification. This key is a value that's defined * by the identifier property of one of your app's registered categories. */ public void setCategory(String category) { this.category = category; } /** ** The key that indicates the notification type for the push notification. This key is a value that's defined by the * identifier property of one of your app's registered categories. *
* * @return The key that indicates the notification type for the push notification. This key is a value that's * defined by the identifier property of one of your app's registered categories. */ public String getCategory() { return this.category; } /** ** The key that indicates the notification type for the push notification. This key is a value that's defined by the * identifier property of one of your app's registered categories. *
* * @param category * The key that indicates the notification type for the push notification. This key is a value that's defined * by the identifier property of one of your app's registered categories. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withCategory(String category) { setCategory(category); return this; } /** ** An arbitrary identifier that, if assigned to multiple messages, APNs uses to coalesce the messages into a single * push notification instead of delivering each message individually. This value can't exceed 64 bytes. *
** Amazon Pinpoint specifies this value in the apns-collapse-id request header when it sends the notification * message to APNs. *
* * @param collapseId * An arbitrary identifier that, if assigned to multiple messages, APNs uses to coalesce the messages into a * single push notification instead of delivering each message individually. This value can't exceed 64 * bytes. ** Amazon Pinpoint specifies this value in the apns-collapse-id request header when it sends the notification * message to APNs. */ public void setCollapseId(String collapseId) { this.collapseId = collapseId; } /** *
* An arbitrary identifier that, if assigned to multiple messages, APNs uses to coalesce the messages into a single * push notification instead of delivering each message individually. This value can't exceed 64 bytes. *
** Amazon Pinpoint specifies this value in the apns-collapse-id request header when it sends the notification * message to APNs. *
* * @return An arbitrary identifier that, if assigned to multiple messages, APNs uses to coalesce the messages into a * single push notification instead of delivering each message individually. This value can't exceed 64 * bytes. ** Amazon Pinpoint specifies this value in the apns-collapse-id request header when it sends the * notification message to APNs. */ public String getCollapseId() { return this.collapseId; } /** *
* An arbitrary identifier that, if assigned to multiple messages, APNs uses to coalesce the messages into a single * push notification instead of delivering each message individually. This value can't exceed 64 bytes. *
** Amazon Pinpoint specifies this value in the apns-collapse-id request header when it sends the notification * message to APNs. *
* * @param collapseId * An arbitrary identifier that, if assigned to multiple messages, APNs uses to coalesce the messages into a * single push notification instead of delivering each message individually. This value can't exceed 64 * bytes. ** Amazon Pinpoint specifies this value in the apns-collapse-id request header when it sends the notification * message to APNs. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withCollapseId(String collapseId) { setCollapseId(collapseId); return this; } /** *
* The JSON payload to use for a silent push notification. This payload is added to the data.pinpoint.jsonBody * object of the notification. *
* * @return The JSON payload to use for a silent push notification. This payload is added to the * data.pinpoint.jsonBody object of the notification. */ public java.util.Map* The JSON payload to use for a silent push notification. This payload is added to the data.pinpoint.jsonBody * object of the notification. *
* * @param data * The JSON payload to use for a silent push notification. This payload is added to the * data.pinpoint.jsonBody object of the notification. */ public void setData(java.util.Map* The JSON payload to use for a silent push notification. This payload is added to the data.pinpoint.jsonBody * object of the notification. *
* * @param data * The JSON payload to use for a silent push notification. This payload is added to the * data.pinpoint.jsonBody object of the notification. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withData(java.util.Map* The URL of an image or video to display in the push notification. *
* * @param mediaUrl * The URL of an image or video to display in the push notification. */ public void setMediaUrl(String mediaUrl) { this.mediaUrl = mediaUrl; } /** ** The URL of an image or video to display in the push notification. *
* * @return The URL of an image or video to display in the push notification. */ public String getMediaUrl() { return this.mediaUrl; } /** ** The URL of an image or video to display in the push notification. *
* * @param mediaUrl * The URL of an image or video to display in the push notification. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withMediaUrl(String mediaUrl) { setMediaUrl(mediaUrl); return this; } /** ** The authentication method that you want Amazon Pinpoint to use when authenticating with APNs, CERTIFICATE or * TOKEN. *
* * @param preferredAuthenticationMethod * The authentication method that you want Amazon Pinpoint to use when authenticating with APNs, CERTIFICATE * or TOKEN. */ public void setPreferredAuthenticationMethod(String preferredAuthenticationMethod) { this.preferredAuthenticationMethod = preferredAuthenticationMethod; } /** ** The authentication method that you want Amazon Pinpoint to use when authenticating with APNs, CERTIFICATE or * TOKEN. *
* * @return The authentication method that you want Amazon Pinpoint to use when authenticating with APNs, CERTIFICATE * or TOKEN. */ public String getPreferredAuthenticationMethod() { return this.preferredAuthenticationMethod; } /** ** The authentication method that you want Amazon Pinpoint to use when authenticating with APNs, CERTIFICATE or * TOKEN. *
* * @param preferredAuthenticationMethod * The authentication method that you want Amazon Pinpoint to use when authenticating with APNs, CERTIFICATE * or TOKEN. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withPreferredAuthenticationMethod(String preferredAuthenticationMethod) { setPreferredAuthenticationMethod(preferredAuthenticationMethod); return this; } /** ** para>5 - Low priority, the notification might be delayed, delivered as part of a group, or throttled. *
* /listitem>* 10 - High priority, the notification is sent immediately. This is the default value. A high priority notification * should trigger an alert, play a sound, or badge your app's icon on the recipient's device. *
** Amazon Pinpoint specifies this value in the apns-priority request header when it sends the notification message * to APNs. *
** The equivalent values for Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), are normal, for * 5, and high, for 10. If you specify an FCM value for this property, Amazon Pinpoint accepts and converts the * value to the corresponding APNs value. *
* * @param priority * para>5 - Low priority, the notification might be delayed, delivered as part of a group, or * throttled./listitem>* 10 - High priority, the notification is sent immediately. This is the default value. A high priority * notification should trigger an alert, play a sound, or badge your app's icon on the recipient's device. *
** Amazon Pinpoint specifies this value in the apns-priority request header when it sends the notification * message to APNs. *
** The equivalent values for Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), are * normal, for 5, and high, for 10. If you specify an FCM value for this property, Amazon Pinpoint accepts * and converts the value to the corresponding APNs value. */ public void setPriority(String priority) { this.priority = priority; } /** *
* para>5 - Low priority, the notification might be delayed, delivered as part of a group, or throttled. *
* /listitem>* 10 - High priority, the notification is sent immediately. This is the default value. A high priority notification * should trigger an alert, play a sound, or badge your app's icon on the recipient's device. *
** Amazon Pinpoint specifies this value in the apns-priority request header when it sends the notification message * to APNs. *
** The equivalent values for Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), are normal, for * 5, and high, for 10. If you specify an FCM value for this property, Amazon Pinpoint accepts and converts the * value to the corresponding APNs value. *
* * @return para>5 - Low priority, the notification might be delayed, delivered as part of a group, or * throttled./listitem>* 10 - High priority, the notification is sent immediately. This is the default value. A high priority * notification should trigger an alert, play a sound, or badge your app's icon on the recipient's device. *
** Amazon Pinpoint specifies this value in the apns-priority request header when it sends the notification * message to APNs. *
** The equivalent values for Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), are * normal, for 5, and high, for 10. If you specify an FCM value for this property, Amazon Pinpoint accepts * and converts the value to the corresponding APNs value. */ public String getPriority() { return this.priority; } /** *
* para>5 - Low priority, the notification might be delayed, delivered as part of a group, or throttled. *
* /listitem>* 10 - High priority, the notification is sent immediately. This is the default value. A high priority notification * should trigger an alert, play a sound, or badge your app's icon on the recipient's device. *
** Amazon Pinpoint specifies this value in the apns-priority request header when it sends the notification message * to APNs. *
** The equivalent values for Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), are normal, for * 5, and high, for 10. If you specify an FCM value for this property, Amazon Pinpoint accepts and converts the * value to the corresponding APNs value. *
* * @param priority * para>5 - Low priority, the notification might be delayed, delivered as part of a group, or * throttled./listitem>* 10 - High priority, the notification is sent immediately. This is the default value. A high priority * notification should trigger an alert, play a sound, or badge your app's icon on the recipient's device. *
** Amazon Pinpoint specifies this value in the apns-priority request header when it sends the notification * message to APNs. *
** The equivalent values for Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), are * normal, for 5, and high, for 10. If you specify an FCM value for this property, Amazon Pinpoint accepts * and converts the value to the corresponding APNs value. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withPriority(String priority) { setPriority(priority); return this; } /** *
* 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. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. The value of the content-available key has to be an integer, and can only be 0 or 1. If * you're sending a standard notification, set the value of content-available to 0. If you're sending a silent * (background) notification, set the value of content-available to 1. Additionally, silent notification payloads * can't include the alert, badge, or sound keys. For more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. The value of the content-available key has to be an integer, and can only be 0 or * 1. If you're sending a standard notification, set the value of content-available to 0. If you're sending a * silent (background) notification, set the value of content-available to 1. Additionally, silent * notification payloads can't include the alert, badge, or sound keys. For more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
*/ public void setRawContent(String rawContent) { this.rawContent = rawContent; } /** ** 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. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. The value of the content-available key has to be an integer, and can only be 0 or 1. If * you're sending a standard notification, set the value of content-available to 0. If you're sending a silent * (background) notification, set the value of content-available to 1. Additionally, silent notification payloads * can't include the alert, badge, or sound keys. For more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. The value of the content-available key has to be an integer, and can only be 0 or * 1. If you're sending a standard notification, set the value of content-available to 0. If you're sending * a silent (background) notification, set the value of content-available to 1. Additionally, silent * notification payloads can't include the alert, badge, or sound keys. For more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
*/ public String getRawContent() { return this.rawContent; } /** ** 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. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. The value of the content-available key has to be an integer, and can only be 0 or 1. If * you're sending a standard notification, set the value of content-available to 0. If you're sending a silent * (background) notification, set the value of content-available to 1. Additionally, silent notification payloads * can't include the alert, badge, or sound keys. For more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. The value of the content-available key has to be an integer, and can only be 0 or * 1. If you're sending a standard notification, set the value of content-available to 0. If you're sending a * silent (background) notification, set the value of content-available to 1. Additionally, silent * notification payloads can't include the alert, badge, or sound keys. For more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
* @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withRawContent(String rawContent) { setRawContent(rawContent); return this; } /** ** Specifies whether the notification is a silent push notification. A silent (or background) push notification * isn't displayed on recipients' devices. You can use silent push notifications to make small updates to your app, * or to display messages in an in-app message center. *
** Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header when it * sends the notification message to APNs. If you specify a value of true for this property, Amazon Pinpoint sets * the value for the apns-push-type header field to background. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. For silent (background) notifications, set the value of content-available to 1. * Additionally, the message payload for a silent notification can't include the alert, badge, or sound keys. For * more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** Apple has indicated that they will throttle "excessive" background notifications based on current traffic * volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 silent push * notifications to each recipient per hour. *
** Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header * when it sends the notification message to APNs. If you specify a value of true for this property, Amazon * Pinpoint sets the value for the apns-push-type header field to background. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. For silent (background) notifications, set the value of content-available to 1. * Additionally, the message payload for a silent notification can't include the alert, badge, or sound keys. * For more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** Apple has indicated that they will throttle "excessive" background notifications based on current traffic * volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 * silent push notifications to each recipient per hour. *
*/ public void setSilentPush(Boolean silentPush) { this.silentPush = silentPush; } /** ** Specifies whether the notification is a silent push notification. A silent (or background) push notification * isn't displayed on recipients' devices. You can use silent push notifications to make small updates to your app, * or to display messages in an in-app message center. *
** Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header when it * sends the notification message to APNs. If you specify a value of true for this property, Amazon Pinpoint sets * the value for the apns-push-type header field to background. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. For silent (background) notifications, set the value of content-available to 1. * Additionally, the message payload for a silent notification can't include the alert, badge, or sound keys. For * more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** Apple has indicated that they will throttle "excessive" background notifications based on current traffic * volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 silent push * notifications to each recipient per hour. *
** Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header * when it sends the notification message to APNs. If you specify a value of true for this property, Amazon * Pinpoint sets the value for the apns-push-type header field to background. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. For silent (background) notifications, set the value of content-available to 1. * Additionally, the message payload for a silent notification can't include the alert, badge, or sound * keys. For more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** Apple has indicated that they will throttle "excessive" background notifications based on current traffic * volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 * silent push notifications to each recipient per hour. *
*/ public Boolean getSilentPush() { return this.silentPush; } /** ** Specifies whether the notification is a silent push notification. A silent (or background) push notification * isn't displayed on recipients' devices. You can use silent push notifications to make small updates to your app, * or to display messages in an in-app message center. *
** Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header when it * sends the notification message to APNs. If you specify a value of true for this property, Amazon Pinpoint sets * the value for the apns-push-type header field to background. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. For silent (background) notifications, set the value of content-available to 1. * Additionally, the message payload for a silent notification can't include the alert, badge, or sound keys. For * more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** Apple has indicated that they will throttle "excessive" background notifications based on current traffic * volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 silent push * notifications to each recipient per hour. *
** Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header * when it sends the notification message to APNs. If you specify a value of true for this property, Amazon * Pinpoint sets the value for the apns-push-type header field to background. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. For silent (background) notifications, set the value of content-available to 1. * Additionally, the message payload for a silent notification can't include the alert, badge, or sound keys. * For more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** Apple has indicated that they will throttle "excessive" background notifications based on current traffic * volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 * silent push notifications to each recipient per hour. *
* @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withSilentPush(Boolean silentPush) { setSilentPush(silentPush); return this; } /** ** Specifies whether the notification is a silent push notification. A silent (or background) push notification * isn't displayed on recipients' devices. You can use silent push notifications to make small updates to your app, * or to display messages in an in-app message center. *
** Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header when it * sends the notification message to APNs. If you specify a value of true for this property, Amazon Pinpoint sets * the value for the apns-push-type header field to background. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. For silent (background) notifications, set the value of content-available to 1. * Additionally, the message payload for a silent notification can't include the alert, badge, or sound keys. For * more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** Apple has indicated that they will throttle "excessive" background notifications based on current traffic * volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 silent push * notifications to each recipient per hour. *
** Amazon Pinpoint uses this property to determine the correct value for the apns-push-type request header * when it sends the notification message to APNs. If you specify a value of true for this property, Amazon * Pinpoint sets the value for the apns-push-type header field to background. *
** If you specify the raw content of an APNs push notification, the message payload has to include the * content-available key. For silent (background) notifications, set the value of content-available to 1. * Additionally, the message payload for a silent notification can't include the alert, badge, or sound * keys. For more information, see Generating a Remote Notification and Pushing Background Updates to Your App on the Apple Developer website. *
** Apple has indicated that they will throttle "excessive" background notifications based on current traffic * volumes. To prevent your notifications being throttled, Apple recommends that you send no more than 3 * silent push notifications to each recipient per hour. *
*/ public Boolean isSilentPush() { return this.silentPush; } /** ** The key for the sound to play when the recipient receives the push notification. The value for this key is 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. *
* * @param sound * The key for the sound to play when the recipient receives the push notification. The value for this key is * 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. */ public void setSound(String sound) { this.sound = sound; } /** ** The key for the sound to play when the recipient receives the push notification. The value for this key is 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. *
* * @return The key for the sound to play when the recipient receives the push notification. The value for this key * is 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. */ public String getSound() { return this.sound; } /** ** The key for the sound to play when the recipient receives the push notification. The value for this key is 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. *
* * @param sound * The key for the sound to play when the recipient receives the push notification. The value for this key is * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withSound(String sound) { setSound(sound); return this; } /** ** The default message variables to use in the notification message. You can override these default variables with * individual address variables. *
* * @return The default message variables to use in the notification message. You can override these default * variables with individual address variables. */ public java.util.Map* The default message variables to use in the notification message. You can override these default variables with * individual address variables. *
* * @param substitutions * The default message variables to use in the notification message. You can override these default variables * with individual address variables. */ public void setSubstitutions(java.util.Map* The default message variables to use in the notification message. You can override these default variables with * individual address variables. *
* * @param substitutions * The default message variables to use in the notification message. You can override these default variables * with individual address variables. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withSubstitutions(java.util.Map* The key that represents your app-specific identifier for grouping notifications. If you provide a Notification * Content app extension, you can use this value to group your notifications together. *
* * @param threadId * The key that represents your app-specific identifier for grouping notifications. If you provide a * Notification Content app extension, you can use this value to group your notifications together. */ public void setThreadId(String threadId) { this.threadId = threadId; } /** ** The key that represents your app-specific identifier for grouping notifications. If you provide a Notification * Content app extension, you can use this value to group your notifications together. *
* * @return The key that represents your app-specific identifier for grouping notifications. If you provide a * Notification Content app extension, you can use this value to group your notifications together. */ public String getThreadId() { return this.threadId; } /** ** The key that represents your app-specific identifier for grouping notifications. If you provide a Notification * Content app extension, you can use this value to group your notifications together. *
* * @param threadId * The key that represents your app-specific identifier for grouping notifications. If you provide a * Notification Content app extension, you can use this value to group your notifications together. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withThreadId(String threadId) { setThreadId(threadId); return this; } /** ** The amount of time, in seconds, that APNs should store and attempt to deliver the push notification, if the * service is unable to deliver the notification the first time. If this value is 0, APNs treats the notification as * if it expires immediately and the service doesn't store or try to deliver the notification again. *
** Amazon Pinpoint specifies this value in the apns-expiration request header when it sends the notification message * to APNs. *
* * @param timeToLive * The amount of time, in seconds, that APNs should store and attempt to deliver the push notification, if * the service is unable to deliver the notification the first time. If this value is 0, APNs treats the * notification as if it expires immediately and the service doesn't store or try to deliver the notification * again. ** Amazon Pinpoint specifies this value in the apns-expiration request header when it sends the notification * message to APNs. */ public void setTimeToLive(Integer timeToLive) { this.timeToLive = timeToLive; } /** *
* The amount of time, in seconds, that APNs should store and attempt to deliver the push notification, if the * service is unable to deliver the notification the first time. If this value is 0, APNs treats the notification as * if it expires immediately and the service doesn't store or try to deliver the notification again. *
** Amazon Pinpoint specifies this value in the apns-expiration request header when it sends the notification message * to APNs. *
* * @return The amount of time, in seconds, that APNs should store and attempt to deliver the push notification, if * the service is unable to deliver the notification the first time. If this value is 0, APNs treats the * notification as if it expires immediately and the service doesn't store or try to deliver the * notification again. ** Amazon Pinpoint specifies this value in the apns-expiration request header when it sends the notification * message to APNs. */ public Integer getTimeToLive() { return this.timeToLive; } /** *
* The amount of time, in seconds, that APNs should store and attempt to deliver the push notification, if the * service is unable to deliver the notification the first time. If this value is 0, APNs treats the notification as * if it expires immediately and the service doesn't store or try to deliver the notification again. *
** Amazon Pinpoint specifies this value in the apns-expiration request header when it sends the notification message * to APNs. *
* * @param timeToLive * The amount of time, in seconds, that APNs should store and attempt to deliver the push notification, if * the service is unable to deliver the notification the first time. If this value is 0, APNs treats the * notification as if it expires immediately and the service doesn't store or try to deliver the notification * again. ** Amazon Pinpoint specifies this value in the apns-expiration request header when it sends the notification * message to APNs. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withTimeToLive(Integer timeToLive) { setTimeToLive(timeToLive); return this; } /** *
* The title to display above the notification message on the recipient's device. *
* * @param title * The title to display above the notification message on the recipient's device. */ public void setTitle(String title) { this.title = title; } /** ** The title to display above the notification message on the recipient's device. *
* * @return The title to display above the notification message on the recipient's device. */ public String getTitle() { return this.title; } /** ** The title to display above the notification message on the recipient's device. *
* * @param title * The title to display above the notification message on the recipient's device. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withTitle(String title) { setTitle(title); return this; } /** ** The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the * value of the Action property is URL. *
* * @param url * The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and * the value of the Action property is URL. */ public void setUrl(String url) { this.url = url; } /** ** The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the * value of the Action property is URL. *
* * @return The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and * the value of the Action property is URL. */ public String getUrl() { return this.url; } /** ** The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the * value of the Action property is URL. *
* * @param url * The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and * the value of the Action property is URL. * @return Returns a reference to this object so that method calls can be chained together. */ public APNSMessage withUrl(String url) { setUrl(url); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAPNSPushType() != null) sb.append("APNSPushType: ").append(getAPNSPushType()).append(","); if (getAction() != null) sb.append("Action: ").append(getAction()).append(","); if (getBadge() != null) sb.append("Badge: ").append(getBadge()).append(","); if (getBody() != null) sb.append("Body: ").append(getBody()).append(","); if (getCategory() != null) sb.append("Category: ").append(getCategory()).append(","); if (getCollapseId() != null) sb.append("CollapseId: ").append(getCollapseId()).append(","); if (getData() != null) sb.append("Data: ").append(getData()).append(","); if (getMediaUrl() != null) sb.append("MediaUrl: ").append(getMediaUrl()).append(","); if (getPreferredAuthenticationMethod() != null) sb.append("PreferredAuthenticationMethod: ").append(getPreferredAuthenticationMethod()).append(","); if (getPriority() != null) sb.append("Priority: ").append(getPriority()).append(","); if (getRawContent() != null) sb.append("RawContent: ").append(getRawContent()).append(","); if (getSilentPush() != null) sb.append("SilentPush: ").append(getSilentPush()).append(","); if (getSound() != null) sb.append("Sound: ").append(getSound()).append(","); if (getSubstitutions() != null) sb.append("Substitutions: ").append(getSubstitutions()).append(","); if (getThreadId() != null) sb.append("ThreadId: ").append(getThreadId()).append(","); if (getTimeToLive() != null) sb.append("TimeToLive: ").append(getTimeToLive()).append(","); if (getTitle() != null) sb.append("Title: ").append(getTitle()).append(","); if (getUrl() != null) sb.append("Url: ").append(getUrl()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof APNSMessage == false) return false; APNSMessage other = (APNSMessage) obj; if (other.getAPNSPushType() == null ^ this.getAPNSPushType() == null) return false; if (other.getAPNSPushType() != null && other.getAPNSPushType().equals(this.getAPNSPushType()) == false) return false; if (other.getAction() == null ^ this.getAction() == null) return false; if (other.getAction() != null && other.getAction().equals(this.getAction()) == false) return false; if (other.getBadge() == null ^ this.getBadge() == null) return false; if (other.getBadge() != null && other.getBadge().equals(this.getBadge()) == false) return false; if (other.getBody() == null ^ this.getBody() == null) return false; if (other.getBody() != null && other.getBody().equals(this.getBody()) == false) return false; if (other.getCategory() == null ^ this.getCategory() == null) return false; if (other.getCategory() != null && other.getCategory().equals(this.getCategory()) == false) return false; if (other.getCollapseId() == null ^ this.getCollapseId() == null) return false; if (other.getCollapseId() != null && other.getCollapseId().equals(this.getCollapseId()) == false) return false; if (other.getData() == null ^ this.getData() == null) return false; if (other.getData() != null && other.getData().equals(this.getData()) == false) return false; if (other.getMediaUrl() == null ^ this.getMediaUrl() == null) return false; if (other.getMediaUrl() != null && other.getMediaUrl().equals(this.getMediaUrl()) == false) return false; if (other.getPreferredAuthenticationMethod() == null ^ this.getPreferredAuthenticationMethod() == null) return false; if (other.getPreferredAuthenticationMethod() != null && other.getPreferredAuthenticationMethod().equals(this.getPreferredAuthenticationMethod()) == false) return false; if (other.getPriority() == null ^ this.getPriority() == null) return false; if (other.getPriority() != null && other.getPriority().equals(this.getPriority()) == false) return false; if (other.getRawContent() == null ^ this.getRawContent() == null) return false; if (other.getRawContent() != null && other.getRawContent().equals(this.getRawContent()) == false) return false; if (other.getSilentPush() == null ^ this.getSilentPush() == null) return false; if (other.getSilentPush() != null && other.getSilentPush().equals(this.getSilentPush()) == false) return false; if (other.getSound() == null ^ this.getSound() == null) return false; if (other.getSound() != null && other.getSound().equals(this.getSound()) == false) return false; if (other.getSubstitutions() == null ^ this.getSubstitutions() == null) return false; if (other.getSubstitutions() != null && other.getSubstitutions().equals(this.getSubstitutions()) == false) return false; if (other.getThreadId() == null ^ this.getThreadId() == null) return false; if (other.getThreadId() != null && other.getThreadId().equals(this.getThreadId()) == false) return false; if (other.getTimeToLive() == null ^ this.getTimeToLive() == null) return false; if (other.getTimeToLive() != null && other.getTimeToLive().equals(this.getTimeToLive()) == false) return false; if (other.getTitle() == null ^ this.getTitle() == null) return false; if (other.getTitle() != null && other.getTitle().equals(this.getTitle()) == false) return false; if (other.getUrl() == null ^ this.getUrl() == null) return false; if (other.getUrl() != null && other.getUrl().equals(this.getUrl()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAPNSPushType() == null) ? 0 : getAPNSPushType().hashCode()); hashCode = prime * hashCode + ((getAction() == null) ? 0 : getAction().hashCode()); hashCode = prime * hashCode + ((getBadge() == null) ? 0 : getBadge().hashCode()); hashCode = prime * hashCode + ((getBody() == null) ? 0 : getBody().hashCode()); hashCode = prime * hashCode + ((getCategory() == null) ? 0 : getCategory().hashCode()); hashCode = prime * hashCode + ((getCollapseId() == null) ? 0 : getCollapseId().hashCode()); hashCode = prime * hashCode + ((getData() == null) ? 0 : getData().hashCode()); hashCode = prime * hashCode + ((getMediaUrl() == null) ? 0 : getMediaUrl().hashCode()); hashCode = prime * hashCode + ((getPreferredAuthenticationMethod() == null) ? 0 : getPreferredAuthenticationMethod().hashCode()); hashCode = prime * hashCode + ((getPriority() == null) ? 0 : getPriority().hashCode()); hashCode = prime * hashCode + ((getRawContent() == null) ? 0 : getRawContent().hashCode()); hashCode = prime * hashCode + ((getSilentPush() == null) ? 0 : getSilentPush().hashCode()); hashCode = prime * hashCode + ((getSound() == null) ? 0 : getSound().hashCode()); hashCode = prime * hashCode + ((getSubstitutions() == null) ? 0 : getSubstitutions().hashCode()); hashCode = prime * hashCode + ((getThreadId() == null) ? 0 : getThreadId().hashCode()); hashCode = prime * hashCode + ((getTimeToLive() == null) ? 0 : getTimeToLive().hashCode()); hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode()); hashCode = prime * hashCode + ((getUrl() == null) ? 0 : getUrl().hashCode()); return hashCode; } @Override public APNSMessage clone() { try { return (APNSMessage) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.pinpoint.model.transform.APNSMessageMarshaller.getInstance().marshall(this, protocolMarshaller); } }