blib/lib/Paws/Pinpoint/APNSMessage.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Generated by default/object.tt
2 package Paws::Pinpoint::APNSMessage;
3 use Moose;
4 has Action => (is => 'ro', isa => 'Str');
5 has APNSPushType => (is => 'ro', isa => 'Str');
6 has Badge => (is => 'ro', isa => 'Int');
7 has Body => (is => 'ro', isa => 'Str');
8 has Category => (is => 'ro', isa => 'Str');
9 has CollapseId => (is => 'ro', isa => 'Str');
10 has Data => (is => 'ro', isa => 'Paws::Pinpoint::MapOf__string');
11 has MediaUrl => (is => 'ro', isa => 'Str');
12 has PreferredAuthenticationMethod => (is => 'ro', isa => 'Str');
13 has Priority => (is => 'ro', isa => 'Str');
14 has RawContent => (is => 'ro', isa => 'Str');
15 has SilentPush => (is => 'ro', isa => 'Bool');
16 has Sound => (is => 'ro', isa => 'Str');
17 has Substitutions => (is => 'ro', isa => 'Paws::Pinpoint::MapOfListOf__string');
18 has ThreadId => (is => 'ro', isa => 'Str');
19 has TimeToLive => (is => 'ro', isa => 'Int');
20 has Title => (is => 'ro', isa => 'Str');
21 has Url => (is => 'ro', isa => 'Str');
22  
23 1;
24  
25 ### main pod documentation begin ###
26  
27 =head1 NAME
28  
29 Paws::Pinpoint::APNSMessage
30  
31 =head1 USAGE
32  
33 This class represents one of two things:
34  
35 =head3 Arguments in a call to a service
36  
37 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
38 Each attribute should be used as a named argument in the calls that expect this type of object.
39  
40 As an example, if Att1 is expected to be a Paws::Pinpoint::APNSMessage object:
41  
42 $service_obj->Method(Att1 => { Action => $value, ..., Url => $value });
43  
44 =head3 Results returned from an API call
45  
46 Use accessors for each attribute. If Att1 is expected to be an Paws::Pinpoint::APNSMessage object:
47  
48 $result = $service_obj->Method(...);
49 $result->Att1->Action
50  
51 =head1 DESCRIPTION
52  
53 Specifies the settings for a one-time message that's sent directly to
54 an endpoint through the APNs (Apple Push Notification service) channel.
55  
56 =head1 ATTRIBUTES
57  
58  
59 =head2 Action => Str
60  
61 The action to occur if the recipient taps the push notification. Valid
62 values are:
63  
64 =over
65  
66 =item *
67  
68 OPEN_APP - Your app opens or it becomes the foreground app if it was
69 sent to the background. This is the default action.
70  
71 =item *
72  
73 DEEP_LINK - Your app opens and displays a designated user interface in
74 the app. This setting uses the deep-linking features of the iOS
75 platform.
76  
77 =item *
78  
79 URL - The default mobile browser on the recipient's device opens and
80 loads the web page at a URL that you specify.
81  
82 =back
83  
84  
85  
86 =head2 APNSPushType => Str
87  
88 The type of push notification to send. Valid values are:
89  
90 =over
91  
92 =item *
93  
94 alert - For a standard notification that's displayed on recipients'
95 devices and prompts a recipient to interact with the notification.
96  
97 =item *
98  
99 background - For a silent notification that delivers content in the
100 background and isn't displayed on recipients' devices.
101  
102 =item *
103  
104 complication - For a notification that contains update information for
105 an appE<rsquo>s complication timeline.
106  
107 =item *
108  
109 fileprovider - For a notification that signals changes to a File
110 Provider extension.
111  
112 =item *
113  
114 mdm - For a notification that tells managed devices to contact the MDM
115 server.
116  
117 =item *
118  
119 voip - For a notification that provides information about an incoming
120 VoIP call.
121  
122 =back
123  
124 Amazon Pinpoint specifies this value in the apns-push-type request
125 header when it sends the notification message to APNs. If you don't
126 specify a value for this property, Amazon Pinpoint sets the value to
127 alert or background automatically, based on the value that you specify
128 for the SilentPush or RawContent property of the message.
129  
130 For more information about the apns-push-type request header, see
131 Sending Notification Requests to APNs
132 (https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns)
133 on the Apple Developer website.
134  
135  
136 =head2 Badge => Int
137  
138 The key that indicates whether and how to modify the badge of your
139 app's icon when the recipient receives the push notification. If this
140 key isn't included in the dictionary, the badge doesn't change. To
141 remove the badge, set this value to 0.
142  
143  
144 =head2 Body => Str
145  
146 The body of the notification message.
147  
148  
149 =head2 Category => Str
150  
151 The key that indicates the notification type for the push notification.
152 This key is a value that's defined by the identifier property of one of
153 your app's registered categories.
154  
155  
156 =head2 CollapseId => Str
157  
158 An arbitrary identifier that, if assigned to multiple messages, APNs
159 uses to coalesce the messages into a single push notification instead
160 of delivering each message individually. This value can't exceed 64
161 bytes.
162  
163 Amazon Pinpoint specifies this value in the apns-collapse-id request
164 header when it sends the notification message to APNs.
165  
166  
167 =head2 Data => L<Paws::Pinpoint::MapOf__string>
168  
169 The JSON payload to use for a silent push notification. This payload is
170 added to the data.pinpoint.jsonBody object of the notification.
171  
172  
173 =head2 MediaUrl => Str
174  
175 The URL of an image or video to display in the push notification.
176  
177  
178 =head2 PreferredAuthenticationMethod => Str
179  
180 The authentication method that you want Amazon Pinpoint to use when
181 authenticating with APNs, CERTIFICATE or TOKEN.
182  
183  
184 =head2 Priority => Str
185  
186 paraE<gt>5 - Low priority, the notification might be delayed, delivered
187 as part of a group, or throttled.
188  
189 /listitemE<gt>
190  
191 =over
192  
193 =item *
194  
195 10 - High priority, the notification is sent immediately. This is the
196 default value. A high priority notification should trigger an alert,
197 play a sound, or badge your app's icon on the recipient's device.
198  
199 /paraE<gt>
200  
201 Amazon Pinpoint specifies this value in the apns-priority request
202 header when it sends the notification message to APNs.
203  
204 The equivalent values for Firebase Cloud Messaging (FCM), formerly
205 Google Cloud Messaging (GCM), are normal, for 5, and high, for 10. If
206 you specify an FCM value for this property, Amazon Pinpoint accepts and
207 converts the value to the corresponding APNs value.
208  
209 =back
210  
211  
212  
213 =head2 RawContent => Str
214  
215 The raw, JSON-formatted string to use as the payload for the
216 notification message. If specified, this value overrides all other
217 content for the message.
218  
219 If you specify the raw content of an APNs push notification, the
220 message payload has to include the content-available key. The value of
221 the content-available key has to be an integer, and can only be 0 or 1.
222 If you're sending a standard notification, set the value of
223 content-available to 0. If you're sending a silent (background)
224 notification, set the value of content-available to 1. Additionally,
225 silent notification payloads can't include the alert, badge, or sound
226 keys. For more information, see Generating a Remote Notification
227 (https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification)
228 and Pushing Background Updates to Your App
229 (https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app)
230 on the Apple Developer website.
231  
232  
233 =head2 SilentPush => Bool
234  
235 Specifies whether the notification is a silent push notification. A
236 silent (or background) push notification isn't displayed on recipients'
237 devices. You can use silent push notifications to make small updates to
238 your app, or to display messages in an in-app message center.
239  
240 Amazon Pinpoint uses this property to determine the correct value for
241 the apns-push-type request header when it sends the notification
242 message to APNs. If you specify a value of true for this property,
243 Amazon Pinpoint sets the value for the apns-push-type header field to
244 background.
245  
246 If you specify the raw content of an APNs push notification, the
247 message payload has to include the content-available key. For silent
248 (background) notifications, set the value of content-available to 1.
249 Additionally, the message payload for a silent notification can't
250 include the alert, badge, or sound keys. For more information, see
251 Generating a Remote Notification
252 (https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification)
253 and Pushing Background Updates to Your App
254 (https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app)
255 on the Apple Developer website.
256  
257 Apple has indicated that they will throttle "excessive" background
258 notifications based on current traffic volumes. To prevent your
259 notifications being throttled, Apple recommends that you send no more
260 than 3 silent push notifications to each recipient per hour.
261  
262  
263 =head2 Sound => Str
264  
265 The key for the sound to play when the recipient receives the push
266 notification. The value for this key is the name of a sound file in
267 your app's main bundle or the Library/Sounds folder in your app's data
268 container. If the sound file can't be found or you specify default for
269 the value, the system plays the default alert sound.
270  
271  
272 =head2 Substitutions => L<Paws::Pinpoint::MapOfListOf__string>
273  
274 The default message variables to use in the notification message. You
275 can override these default variables with individual address variables.
276  
277  
278 =head2 ThreadId => Str
279  
280 The key that represents your app-specific identifier for grouping
281 notifications. If you provide a Notification Content app extension, you
282 can use this value to group your notifications together.
283  
284  
285 =head2 TimeToLive => Int
286  
287 The amount of time, in seconds, that APNs should store and attempt to
288 deliver the push notification, if the service is unable to deliver the
289 notification the first time. If this value is 0, APNs treats the
290 notification as if it expires immediately and the service doesn't store
291 or try to deliver the notification again.
292  
293 Amazon Pinpoint specifies this value in the apns-expiration request
294 header when it sends the notification message to APNs.
295  
296  
297 =head2 Title => Str
298  
299 The title to display above the notification message on the recipient's
300 device.
301  
302  
303 =head2 Url => Str
304  
305 The URL to open in the recipient's default mobile browser, if a
306 recipient taps the push notification and the value of the Action
307 property is URL.
308  
309  
310  
311 =head1 SEE ALSO
312  
313 This class forms part of L<Paws>, describing an object used in L<Paws::Pinpoint>
314  
315 =head1 BUGS and CONTRIBUTIONS
316  
317 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
318  
319 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
320  
321 =cut
322