blob: 53384349945df3231d5650ad84a3371385db03d5 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="fcm_v1.html">Firebase Cloud Messaging API</a> . <a href="fcm_v1.projects.html">projects</a> . <a href="fcm_v1.projects.messages.html">messages</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#send">send(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Send a message to specified target (a registration token, topic</p>
80<h3>Method Details</h3>
81<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070082 <code class="details" id="send">send(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070083 <pre>Send a message to specified target (a registration token, topic
84or condition).
85
86Args:
87 parent: string, Required. It contains the Firebase project id (i.e. the unique identifier
88for your Firebase project), in the format of `projects/{project_id}`.
89For legacy support, the numeric project number with no padding is also
90supported in the format of `projects/{project_number}`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -070091 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092 The object takes the form of:
93
94{ # Request to send a message to specified target.
Bu Sun Kimd059ad82020-07-22 17:02:09 -070095 &quot;validateOnly&quot;: True or False, # Flag for testing the request without actually delivering the message.
Bu Sun Kim65020912020-05-20 12:08:20 -070096 &quot;message&quot;: { # Message to send by Firebase Cloud Messaging Service. # Required. Message to send.
Bu Sun Kimd059ad82020-07-22 17:02:09 -070097 &quot;topic&quot;: &quot;A String&quot;, # Topic name to send a message to, e.g. &quot;weather&quot;.
98 # Note: &quot;/topics/&quot; prefix should not be provided.
99 &quot;token&quot;: &quot;A String&quot;, # Registration token to send a message to.
100 &quot;name&quot;: &quot;A String&quot;, # Output Only. The identifier of the message sent, in the format of
101 # `projects/*/messages/{message_id}`.
102 &quot;fcmOptions&quot;: { # Platform independent options for features provided by the FCM SDKs. # Input only. Template for FCM SDK feature options to use across all
103 # platforms.
104 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
105 },
106 &quot;notification&quot;: { # Basic notification template to use across all platforms. # Input only. Basic notification template to use across all platforms.
107 &quot;image&quot;: &quot;A String&quot;, # Contains the URL of an image that is going to be downloaded on the device
108 # and displayed in a notification.
109 # JPEG, PNG, BMP have full support across platforms. Animated GIF and video
110 # only work on iOS. WebP and HEIF have varying levels of support across
111 # platforms and platform versions.
112 # Android has 1MB image size limit.
113 # Quota usage and implications/costs for hosting image on Firebase Storage:
114 # https://firebase.google.com/pricing
115 &quot;body&quot;: &quot;A String&quot;, # The notification&#x27;s body text.
116 &quot;title&quot;: &quot;A String&quot;, # The notification&#x27;s title.
117 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700118 &quot;data&quot;: { # Input only. Arbitrary key/value payload. The key should not be a reserved
119 # word (&quot;from&quot;, &quot;message_type&quot;, or any word starting with &quot;google&quot; or &quot;gcm&quot;).
120 &quot;a_key&quot;: &quot;A String&quot;,
121 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700122 &quot;android&quot;: { # Android specific options for messages sent through # Input only. Android specific options for messages sent through
123 # [FCM connection server](https://goo.gl/4GLdUl).
124 # [FCM connection server](https://goo.gl/4GLdUl).
Bu Sun Kim65020912020-05-20 12:08:20 -0700125 &quot;directBootOk&quot;: True or False, # If set to true, messages will be allowed to be delivered to the app while
126 # the device is in direct boot mode. See [Support Direct Boot
127 # mode](https://developer.android.com/training/articles/direct-boot).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700128 &quot;data&quot;: { # Arbitrary key/value payload. If present, it will override
129 # google.firebase.fcm.v1.Message.data.
130 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700131 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700132 &quot;notification&quot;: { # Notification to send to android devices. # Notification to send to android devices.
Bu Sun Kim65020912020-05-20 12:08:20 -0700133 &quot;localOnly&quot;: True or False, # Set whether or not this notification is relevant only to the current
134 # device. Some notifications can be bridged to other devices for remote
135 # display, such as a Wear OS watch. This hint can be set to recommend this
136 # notification not be bridged. See [Wear OS
137 # guides](https://developer.android.com/training/wearables/notifications/bridger#existing-method-of-preventing-bridging)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700138 &quot;notificationCount&quot;: 42, # Sets the number of items this notification represents. May be displayed as
139 # a badge count for launchers that support badging.See [Notification
140 # Badge](https://developer.android.com/training/notify-user/badges).
141 # For example, this might be useful if you&#x27;re using just one notification to
142 # represent multiple new messages but you want the count here to represent
143 # the number of total new messages.
144 # If zero or unspecified, systems that support badging use the default, which
145 # is to increment a number displayed on the long-press menu each time a new
146 # notification arrives.
147 &quot;eventTime&quot;: &quot;A String&quot;, # Set the time that the event in the notification occurred. Notifications in
148 # the panel are sorted by this time. A point in time is represented using
149 # [protobuf.Timestamp](https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/Timestamp).
150 &quot;sticky&quot;: True or False, # When set to false or unset, the notification is automatically
151 # dismissed when the user clicks it in the panel. When set to true, the
152 # notification persists even when the user clicks it.
153 &quot;bodyLocKey&quot;: &quot;A String&quot;, # The key to the body string in the app&#x27;s string resources to use to localize
154 # the body text to the user&#x27;s current localization.
155 # See [String Resources](https://goo.gl/NdFZGI) for more information.
156 &quot;body&quot;: &quot;A String&quot;, # The notification&#x27;s body text. If present, it will override
157 # google.firebase.fcm.v1.Notification.body.
158 &quot;titleLocArgs&quot;: [ # Variable string values to be used in place of the format specifiers in
159 # title_loc_key to use to localize the title text to the user&#x27;s current
160 # localization.
161 # See [Formatting and Styling](https://goo.gl/MalYE3) for more information.
162 &quot;A String&quot;,
163 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700164 &quot;vibrateTimings&quot;: [ # Set the vibration pattern to use. Pass in an array of
165 # [protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)
166 # to turn on or off the vibrator. The first value indicates the `Duration` to
167 # wait before turning the vibrator on. The next value indicates the
168 # `Duration` to keep the vibrator on. Subsequent values alternate between
169 # `Duration` to turn the vibrator off and to turn the vibrator on.
170 # If `vibrate_timings` is set and `default_vibrate_timings` is set to `true`,
171 # the default value is used instead of the user-specified `vibrate_timings`.
172 &quot;A String&quot;,
173 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700174 &quot;visibility&quot;: &quot;A String&quot;, # Set the
175 # [Notification.visibility](https://developer.android.com/reference/android/app/Notification.html#visibility)
176 # of the notification.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;lightSettings&quot;: { # Settings to control notification LED. # Settings to control the notification&#x27;s LED blinking rate and color if LED
Dan O'Mearadd494642020-05-01 07:42:23 -0700178 # is available on the device. The total blinking time is controlled by the
179 # OS.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700180 &quot;lightOnDuration&quot;: &quot;A String&quot;, # Required. Along with `light_off_duration`, define the blink rate of LED
181 # flashes. Resolution defined by
182 # [proto.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed # Required. Set `color` of the LED with
Dan O'Mearadd494642020-05-01 07:42:23 -0700184 # [google.type.Color](https://github.com/googleapis/googleapis/blob/master/google/type/color.proto).
185 # for simplicity of conversion to/from color representations in various
186 # languages over compactness; for example, the fields of this representation
Bu Sun Kim65020912020-05-20 12:08:20 -0700187 # can be trivially provided to the constructor of &quot;java.awt.Color&quot; in Java; it
188 # can also be trivially provided to UIColor&#x27;s &quot;+colorWithRed:green:blue:alpha&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700189 # method in iOS; and, with just a little work, it can be easily formatted into
Bu Sun Kim65020912020-05-20 12:08:20 -0700190 # a CSS &quot;rgba()&quot; string in JavaScript, as well.
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 #
192 # Note: this proto does not carry information about the absolute color space
193 # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
194 # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
195 # space.
196 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700197 # Note: when color equality needs to be decided, implementations, unless
198 # documented otherwise, will treat two colors to be equal if all their red,
199 # green, blue and alpha values each differ by at most 1e-5.
200 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700201 # Example (Java):
202 #
203 # import com.google.type.Color;
204 #
205 # // ...
206 # public static java.awt.Color fromProto(Color protocolor) {
207 # float alpha = protocolor.hasAlpha()
208 # ? protocolor.getAlpha().getValue()
209 # : 1.0;
210 #
211 # return new java.awt.Color(
212 # protocolor.getRed(),
213 # protocolor.getGreen(),
214 # protocolor.getBlue(),
215 # alpha);
216 # }
217 #
218 # public static Color toProto(java.awt.Color color) {
219 # float red = (float) color.getRed();
220 # float green = (float) color.getGreen();
221 # float blue = (float) color.getBlue();
222 # float denominator = 255.0;
223 # Color.Builder resultBuilder =
224 # Color
225 # .newBuilder()
226 # .setRed(red / denominator)
227 # .setGreen(green / denominator)
228 # .setBlue(blue / denominator);
229 # int alpha = color.getAlpha();
230 # if (alpha != 255) {
231 # result.setAlpha(
232 # FloatValue
233 # .newBuilder()
234 # .setValue(((float) alpha) / denominator)
235 # .build());
236 # }
237 # return resultBuilder.build();
238 # }
239 # // ...
240 #
241 # Example (iOS / Obj-C):
242 #
243 # // ...
244 # static UIColor* fromProto(Color* protocolor) {
245 # float red = [protocolor red];
246 # float green = [protocolor green];
247 # float blue = [protocolor blue];
248 # FloatValue* alpha_wrapper = [protocolor alpha];
249 # float alpha = 1.0;
250 # if (alpha_wrapper != nil) {
251 # alpha = [alpha_wrapper value];
252 # }
253 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
254 # }
255 #
256 # static Color* toProto(UIColor* color) {
257 # CGFloat red, green, blue, alpha;
258 # if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) {
259 # return nil;
260 # }
261 # Color* result = [[Color alloc] init];
262 # [result setRed:red];
263 # [result setGreen:green];
264 # [result setBlue:blue];
265 # if (alpha &lt;= 0.9999) {
266 # [result setAlpha:floatWrapperWithValue(alpha)];
267 # }
268 # [result autorelease];
269 # return result;
270 # }
271 # // ...
272 #
273 # Example (JavaScript):
274 #
275 # // ...
276 #
277 # var protoToCssColor = function(rgb_color) {
278 # var redFrac = rgb_color.red || 0.0;
279 # var greenFrac = rgb_color.green || 0.0;
280 # var blueFrac = rgb_color.blue || 0.0;
281 # var red = Math.floor(redFrac * 255);
282 # var green = Math.floor(greenFrac * 255);
283 # var blue = Math.floor(blueFrac * 255);
284 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 # if (!(&#x27;alpha&#x27; in rgb_color)) {
Dan O'Mearadd494642020-05-01 07:42:23 -0700286 # return rgbToCssColor_(red, green, blue);
287 # }
288 #
289 # var alphaFrac = rgb_color.alpha.value || 0.0;
Bu Sun Kim65020912020-05-20 12:08:20 -0700290 # var rgbParams = [red, green, blue].join(&#x27;,&#x27;);
291 # return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;);
Dan O'Mearadd494642020-05-01 07:42:23 -0700292 # };
293 #
294 # var rgbToCssColor_ = function(red, green, blue) {
295 # var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue);
296 # var hexString = rgbNumber.toString(16);
297 # var missingZeros = 6 - hexString.length;
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 # var resultBuilder = [&#x27;#&#x27;];
Dan O'Mearadd494642020-05-01 07:42:23 -0700299 # for (var i = 0; i &lt; missingZeros; i++) {
Bu Sun Kim65020912020-05-20 12:08:20 -0700300 # resultBuilder.push(&#x27;0&#x27;);
Dan O'Mearadd494642020-05-01 07:42:23 -0700301 # }
302 # resultBuilder.push(hexString);
Bu Sun Kim65020912020-05-20 12:08:20 -0700303 # return resultBuilder.join(&#x27;&#x27;);
Dan O'Mearadd494642020-05-01 07:42:23 -0700304 # };
305 #
306 # // ...
Bu Sun Kim65020912020-05-20 12:08:20 -0700307 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
Bu Sun Kim65020912020-05-20 12:08:20 -0700308 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is,
Dan O'Mearadd494642020-05-01 07:42:23 -0700309 # the final pixel color is defined by the equation:
310 #
311 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
312 #
313 # This means that a value of 1.0 corresponds to a solid color, whereas
314 # a value of 0.0 corresponds to a completely transparent color. This
315 # uses a wrapper message rather than a simple float scalar so that it is
316 # possible to distinguish between a default value and the value being unset.
317 # If omitted, this color object is to be rendered as a solid color
318 # (as if the alpha value had been explicitly given with a value of 1.0).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700319 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
320 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
Dan O'Mearadd494642020-05-01 07:42:23 -0700321 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700322 &quot;lightOffDuration&quot;: &quot;A String&quot;, # Required. Along with `light_on_duration `, define the blink rate of LED
323 # flashes. Resolution defined by
324 # [proto.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)
Dan O'Mearadd494642020-05-01 07:42:23 -0700325 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700326 &quot;bodyLocArgs&quot;: [ # Variable string values to be used in place of the format specifiers in
327 # body_loc_key to use to localize the body text to the user&#x27;s current
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700328 # localization.
329 # See [Formatting and Styling](https://goo.gl/MalYE3) for more information.
330 &quot;A String&quot;,
331 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700332 &quot;defaultLightSettings&quot;: True or False, # If set to true, use the Android framework&#x27;s default LED light settings for
333 # the notification. Default values are specified in
334 # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
335 # If `default_light_settings` is set to true and `light_settings` is also
336 # set, the user-specified `light_settings` is used instead of the
337 # default value.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700338 &quot;channelId&quot;: &quot;A String&quot;, # The [notification&#x27;s channel
339 # id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels)
340 # (new in Android O). The app must create a channel with this channel ID
341 # before any notification with this channel ID is received. If you don&#x27;t send
342 # this channel ID in the request, or if the channel ID provided has not yet
343 # been created by the app, FCM uses the channel ID specified in the app
344 # manifest.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700345 &quot;defaultVibrateTimings&quot;: True or False, # If set to true, use the Android framework&#x27;s default vibrate pattern for the
346 # notification. Default values are specified in
347 # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
348 # If `default_vibrate_timings` is set to true and `vibrate_timings` is also
349 # set, the default value is used instead of the user-specified
350 # `vibrate_timings`.
351 &quot;icon&quot;: &quot;A String&quot;, # The notification&#x27;s icon.
352 # Sets the notification icon to myicon for drawable resource myicon.
353 # If you don&#x27;t send this key in the request, FCM displays the launcher icon
354 # specified in your app manifest.
355 &quot;ticker&quot;: &quot;A String&quot;, # Sets the &quot;ticker&quot; text, which is sent to accessibility services.
356 # Prior to API level 21 (`Lollipop`), sets the text that is displayed in the
357 # status bar when the notification first arrives.
358 &quot;notificationPriority&quot;: &quot;A String&quot;, # Set the relative priority for this notification. Priority is an indication
359 # of how much of the user&#x27;s attention should be consumed by this
360 # notification. Low-priority notifications may be hidden from the user in
361 # certain situations, while the user might be interrupted for a
362 # higher-priority notification. The effect of setting the same priorities may
363 # differ slightly on different platforms. Note this priority differs from
364 # `AndroidMessagePriority`. This priority is processed by the client after
365 # the message has been delivered, whereas
366 # [AndroidMessagePriority](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#androidmessagepriority)
367 # is an FCM concept that controls when the message is delivered.
368 &quot;color&quot;: &quot;A String&quot;, # The notification&#x27;s icon color, expressed in #rrggbb format.
369 &quot;image&quot;: &quot;A String&quot;, # Contains the URL of an image that is going to be displayed in a
370 # notification. If present, it will override
371 # google.firebase.fcm.v1.Notification.image.
372 &quot;defaultSound&quot;: True or False, # If set to true, use the Android framework&#x27;s default sound for the
373 # notification. Default values are specified in
374 # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
375 &quot;sound&quot;: &quot;A String&quot;, # The sound to play when the device receives the notification.
376 # Supports &quot;default&quot; or the filename of a sound resource bundled in the app.
377 # Sound files must reside in /res/raw/.
378 &quot;clickAction&quot;: &quot;A String&quot;, # The action associated with a user click on the notification.
379 # If specified, an activity with a matching intent filter is launched when
380 # a user clicks on the notification.
381 &quot;titleLocKey&quot;: &quot;A String&quot;, # The key to the title string in the app&#x27;s string resources to use to
382 # localize the title text to the user&#x27;s current localization.
383 # See [String Resources](https://goo.gl/NdFZGI) for more information.
384 &quot;tag&quot;: &quot;A String&quot;, # Identifier used to replace existing notifications in the notification
385 # drawer.
386 # If not specified, each request creates a new notification.
387 # If specified and a notification with the same tag is already being shown,
388 # the new notification replaces the existing one in the notification drawer.
389 &quot;title&quot;: &quot;A String&quot;, # The notification&#x27;s title. If present, it will override
390 # google.firebase.fcm.v1.Notification.title.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700391 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700392 &quot;collapseKey&quot;: &quot;A String&quot;, # An identifier of a group of messages that can be collapsed, so that only
393 # the last message gets sent when delivery can be resumed. A maximum of 4
394 # different collapse keys is allowed at any given time.
395 &quot;priority&quot;: &quot;A String&quot;, # Message priority. Can take &quot;normal&quot; and &quot;high&quot; values.
396 # For more information, see [Setting the priority of a
397 # message](https://goo.gl/GjONJv).
Bu Sun Kim65020912020-05-20 12:08:20 -0700398 &quot;restrictedPackageName&quot;: &quot;A String&quot;, # Package name of the application where the registration token must match in
399 # order to receive the message.
400 &quot;ttl&quot;: &quot;A String&quot;, # How long (in seconds) the message should be kept in FCM storage if the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 # device is offline. The maximum time to live supported is 4 weeks, and the
402 # default value is 4 weeks if not set. Set it to 0 if want to send the
403 # message immediately.
404 # In JSON format, the Duration type is encoded as a string rather than an
Bu Sun Kim65020912020-05-20 12:08:20 -0700405 # object, where the string ends in the suffix &quot;s&quot; (indicating seconds) and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700406 # is preceded by the number of seconds, with nanoseconds expressed as
407 # fractional seconds. For example, 3 seconds with 0 nanoseconds should be
Bu Sun Kim65020912020-05-20 12:08:20 -0700408 # encoded in JSON format as &quot;3s&quot;, while 3 seconds and 1 nanosecond should
409 # be expressed in JSON format as &quot;3.000000001s&quot;. The ttl will be rounded down
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410 # to the nearest second.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700411 &quot;fcmOptions&quot;: { # Options for features provided by the FCM SDK for Android. # Options for features provided by the FCM SDK for Android.
412 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700413 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700414 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700415 &quot;apns&quot;: { # [Apple Push Notification Service](https://goo.gl/MXRTPa) specific options. # Input only. [Apple Push Notification Service](https://goo.gl/MXRTPa)
416 # specific options.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700417 &quot;payload&quot;: { # APNs payload as a JSON object, including both `aps` dictionary and custom
418 # payload. See [Payload Key
419 # Reference](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification).
420 # If present, it overrides google.firebase.fcm.v1.Notification.title
421 # and google.firebase.fcm.v1.Notification.body.
422 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
423 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700424 &quot;headers&quot;: { # HTTP request headers defined in Apple Push Notification Service. Refer to
425 # [APNs request
426 # headers](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns)
427 # for supported headers, e.g. &quot;apns-priority&quot;: &quot;10&quot;.
428 &quot;a_key&quot;: &quot;A String&quot;,
429 },
430 &quot;fcmOptions&quot;: { # Options for features provided by the FCM SDK for iOS. # Options for features provided by the FCM SDK for iOS.
431 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
432 &quot;image&quot;: &quot;A String&quot;, # Contains the URL of an image that is going to be displayed in a
433 # notification. If present, it will override
434 # google.firebase.fcm.v1.Notification.image.
435 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700436 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700437 &quot;webpush&quot;: { # [Webpush protocol](https://tools.ietf.org/html/rfc8030) options. # Input only. [Webpush protocol](https://tools.ietf.org/html/rfc8030)
438 # options.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700439 &quot;fcmOptions&quot;: { # Options for features provided by the FCM SDK for Web. # Options for features provided by the FCM SDK for Web.
440 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
441 &quot;link&quot;: &quot;A String&quot;, # The link to open when the user clicks on the notification.
442 # For all URL values, HTTPS is required.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700443 },
444 &quot;data&quot;: { # Arbitrary key/value payload. If present, it will override
445 # google.firebase.fcm.v1.Message.data.
446 &quot;a_key&quot;: &quot;A String&quot;,
447 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700448 &quot;headers&quot;: { # HTTP headers defined in webpush protocol. Refer to
449 # [Webpush protocol](https://tools.ietf.org/html/rfc8030#section-5) for
450 # supported headers, e.g. &quot;TTL&quot;: &quot;15&quot;.
451 &quot;a_key&quot;: &quot;A String&quot;,
452 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700453 &quot;notification&quot;: { # Web Notification options as a JSON object. Supports Notification instance
454 # properties as defined in [Web Notification
455 # API](https://developer.mozilla.org/en-US/docs/Web/API/Notification). If
456 # present, &quot;title&quot; and &quot;body&quot; fields override
457 # [google.firebase.fcm.v1.Notification.title] and
458 # [google.firebase.fcm.v1.Notification.body].
459 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
460 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700461 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700462 &quot;condition&quot;: &quot;A String&quot;, # Condition to send a message to,
463 # e.g. &quot;&#x27;foo&#x27; in topics &amp;&amp; &#x27;bar&#x27; in topics&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700464 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 }
466
467 x__xgafv: string, V1 error format.
468 Allowed values
469 1 - v1 error format
470 2 - v2 error format
471
472Returns:
473 An object of the form:
474
475 { # Message to send by Firebase Cloud Messaging Service.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700476 &quot;topic&quot;: &quot;A String&quot;, # Topic name to send a message to, e.g. &quot;weather&quot;.
477 # Note: &quot;/topics/&quot; prefix should not be provided.
478 &quot;token&quot;: &quot;A String&quot;, # Registration token to send a message to.
479 &quot;name&quot;: &quot;A String&quot;, # Output Only. The identifier of the message sent, in the format of
480 # `projects/*/messages/{message_id}`.
481 &quot;fcmOptions&quot;: { # Platform independent options for features provided by the FCM SDKs. # Input only. Template for FCM SDK feature options to use across all
482 # platforms.
483 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
484 },
485 &quot;notification&quot;: { # Basic notification template to use across all platforms. # Input only. Basic notification template to use across all platforms.
486 &quot;image&quot;: &quot;A String&quot;, # Contains the URL of an image that is going to be downloaded on the device
487 # and displayed in a notification.
488 # JPEG, PNG, BMP have full support across platforms. Animated GIF and video
489 # only work on iOS. WebP and HEIF have varying levels of support across
490 # platforms and platform versions.
491 # Android has 1MB image size limit.
492 # Quota usage and implications/costs for hosting image on Firebase Storage:
493 # https://firebase.google.com/pricing
494 &quot;body&quot;: &quot;A String&quot;, # The notification&#x27;s body text.
495 &quot;title&quot;: &quot;A String&quot;, # The notification&#x27;s title.
496 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700497 &quot;data&quot;: { # Input only. Arbitrary key/value payload. The key should not be a reserved
498 # word (&quot;from&quot;, &quot;message_type&quot;, or any word starting with &quot;google&quot; or &quot;gcm&quot;).
499 &quot;a_key&quot;: &quot;A String&quot;,
500 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700501 &quot;android&quot;: { # Android specific options for messages sent through # Input only. Android specific options for messages sent through
502 # [FCM connection server](https://goo.gl/4GLdUl).
503 # [FCM connection server](https://goo.gl/4GLdUl).
Bu Sun Kim65020912020-05-20 12:08:20 -0700504 &quot;directBootOk&quot;: True or False, # If set to true, messages will be allowed to be delivered to the app while
505 # the device is in direct boot mode. See [Support Direct Boot
506 # mode](https://developer.android.com/training/articles/direct-boot).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700507 &quot;data&quot;: { # Arbitrary key/value payload. If present, it will override
508 # google.firebase.fcm.v1.Message.data.
509 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700510 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700511 &quot;notification&quot;: { # Notification to send to android devices. # Notification to send to android devices.
Bu Sun Kim65020912020-05-20 12:08:20 -0700512 &quot;localOnly&quot;: True or False, # Set whether or not this notification is relevant only to the current
513 # device. Some notifications can be bridged to other devices for remote
514 # display, such as a Wear OS watch. This hint can be set to recommend this
515 # notification not be bridged. See [Wear OS
516 # guides](https://developer.android.com/training/wearables/notifications/bridger#existing-method-of-preventing-bridging)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700517 &quot;notificationCount&quot;: 42, # Sets the number of items this notification represents. May be displayed as
518 # a badge count for launchers that support badging.See [Notification
519 # Badge](https://developer.android.com/training/notify-user/badges).
520 # For example, this might be useful if you&#x27;re using just one notification to
521 # represent multiple new messages but you want the count here to represent
522 # the number of total new messages.
523 # If zero or unspecified, systems that support badging use the default, which
524 # is to increment a number displayed on the long-press menu each time a new
525 # notification arrives.
526 &quot;eventTime&quot;: &quot;A String&quot;, # Set the time that the event in the notification occurred. Notifications in
527 # the panel are sorted by this time. A point in time is represented using
528 # [protobuf.Timestamp](https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/Timestamp).
529 &quot;sticky&quot;: True or False, # When set to false or unset, the notification is automatically
530 # dismissed when the user clicks it in the panel. When set to true, the
531 # notification persists even when the user clicks it.
532 &quot;bodyLocKey&quot;: &quot;A String&quot;, # The key to the body string in the app&#x27;s string resources to use to localize
533 # the body text to the user&#x27;s current localization.
534 # See [String Resources](https://goo.gl/NdFZGI) for more information.
535 &quot;body&quot;: &quot;A String&quot;, # The notification&#x27;s body text. If present, it will override
536 # google.firebase.fcm.v1.Notification.body.
537 &quot;titleLocArgs&quot;: [ # Variable string values to be used in place of the format specifiers in
538 # title_loc_key to use to localize the title text to the user&#x27;s current
539 # localization.
540 # See [Formatting and Styling](https://goo.gl/MalYE3) for more information.
541 &quot;A String&quot;,
542 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 &quot;vibrateTimings&quot;: [ # Set the vibration pattern to use. Pass in an array of
544 # [protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)
545 # to turn on or off the vibrator. The first value indicates the `Duration` to
546 # wait before turning the vibrator on. The next value indicates the
547 # `Duration` to keep the vibrator on. Subsequent values alternate between
548 # `Duration` to turn the vibrator off and to turn the vibrator on.
549 # If `vibrate_timings` is set and `default_vibrate_timings` is set to `true`,
550 # the default value is used instead of the user-specified `vibrate_timings`.
551 &quot;A String&quot;,
552 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700553 &quot;visibility&quot;: &quot;A String&quot;, # Set the
554 # [Notification.visibility](https://developer.android.com/reference/android/app/Notification.html#visibility)
555 # of the notification.
Bu Sun Kim65020912020-05-20 12:08:20 -0700556 &quot;lightSettings&quot;: { # Settings to control notification LED. # Settings to control the notification&#x27;s LED blinking rate and color if LED
Dan O'Mearadd494642020-05-01 07:42:23 -0700557 # is available on the device. The total blinking time is controlled by the
558 # OS.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700559 &quot;lightOnDuration&quot;: &quot;A String&quot;, # Required. Along with `light_off_duration`, define the blink rate of LED
560 # flashes. Resolution defined by
561 # [proto.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)
Bu Sun Kim65020912020-05-20 12:08:20 -0700562 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed # Required. Set `color` of the LED with
Dan O'Mearadd494642020-05-01 07:42:23 -0700563 # [google.type.Color](https://github.com/googleapis/googleapis/blob/master/google/type/color.proto).
564 # for simplicity of conversion to/from color representations in various
565 # languages over compactness; for example, the fields of this representation
Bu Sun Kim65020912020-05-20 12:08:20 -0700566 # can be trivially provided to the constructor of &quot;java.awt.Color&quot; in Java; it
567 # can also be trivially provided to UIColor&#x27;s &quot;+colorWithRed:green:blue:alpha&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700568 # method in iOS; and, with just a little work, it can be easily formatted into
Bu Sun Kim65020912020-05-20 12:08:20 -0700569 # a CSS &quot;rgba()&quot; string in JavaScript, as well.
Dan O'Mearadd494642020-05-01 07:42:23 -0700570 #
571 # Note: this proto does not carry information about the absolute color space
572 # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
573 # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
574 # space.
575 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700576 # Note: when color equality needs to be decided, implementations, unless
577 # documented otherwise, will treat two colors to be equal if all their red,
578 # green, blue and alpha values each differ by at most 1e-5.
579 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700580 # Example (Java):
581 #
582 # import com.google.type.Color;
583 #
584 # // ...
585 # public static java.awt.Color fromProto(Color protocolor) {
586 # float alpha = protocolor.hasAlpha()
587 # ? protocolor.getAlpha().getValue()
588 # : 1.0;
589 #
590 # return new java.awt.Color(
591 # protocolor.getRed(),
592 # protocolor.getGreen(),
593 # protocolor.getBlue(),
594 # alpha);
595 # }
596 #
597 # public static Color toProto(java.awt.Color color) {
598 # float red = (float) color.getRed();
599 # float green = (float) color.getGreen();
600 # float blue = (float) color.getBlue();
601 # float denominator = 255.0;
602 # Color.Builder resultBuilder =
603 # Color
604 # .newBuilder()
605 # .setRed(red / denominator)
606 # .setGreen(green / denominator)
607 # .setBlue(blue / denominator);
608 # int alpha = color.getAlpha();
609 # if (alpha != 255) {
610 # result.setAlpha(
611 # FloatValue
612 # .newBuilder()
613 # .setValue(((float) alpha) / denominator)
614 # .build());
615 # }
616 # return resultBuilder.build();
617 # }
618 # // ...
619 #
620 # Example (iOS / Obj-C):
621 #
622 # // ...
623 # static UIColor* fromProto(Color* protocolor) {
624 # float red = [protocolor red];
625 # float green = [protocolor green];
626 # float blue = [protocolor blue];
627 # FloatValue* alpha_wrapper = [protocolor alpha];
628 # float alpha = 1.0;
629 # if (alpha_wrapper != nil) {
630 # alpha = [alpha_wrapper value];
631 # }
632 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
633 # }
634 #
635 # static Color* toProto(UIColor* color) {
636 # CGFloat red, green, blue, alpha;
637 # if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) {
638 # return nil;
639 # }
640 # Color* result = [[Color alloc] init];
641 # [result setRed:red];
642 # [result setGreen:green];
643 # [result setBlue:blue];
644 # if (alpha &lt;= 0.9999) {
645 # [result setAlpha:floatWrapperWithValue(alpha)];
646 # }
647 # [result autorelease];
648 # return result;
649 # }
650 # // ...
651 #
652 # Example (JavaScript):
653 #
654 # // ...
655 #
656 # var protoToCssColor = function(rgb_color) {
657 # var redFrac = rgb_color.red || 0.0;
658 # var greenFrac = rgb_color.green || 0.0;
659 # var blueFrac = rgb_color.blue || 0.0;
660 # var red = Math.floor(redFrac * 255);
661 # var green = Math.floor(greenFrac * 255);
662 # var blue = Math.floor(blueFrac * 255);
663 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700664 # if (!(&#x27;alpha&#x27; in rgb_color)) {
Dan O'Mearadd494642020-05-01 07:42:23 -0700665 # return rgbToCssColor_(red, green, blue);
666 # }
667 #
668 # var alphaFrac = rgb_color.alpha.value || 0.0;
Bu Sun Kim65020912020-05-20 12:08:20 -0700669 # var rgbParams = [red, green, blue].join(&#x27;,&#x27;);
670 # return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;);
Dan O'Mearadd494642020-05-01 07:42:23 -0700671 # };
672 #
673 # var rgbToCssColor_ = function(red, green, blue) {
674 # var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue);
675 # var hexString = rgbNumber.toString(16);
676 # var missingZeros = 6 - hexString.length;
Bu Sun Kim65020912020-05-20 12:08:20 -0700677 # var resultBuilder = [&#x27;#&#x27;];
Dan O'Mearadd494642020-05-01 07:42:23 -0700678 # for (var i = 0; i &lt; missingZeros; i++) {
Bu Sun Kim65020912020-05-20 12:08:20 -0700679 # resultBuilder.push(&#x27;0&#x27;);
Dan O'Mearadd494642020-05-01 07:42:23 -0700680 # }
681 # resultBuilder.push(hexString);
Bu Sun Kim65020912020-05-20 12:08:20 -0700682 # return resultBuilder.join(&#x27;&#x27;);
Dan O'Mearadd494642020-05-01 07:42:23 -0700683 # };
684 #
685 # // ...
Bu Sun Kim65020912020-05-20 12:08:20 -0700686 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
Bu Sun Kim65020912020-05-20 12:08:20 -0700687 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is,
Dan O'Mearadd494642020-05-01 07:42:23 -0700688 # the final pixel color is defined by the equation:
689 #
690 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
691 #
692 # This means that a value of 1.0 corresponds to a solid color, whereas
693 # a value of 0.0 corresponds to a completely transparent color. This
694 # uses a wrapper message rather than a simple float scalar so that it is
695 # possible to distinguish between a default value and the value being unset.
696 # If omitted, this color object is to be rendered as a solid color
697 # (as if the alpha value had been explicitly given with a value of 1.0).
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700698 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
699 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
Dan O'Mearadd494642020-05-01 07:42:23 -0700700 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700701 &quot;lightOffDuration&quot;: &quot;A String&quot;, # Required. Along with `light_on_duration `, define the blink rate of LED
702 # flashes. Resolution defined by
703 # [proto.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)
Dan O'Mearadd494642020-05-01 07:42:23 -0700704 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700705 &quot;bodyLocArgs&quot;: [ # Variable string values to be used in place of the format specifiers in
706 # body_loc_key to use to localize the body text to the user&#x27;s current
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700707 # localization.
708 # See [Formatting and Styling](https://goo.gl/MalYE3) for more information.
709 &quot;A String&quot;,
710 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700711 &quot;defaultLightSettings&quot;: True or False, # If set to true, use the Android framework&#x27;s default LED light settings for
712 # the notification. Default values are specified in
713 # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
714 # If `default_light_settings` is set to true and `light_settings` is also
715 # set, the user-specified `light_settings` is used instead of the
716 # default value.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700717 &quot;channelId&quot;: &quot;A String&quot;, # The [notification&#x27;s channel
718 # id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels)
719 # (new in Android O). The app must create a channel with this channel ID
720 # before any notification with this channel ID is received. If you don&#x27;t send
721 # this channel ID in the request, or if the channel ID provided has not yet
722 # been created by the app, FCM uses the channel ID specified in the app
723 # manifest.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700724 &quot;defaultVibrateTimings&quot;: True or False, # If set to true, use the Android framework&#x27;s default vibrate pattern for the
725 # notification. Default values are specified in
726 # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
727 # If `default_vibrate_timings` is set to true and `vibrate_timings` is also
728 # set, the default value is used instead of the user-specified
729 # `vibrate_timings`.
730 &quot;icon&quot;: &quot;A String&quot;, # The notification&#x27;s icon.
731 # Sets the notification icon to myicon for drawable resource myicon.
732 # If you don&#x27;t send this key in the request, FCM displays the launcher icon
733 # specified in your app manifest.
734 &quot;ticker&quot;: &quot;A String&quot;, # Sets the &quot;ticker&quot; text, which is sent to accessibility services.
735 # Prior to API level 21 (`Lollipop`), sets the text that is displayed in the
736 # status bar when the notification first arrives.
737 &quot;notificationPriority&quot;: &quot;A String&quot;, # Set the relative priority for this notification. Priority is an indication
738 # of how much of the user&#x27;s attention should be consumed by this
739 # notification. Low-priority notifications may be hidden from the user in
740 # certain situations, while the user might be interrupted for a
741 # higher-priority notification. The effect of setting the same priorities may
742 # differ slightly on different platforms. Note this priority differs from
743 # `AndroidMessagePriority`. This priority is processed by the client after
744 # the message has been delivered, whereas
745 # [AndroidMessagePriority](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#androidmessagepriority)
746 # is an FCM concept that controls when the message is delivered.
747 &quot;color&quot;: &quot;A String&quot;, # The notification&#x27;s icon color, expressed in #rrggbb format.
748 &quot;image&quot;: &quot;A String&quot;, # Contains the URL of an image that is going to be displayed in a
749 # notification. If present, it will override
750 # google.firebase.fcm.v1.Notification.image.
751 &quot;defaultSound&quot;: True or False, # If set to true, use the Android framework&#x27;s default sound for the
752 # notification. Default values are specified in
753 # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
754 &quot;sound&quot;: &quot;A String&quot;, # The sound to play when the device receives the notification.
755 # Supports &quot;default&quot; or the filename of a sound resource bundled in the app.
756 # Sound files must reside in /res/raw/.
757 &quot;clickAction&quot;: &quot;A String&quot;, # The action associated with a user click on the notification.
758 # If specified, an activity with a matching intent filter is launched when
759 # a user clicks on the notification.
760 &quot;titleLocKey&quot;: &quot;A String&quot;, # The key to the title string in the app&#x27;s string resources to use to
761 # localize the title text to the user&#x27;s current localization.
762 # See [String Resources](https://goo.gl/NdFZGI) for more information.
763 &quot;tag&quot;: &quot;A String&quot;, # Identifier used to replace existing notifications in the notification
764 # drawer.
765 # If not specified, each request creates a new notification.
766 # If specified and a notification with the same tag is already being shown,
767 # the new notification replaces the existing one in the notification drawer.
768 &quot;title&quot;: &quot;A String&quot;, # The notification&#x27;s title. If present, it will override
769 # google.firebase.fcm.v1.Notification.title.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700770 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700771 &quot;collapseKey&quot;: &quot;A String&quot;, # An identifier of a group of messages that can be collapsed, so that only
772 # the last message gets sent when delivery can be resumed. A maximum of 4
773 # different collapse keys is allowed at any given time.
774 &quot;priority&quot;: &quot;A String&quot;, # Message priority. Can take &quot;normal&quot; and &quot;high&quot; values.
775 # For more information, see [Setting the priority of a
776 # message](https://goo.gl/GjONJv).
Bu Sun Kim65020912020-05-20 12:08:20 -0700777 &quot;restrictedPackageName&quot;: &quot;A String&quot;, # Package name of the application where the registration token must match in
778 # order to receive the message.
779 &quot;ttl&quot;: &quot;A String&quot;, # How long (in seconds) the message should be kept in FCM storage if the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700780 # device is offline. The maximum time to live supported is 4 weeks, and the
781 # default value is 4 weeks if not set. Set it to 0 if want to send the
782 # message immediately.
783 # In JSON format, the Duration type is encoded as a string rather than an
Bu Sun Kim65020912020-05-20 12:08:20 -0700784 # object, where the string ends in the suffix &quot;s&quot; (indicating seconds) and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700785 # is preceded by the number of seconds, with nanoseconds expressed as
786 # fractional seconds. For example, 3 seconds with 0 nanoseconds should be
Bu Sun Kim65020912020-05-20 12:08:20 -0700787 # encoded in JSON format as &quot;3s&quot;, while 3 seconds and 1 nanosecond should
788 # be expressed in JSON format as &quot;3.000000001s&quot;. The ttl will be rounded down
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700789 # to the nearest second.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700790 &quot;fcmOptions&quot;: { # Options for features provided by the FCM SDK for Android. # Options for features provided by the FCM SDK for Android.
791 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700792 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700793 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700794 &quot;apns&quot;: { # [Apple Push Notification Service](https://goo.gl/MXRTPa) specific options. # Input only. [Apple Push Notification Service](https://goo.gl/MXRTPa)
795 # specific options.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700796 &quot;payload&quot;: { # APNs payload as a JSON object, including both `aps` dictionary and custom
797 # payload. See [Payload Key
798 # Reference](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification).
799 # If present, it overrides google.firebase.fcm.v1.Notification.title
800 # and google.firebase.fcm.v1.Notification.body.
801 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
802 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700803 &quot;headers&quot;: { # HTTP request headers defined in Apple Push Notification Service. Refer to
804 # [APNs request
805 # headers](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns)
806 # for supported headers, e.g. &quot;apns-priority&quot;: &quot;10&quot;.
807 &quot;a_key&quot;: &quot;A String&quot;,
808 },
809 &quot;fcmOptions&quot;: { # Options for features provided by the FCM SDK for iOS. # Options for features provided by the FCM SDK for iOS.
810 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
811 &quot;image&quot;: &quot;A String&quot;, # Contains the URL of an image that is going to be displayed in a
812 # notification. If present, it will override
813 # google.firebase.fcm.v1.Notification.image.
814 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700815 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700816 &quot;webpush&quot;: { # [Webpush protocol](https://tools.ietf.org/html/rfc8030) options. # Input only. [Webpush protocol](https://tools.ietf.org/html/rfc8030)
817 # options.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700818 &quot;fcmOptions&quot;: { # Options for features provided by the FCM SDK for Web. # Options for features provided by the FCM SDK for Web.
819 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
820 &quot;link&quot;: &quot;A String&quot;, # The link to open when the user clicks on the notification.
821 # For all URL values, HTTPS is required.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700822 },
823 &quot;data&quot;: { # Arbitrary key/value payload. If present, it will override
824 # google.firebase.fcm.v1.Message.data.
825 &quot;a_key&quot;: &quot;A String&quot;,
826 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700827 &quot;headers&quot;: { # HTTP headers defined in webpush protocol. Refer to
828 # [Webpush protocol](https://tools.ietf.org/html/rfc8030#section-5) for
829 # supported headers, e.g. &quot;TTL&quot;: &quot;15&quot;.
830 &quot;a_key&quot;: &quot;A String&quot;,
831 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700832 &quot;notification&quot;: { # Web Notification options as a JSON object. Supports Notification instance
833 # properties as defined in [Web Notification
834 # API](https://developer.mozilla.org/en-US/docs/Web/API/Notification). If
835 # present, &quot;title&quot; and &quot;body&quot; fields override
836 # [google.firebase.fcm.v1.Notification.title] and
837 # [google.firebase.fcm.v1.Notification.body].
838 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
839 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700840 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700841 &quot;condition&quot;: &quot;A String&quot;, # Condition to send a message to,
842 # e.g. &quot;&#x27;foo&#x27; in topics &amp;&amp; &#x27;bar&#x27; in topics&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700843 }</pre>
844</div>
845
846</body></html>