blob: 256ec89f55048daf098f2bab983844312905122a [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 Kim65020912020-05-20 12:08:20 -070095 &quot;message&quot;: { # Message to send by Firebase Cloud Messaging Service. # Required. Message to send.
96 &quot;topic&quot;: &quot;A String&quot;, # Topic name to send a message to, e.g. &quot;weather&quot;.
97 # Note: &quot;/topics/&quot; prefix should not be provided.
98 &quot;notification&quot;: { # Basic notification template to use across all platforms. # Input only. Basic notification template to use across all platforms.
99 &quot;body&quot;: &quot;A String&quot;, # The notification&#x27;s body text.
100 &quot;title&quot;: &quot;A String&quot;, # The notification&#x27;s title.
101 &quot;image&quot;: &quot;A String&quot;, # Contains the URL of an image that is going to be downloaded on the device
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 # and displayed in a notification.
103 # JPEG, PNG, BMP have full support across platforms. Animated GIF and video
104 # only work on iOS. WebP and HEIF have varying levels of support across
105 # platforms and platform versions.
106 # Android has 1MB image size limit.
107 # Quota usage and implications/costs for hosting image on Firebase Storage:
108 # https://firebase.google.com/pricing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700110 &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
111 # platforms.
112 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
113 },
114 &quot;data&quot;: { # Input only. Arbitrary key/value payload. The key should not be a reserved
115 # word (&quot;from&quot;, &quot;message_type&quot;, or any word starting with &quot;google&quot; or &quot;gcm&quot;).
116 &quot;a_key&quot;: &quot;A String&quot;,
117 },
118 &quot;token&quot;: &quot;A String&quot;, # Registration token to send a message to.
119 &quot;android&quot;: { # Android specific options for messages sent through # Input only. Android specific options for messages sent through
120 # [FCM connection server](https://goo.gl/4GLdUl).
121 # [FCM connection server](https://goo.gl/4GLdUl).
122 &quot;data&quot;: { # Arbitrary key/value payload. If present, it will override
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 # google.firebase.fcm.v1.Message.data.
Bu Sun Kim65020912020-05-20 12:08:20 -0700124 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700125 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700126 &quot;priority&quot;: &quot;A String&quot;, # Message priority. Can take &quot;normal&quot; and &quot;high&quot; values.
127 # For more information, see [Setting the priority of a
128 # message](https://goo.gl/GjONJv).
129 &quot;collapseKey&quot;: &quot;A String&quot;, # An identifier of a group of messages that can be collapsed, so that only
130 # the last message gets sent when delivery can be resumed. A maximum of 4
131 # different collapse keys is allowed at any given time.
132 &quot;directBootOk&quot;: True or False, # If set to true, messages will be allowed to be delivered to the app while
133 # the device is in direct boot mode. See [Support Direct Boot
134 # mode](https://developer.android.com/training/articles/direct-boot).
135 &quot;fcmOptions&quot;: { # Options for features provided by the FCM SDK for Android. # Options for features provided by the FCM SDK for Android.
136 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
Dan O'Mearadd494642020-05-01 07:42:23 -0700137 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700138 &quot;notification&quot;: { # Notification to send to android devices. # Notification to send to android devices.
139 &quot;tag&quot;: &quot;A String&quot;, # Identifier used to replace existing notifications in the notification
140 # drawer.
141 # If not specified, each request creates a new notification.
142 # If specified and a notification with the same tag is already being shown,
143 # the new notification replaces the existing one in the notification drawer.
144 &quot;titleLocKey&quot;: &quot;A String&quot;, # The key to the title string in the app&#x27;s string resources to use to
145 # localize the title text to the user&#x27;s current localization.
146 # See [String Resources](https://goo.gl/NdFZGI) for more information.
147 &quot;image&quot;: &quot;A String&quot;, # Contains the URL of an image that is going to be displayed in a
Dan O'Mearadd494642020-05-01 07:42:23 -0700148 # notification. If present, it will override
149 # google.firebase.fcm.v1.Notification.image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700150 &quot;visibility&quot;: &quot;A String&quot;, # Set the
151 # [Notification.visibility](https://developer.android.com/reference/android/app/Notification.html#visibility)
152 # of the notification.
153 &quot;ticker&quot;: &quot;A String&quot;, # Sets the &quot;ticker&quot; text, which is sent to accessibility services.
154 # Prior to API level 21 (`Lollipop`), sets the text that is displayed in the
155 # status bar when the notification first arrives.
156 &quot;title&quot;: &quot;A String&quot;, # The notification&#x27;s title. If present, it will override
157 # google.firebase.fcm.v1.Notification.title.
158 &quot;defaultSound&quot;: True or False, # If set to true, use the Android framework&#x27;s default sound for the
159 # notification. Default values are specified in
160 # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
161 &quot;sticky&quot;: True or False, # When set to false or unset, the notification is automatically
162 # dismissed when the user clicks it in the panel. When set to true, the
163 # notification persists even when the user clicks it.
164 &quot;titleLocArgs&quot;: [ # Variable string values to be used in place of the format specifiers in
165 # title_loc_key to use to localize the title text to the user&#x27;s current
166 # localization.
167 # See [Formatting and Styling](https://goo.gl/MalYE3) for more information.
168 &quot;A String&quot;,
169 ],
170 &quot;channelId&quot;: &quot;A String&quot;, # The [notification&#x27;s channel
171 # id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels)
172 # (new in Android O). The app must create a channel with this channel ID
173 # before any notification with this channel ID is received. If you don&#x27;t send
174 # this channel ID in the request, or if the channel ID provided has not yet
175 # been created by the app, FCM uses the channel ID specified in the app
176 # manifest.
177 &quot;defaultVibrateTimings&quot;: True or False, # If set to true, use the Android framework&#x27;s default vibrate pattern for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700178 # notification. Default values are specified in
179 # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
180 # If `default_vibrate_timings` is set to true and `vibrate_timings` is also
181 # set, the default value is used instead of the user-specified
182 # `vibrate_timings`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 &quot;clickAction&quot;: &quot;A String&quot;, # The action associated with a user click on the notification.
184 # If specified, an activity with a matching intent filter is launched when
185 # a user clicks on the notification.
186 &quot;eventTime&quot;: &quot;A String&quot;, # Set the time that the event in the notification occurred. Notifications in
187 # the panel are sorted by this time. A point in time is represented using
188 # [protobuf.Timestamp](https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/Timestamp).
189 &quot;defaultLightSettings&quot;: True or False, # If set to true, use the Android framework&#x27;s default LED light settings for
Dan O'Mearadd494642020-05-01 07:42:23 -0700190 # the notification. Default values are specified in
191 # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
192 # If `default_light_settings` is set to true and `light_settings` is also
193 # set, the user-specified `light_settings` is used instead of the
194 # default value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 &quot;localOnly&quot;: True or False, # Set whether or not this notification is relevant only to the current
196 # device. Some notifications can be bridged to other devices for remote
197 # display, such as a Wear OS watch. This hint can be set to recommend this
198 # notification not be bridged. See [Wear OS
199 # guides](https://developer.android.com/training/wearables/notifications/bridger#existing-method-of-preventing-bridging)
200 &quot;notificationPriority&quot;: &quot;A String&quot;, # Set the relative priority for this notification. Priority is an indication
201 # of how much of the user&#x27;s attention should be consumed by this
202 # notification. Low-priority notifications may be hidden from the user in
203 # certain situations, while the user might be interrupted for a
204 # higher-priority notification. The effect of setting the same priorities may
205 # differ slightly on different platforms. Note this priority differs from
206 # `AndroidMessagePriority`. This priority is processed by the client after
207 # the message has been delivered, whereas
208 # [AndroidMessagePriority](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#androidmessagepriority)
209 # is an FCM concept that controls when the message is delivered.
210 &quot;vibrateTimings&quot;: [ # Set the vibration pattern to use. Pass in an array of
211 # [protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)
212 # to turn on or off the vibrator. The first value indicates the `Duration` to
213 # wait before turning the vibrator on. The next value indicates the
214 # `Duration` to keep the vibrator on. Subsequent values alternate between
215 # `Duration` to turn the vibrator off and to turn the vibrator on.
216 # If `vibrate_timings` is set and `default_vibrate_timings` is set to `true`,
217 # the default value is used instead of the user-specified `vibrate_timings`.
218 &quot;A String&quot;,
219 ],
220 &quot;sound&quot;: &quot;A String&quot;, # The sound to play when the device receives the notification.
221 # Supports &quot;default&quot; or the filename of a sound resource bundled in the app.
222 # Sound files must reside in /res/raw/.
223 &quot;bodyLocKey&quot;: &quot;A String&quot;, # The key to the body string in the app&#x27;s string resources to use to localize
224 # the body text to the user&#x27;s current localization.
225 # See [String Resources](https://goo.gl/NdFZGI) for more information.
226 &quot;notificationCount&quot;: 42, # Sets the number of items this notification represents. May be displayed as
227 # a badge count for launchers that support badging.See [Notification
228 # Badge](https://developer.android.com/training/notify-user/badges).
229 # For example, this might be useful if you&#x27;re using just one notification to
230 # represent multiple new messages but you want the count here to represent
231 # the number of total new messages.
232 # If zero or unspecified, systems that support badging use the default, which
233 # is to increment a number displayed on the long-press menu each time a new
234 # notification arrives.
235 &quot;bodyLocArgs&quot;: [ # Variable string values to be used in place of the format specifiers in
236 # body_loc_key to use to localize the body text to the user&#x27;s current
237 # localization.
238 # See [Formatting and Styling](https://goo.gl/MalYE3) for more information.
239 &quot;A String&quot;,
240 ],
241 &quot;body&quot;: &quot;A String&quot;, # The notification&#x27;s body text. If present, it will override
242 # google.firebase.fcm.v1.Notification.body.
243 &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 -0700244 # is available on the device. The total blinking time is controlled by the
245 # OS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700246 &quot;lightOffDuration&quot;: &quot;A String&quot;, # Required. Along with `light_on_duration `, define the blink rate of LED
247 # flashes. Resolution defined by
248 # [proto.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)
249 &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 -0700250 # [google.type.Color](https://github.com/googleapis/googleapis/blob/master/google/type/color.proto).
251 # for simplicity of conversion to/from color representations in various
252 # languages over compactness; for example, the fields of this representation
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 # can be trivially provided to the constructor of &quot;java.awt.Color&quot; in Java; it
254 # can also be trivially provided to UIColor&#x27;s &quot;+colorWithRed:green:blue:alpha&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700255 # method in iOS; and, with just a little work, it can be easily formatted into
Bu Sun Kim65020912020-05-20 12:08:20 -0700256 # a CSS &quot;rgba()&quot; string in JavaScript, as well.
Dan O'Mearadd494642020-05-01 07:42:23 -0700257 #
258 # Note: this proto does not carry information about the absolute color space
259 # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
260 # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
261 # space.
262 #
263 # Example (Java):
264 #
265 # import com.google.type.Color;
266 #
267 # // ...
268 # public static java.awt.Color fromProto(Color protocolor) {
269 # float alpha = protocolor.hasAlpha()
270 # ? protocolor.getAlpha().getValue()
271 # : 1.0;
272 #
273 # return new java.awt.Color(
274 # protocolor.getRed(),
275 # protocolor.getGreen(),
276 # protocolor.getBlue(),
277 # alpha);
278 # }
279 #
280 # public static Color toProto(java.awt.Color color) {
281 # float red = (float) color.getRed();
282 # float green = (float) color.getGreen();
283 # float blue = (float) color.getBlue();
284 # float denominator = 255.0;
285 # Color.Builder resultBuilder =
286 # Color
287 # .newBuilder()
288 # .setRed(red / denominator)
289 # .setGreen(green / denominator)
290 # .setBlue(blue / denominator);
291 # int alpha = color.getAlpha();
292 # if (alpha != 255) {
293 # result.setAlpha(
294 # FloatValue
295 # .newBuilder()
296 # .setValue(((float) alpha) / denominator)
297 # .build());
298 # }
299 # return resultBuilder.build();
300 # }
301 # // ...
302 #
303 # Example (iOS / Obj-C):
304 #
305 # // ...
306 # static UIColor* fromProto(Color* protocolor) {
307 # float red = [protocolor red];
308 # float green = [protocolor green];
309 # float blue = [protocolor blue];
310 # FloatValue* alpha_wrapper = [protocolor alpha];
311 # float alpha = 1.0;
312 # if (alpha_wrapper != nil) {
313 # alpha = [alpha_wrapper value];
314 # }
315 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
316 # }
317 #
318 # static Color* toProto(UIColor* color) {
319 # CGFloat red, green, blue, alpha;
320 # if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) {
321 # return nil;
322 # }
323 # Color* result = [[Color alloc] init];
324 # [result setRed:red];
325 # [result setGreen:green];
326 # [result setBlue:blue];
327 # if (alpha &lt;= 0.9999) {
328 # [result setAlpha:floatWrapperWithValue(alpha)];
329 # }
330 # [result autorelease];
331 # return result;
332 # }
333 # // ...
334 #
335 # Example (JavaScript):
336 #
337 # // ...
338 #
339 # var protoToCssColor = function(rgb_color) {
340 # var redFrac = rgb_color.red || 0.0;
341 # var greenFrac = rgb_color.green || 0.0;
342 # var blueFrac = rgb_color.blue || 0.0;
343 # var red = Math.floor(redFrac * 255);
344 # var green = Math.floor(greenFrac * 255);
345 # var blue = Math.floor(blueFrac * 255);
346 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700347 # if (!(&#x27;alpha&#x27; in rgb_color)) {
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 # return rgbToCssColor_(red, green, blue);
349 # }
350 #
351 # var alphaFrac = rgb_color.alpha.value || 0.0;
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 # var rgbParams = [red, green, blue].join(&#x27;,&#x27;);
353 # return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;);
Dan O'Mearadd494642020-05-01 07:42:23 -0700354 # };
355 #
356 # var rgbToCssColor_ = function(red, green, blue) {
357 # var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue);
358 # var hexString = rgbNumber.toString(16);
359 # var missingZeros = 6 - hexString.length;
Bu Sun Kim65020912020-05-20 12:08:20 -0700360 # var resultBuilder = [&#x27;#&#x27;];
Dan O'Mearadd494642020-05-01 07:42:23 -0700361 # for (var i = 0; i &lt; missingZeros; i++) {
Bu Sun Kim65020912020-05-20 12:08:20 -0700362 # resultBuilder.push(&#x27;0&#x27;);
Dan O'Mearadd494642020-05-01 07:42:23 -0700363 # }
364 # resultBuilder.push(hexString);
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 # return resultBuilder.join(&#x27;&#x27;);
Dan O'Mearadd494642020-05-01 07:42:23 -0700366 # };
367 #
368 # // ...
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
370 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
371 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
372 &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 -0700373 # the final pixel color is defined by the equation:
374 #
375 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
376 #
377 # This means that a value of 1.0 corresponds to a solid color, whereas
378 # a value of 0.0 corresponds to a completely transparent color. This
379 # uses a wrapper message rather than a simple float scalar so that it is
380 # possible to distinguish between a default value and the value being unset.
381 # If omitted, this color object is to be rendered as a solid color
382 # (as if the alpha value had been explicitly given with a value of 1.0).
Dan O'Mearadd494642020-05-01 07:42:23 -0700383 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700384 &quot;lightOnDuration&quot;: &quot;A String&quot;, # Required. Along with `light_off_duration`, define the blink rate of LED
Dan O'Mearadd494642020-05-01 07:42:23 -0700385 # flashes. Resolution defined by
386 # [proto.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)
387 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700388 &quot;icon&quot;: &quot;A String&quot;, # The notification&#x27;s icon.
Dan O'Mearadd494642020-05-01 07:42:23 -0700389 # Sets the notification icon to myicon for drawable resource myicon.
Bu Sun Kim65020912020-05-20 12:08:20 -0700390 # If you don&#x27;t send this key in the request, FCM displays the launcher icon
Dan O'Mearadd494642020-05-01 07:42:23 -0700391 # specified in your app manifest.
Bu Sun Kim65020912020-05-20 12:08:20 -0700392 &quot;color&quot;: &quot;A String&quot;, # The notification&#x27;s icon color, expressed in #rrggbb format.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700393 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700394 &quot;restrictedPackageName&quot;: &quot;A String&quot;, # Package name of the application where the registration token must match in
395 # order to receive the message.
396 &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 -0700397 # device is offline. The maximum time to live supported is 4 weeks, and the
398 # default value is 4 weeks if not set. Set it to 0 if want to send the
399 # message immediately.
400 # In JSON format, the Duration type is encoded as a string rather than an
Bu Sun Kim65020912020-05-20 12:08:20 -0700401 # object, where the string ends in the suffix &quot;s&quot; (indicating seconds) and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700402 # is preceded by the number of seconds, with nanoseconds expressed as
403 # fractional seconds. For example, 3 seconds with 0 nanoseconds should be
Bu Sun Kim65020912020-05-20 12:08:20 -0700404 # encoded in JSON format as &quot;3s&quot;, while 3 seconds and 1 nanosecond should
405 # be expressed in JSON format as &quot;3.000000001s&quot;. The ttl will be rounded down
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700406 # to the nearest second.
Bu Sun Kim65020912020-05-20 12:08:20 -0700407 },
408 &quot;condition&quot;: &quot;A String&quot;, # Condition to send a message to,
409 # e.g. &quot;&#x27;foo&#x27; in topics &amp;&amp; &#x27;bar&#x27; in topics&quot;.
410 &quot;apns&quot;: { # [Apple Push Notification Service](https://goo.gl/MXRTPa) specific options. # Input only. [Apple Push Notification Service](https://goo.gl/MXRTPa)
411 # specific options.
412 &quot;payload&quot;: { # APNs payload as a JSON object, including both `aps` dictionary and custom
413 # payload. See [Payload Key
414 # Reference](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification).
415 # If present, it overrides google.firebase.fcm.v1.Notification.title
416 # and google.firebase.fcm.v1.Notification.body.
417 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
418 },
419 &quot;fcmOptions&quot;: { # Options for features provided by the FCM SDK for iOS. # Options for features provided by the FCM SDK for iOS.
420 &quot;image&quot;: &quot;A String&quot;, # Contains the URL of an image that is going to be displayed in a
421 # notification. If present, it will override
422 # google.firebase.fcm.v1.Notification.image.
423 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
424 },
425 &quot;headers&quot;: { # HTTP request headers defined in Apple Push Notification Service. Refer to
426 # [APNs request
427 # headers](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns)
428 # for supported headers, e.g. &quot;apns-priority&quot;: &quot;10&quot;.
429 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700430 },
431 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700432 &quot;webpush&quot;: { # [Webpush protocol](https://tools.ietf.org/html/rfc8030) options. # Input only. [Webpush protocol](https://tools.ietf.org/html/rfc8030)
433 # options.
434 &quot;notification&quot;: { # Web Notification options as a JSON object. Supports Notification instance
435 # properties as defined in [Web Notification
436 # API](https://developer.mozilla.org/en-US/docs/Web/API/Notification). If
437 # present, &quot;title&quot; and &quot;body&quot; fields override
438 # [google.firebase.fcm.v1.Notification.title] and
439 # [google.firebase.fcm.v1.Notification.body].
440 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
441 },
442 &quot;fcmOptions&quot;: { # Options for features provided by the FCM SDK for Web. # Options for features provided by the FCM SDK for Web.
443 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
444 &quot;link&quot;: &quot;A String&quot;, # The link to open when the user clicks on the notification.
445 # For all URL values, HTTPS is required.
446 },
447 &quot;headers&quot;: { # HTTP headers defined in webpush protocol. Refer to
448 # [Webpush protocol](https://tools.ietf.org/html/rfc8030#section-5) for
449 # supported headers, e.g. &quot;TTL&quot;: &quot;15&quot;.
450 &quot;a_key&quot;: &quot;A String&quot;,
451 },
452 &quot;data&quot;: { # Arbitrary key/value payload. If present, it will override
453 # google.firebase.fcm.v1.Message.data.
454 &quot;a_key&quot;: &quot;A String&quot;,
455 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700456 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700457 &quot;name&quot;: &quot;A String&quot;, # Output Only. The identifier of the message sent, in the format of
458 # `projects/*/messages/{message_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700459 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700460 &quot;validateOnly&quot;: True or False, # Flag for testing the request without actually delivering the message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700461 }
462
463 x__xgafv: string, V1 error format.
464 Allowed values
465 1 - v1 error format
466 2 - v2 error format
467
468Returns:
469 An object of the form:
470
471 { # Message to send by Firebase Cloud Messaging Service.
Bu Sun Kim65020912020-05-20 12:08:20 -0700472 &quot;topic&quot;: &quot;A String&quot;, # Topic name to send a message to, e.g. &quot;weather&quot;.
473 # Note: &quot;/topics/&quot; prefix should not be provided.
474 &quot;notification&quot;: { # Basic notification template to use across all platforms. # Input only. Basic notification template to use across all platforms.
475 &quot;body&quot;: &quot;A String&quot;, # The notification&#x27;s body text.
476 &quot;title&quot;: &quot;A String&quot;, # The notification&#x27;s title.
477 &quot;image&quot;: &quot;A String&quot;, # Contains the URL of an image that is going to be downloaded on the device
Dan O'Mearadd494642020-05-01 07:42:23 -0700478 # and displayed in a notification.
479 # JPEG, PNG, BMP have full support across platforms. Animated GIF and video
480 # only work on iOS. WebP and HEIF have varying levels of support across
481 # platforms and platform versions.
482 # Android has 1MB image size limit.
483 # Quota usage and implications/costs for hosting image on Firebase Storage:
484 # https://firebase.google.com/pricing
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700485 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700486 &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
487 # platforms.
488 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
489 },
490 &quot;data&quot;: { # Input only. Arbitrary key/value payload. The key should not be a reserved
491 # word (&quot;from&quot;, &quot;message_type&quot;, or any word starting with &quot;google&quot; or &quot;gcm&quot;).
492 &quot;a_key&quot;: &quot;A String&quot;,
493 },
494 &quot;token&quot;: &quot;A String&quot;, # Registration token to send a message to.
495 &quot;android&quot;: { # Android specific options for messages sent through # Input only. Android specific options for messages sent through
496 # [FCM connection server](https://goo.gl/4GLdUl).
497 # [FCM connection server](https://goo.gl/4GLdUl).
498 &quot;data&quot;: { # Arbitrary key/value payload. If present, it will override
Dan O'Mearadd494642020-05-01 07:42:23 -0700499 # google.firebase.fcm.v1.Message.data.
Bu Sun Kim65020912020-05-20 12:08:20 -0700500 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700501 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700502 &quot;priority&quot;: &quot;A String&quot;, # Message priority. Can take &quot;normal&quot; and &quot;high&quot; values.
503 # For more information, see [Setting the priority of a
504 # message](https://goo.gl/GjONJv).
505 &quot;collapseKey&quot;: &quot;A String&quot;, # An identifier of a group of messages that can be collapsed, so that only
506 # the last message gets sent when delivery can be resumed. A maximum of 4
507 # different collapse keys is allowed at any given time.
508 &quot;directBootOk&quot;: True or False, # If set to true, messages will be allowed to be delivered to the app while
509 # the device is in direct boot mode. See [Support Direct Boot
510 # mode](https://developer.android.com/training/articles/direct-boot).
511 &quot;fcmOptions&quot;: { # Options for features provided by the FCM SDK for Android. # Options for features provided by the FCM SDK for Android.
512 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
Dan O'Mearadd494642020-05-01 07:42:23 -0700513 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700514 &quot;notification&quot;: { # Notification to send to android devices. # Notification to send to android devices.
515 &quot;tag&quot;: &quot;A String&quot;, # Identifier used to replace existing notifications in the notification
516 # drawer.
517 # If not specified, each request creates a new notification.
518 # If specified and a notification with the same tag is already being shown,
519 # the new notification replaces the existing one in the notification drawer.
520 &quot;titleLocKey&quot;: &quot;A String&quot;, # The key to the title string in the app&#x27;s string resources to use to
521 # localize the title text to the user&#x27;s current localization.
522 # See [String Resources](https://goo.gl/NdFZGI) for more information.
523 &quot;image&quot;: &quot;A String&quot;, # Contains the URL of an image that is going to be displayed in a
Dan O'Mearadd494642020-05-01 07:42:23 -0700524 # notification. If present, it will override
525 # google.firebase.fcm.v1.Notification.image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700526 &quot;visibility&quot;: &quot;A String&quot;, # Set the
527 # [Notification.visibility](https://developer.android.com/reference/android/app/Notification.html#visibility)
528 # of the notification.
529 &quot;ticker&quot;: &quot;A String&quot;, # Sets the &quot;ticker&quot; text, which is sent to accessibility services.
530 # Prior to API level 21 (`Lollipop`), sets the text that is displayed in the
531 # status bar when the notification first arrives.
532 &quot;title&quot;: &quot;A String&quot;, # The notification&#x27;s title. If present, it will override
533 # google.firebase.fcm.v1.Notification.title.
534 &quot;defaultSound&quot;: True or False, # If set to true, use the Android framework&#x27;s default sound for the
535 # notification. Default values are specified in
536 # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
537 &quot;sticky&quot;: True or False, # When set to false or unset, the notification is automatically
538 # dismissed when the user clicks it in the panel. When set to true, the
539 # notification persists even when the user clicks it.
540 &quot;titleLocArgs&quot;: [ # Variable string values to be used in place of the format specifiers in
541 # title_loc_key to use to localize the title text to the user&#x27;s current
542 # localization.
543 # See [Formatting and Styling](https://goo.gl/MalYE3) for more information.
544 &quot;A String&quot;,
545 ],
546 &quot;channelId&quot;: &quot;A String&quot;, # The [notification&#x27;s channel
547 # id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels)
548 # (new in Android O). The app must create a channel with this channel ID
549 # before any notification with this channel ID is received. If you don&#x27;t send
550 # this channel ID in the request, or if the channel ID provided has not yet
551 # been created by the app, FCM uses the channel ID specified in the app
552 # manifest.
553 &quot;defaultVibrateTimings&quot;: True or False, # If set to true, use the Android framework&#x27;s default vibrate pattern for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700554 # notification. Default values are specified in
555 # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
556 # If `default_vibrate_timings` is set to true and `vibrate_timings` is also
557 # set, the default value is used instead of the user-specified
558 # `vibrate_timings`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700559 &quot;clickAction&quot;: &quot;A String&quot;, # The action associated with a user click on the notification.
560 # If specified, an activity with a matching intent filter is launched when
561 # a user clicks on the notification.
562 &quot;eventTime&quot;: &quot;A String&quot;, # Set the time that the event in the notification occurred. Notifications in
563 # the panel are sorted by this time. A point in time is represented using
564 # [protobuf.Timestamp](https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/Timestamp).
565 &quot;defaultLightSettings&quot;: True or False, # If set to true, use the Android framework&#x27;s default LED light settings for
Dan O'Mearadd494642020-05-01 07:42:23 -0700566 # the notification. Default values are specified in
567 # [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
568 # If `default_light_settings` is set to true and `light_settings` is also
569 # set, the user-specified `light_settings` is used instead of the
570 # default value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700571 &quot;localOnly&quot;: True or False, # Set whether or not this notification is relevant only to the current
572 # device. Some notifications can be bridged to other devices for remote
573 # display, such as a Wear OS watch. This hint can be set to recommend this
574 # notification not be bridged. See [Wear OS
575 # guides](https://developer.android.com/training/wearables/notifications/bridger#existing-method-of-preventing-bridging)
576 &quot;notificationPriority&quot;: &quot;A String&quot;, # Set the relative priority for this notification. Priority is an indication
577 # of how much of the user&#x27;s attention should be consumed by this
578 # notification. Low-priority notifications may be hidden from the user in
579 # certain situations, while the user might be interrupted for a
580 # higher-priority notification. The effect of setting the same priorities may
581 # differ slightly on different platforms. Note this priority differs from
582 # `AndroidMessagePriority`. This priority is processed by the client after
583 # the message has been delivered, whereas
584 # [AndroidMessagePriority](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#androidmessagepriority)
585 # is an FCM concept that controls when the message is delivered.
586 &quot;vibrateTimings&quot;: [ # Set the vibration pattern to use. Pass in an array of
587 # [protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)
588 # to turn on or off the vibrator. The first value indicates the `Duration` to
589 # wait before turning the vibrator on. The next value indicates the
590 # `Duration` to keep the vibrator on. Subsequent values alternate between
591 # `Duration` to turn the vibrator off and to turn the vibrator on.
592 # If `vibrate_timings` is set and `default_vibrate_timings` is set to `true`,
593 # the default value is used instead of the user-specified `vibrate_timings`.
594 &quot;A String&quot;,
595 ],
596 &quot;sound&quot;: &quot;A String&quot;, # The sound to play when the device receives the notification.
597 # Supports &quot;default&quot; or the filename of a sound resource bundled in the app.
598 # Sound files must reside in /res/raw/.
599 &quot;bodyLocKey&quot;: &quot;A String&quot;, # The key to the body string in the app&#x27;s string resources to use to localize
600 # the body text to the user&#x27;s current localization.
601 # See [String Resources](https://goo.gl/NdFZGI) for more information.
602 &quot;notificationCount&quot;: 42, # Sets the number of items this notification represents. May be displayed as
603 # a badge count for launchers that support badging.See [Notification
604 # Badge](https://developer.android.com/training/notify-user/badges).
605 # For example, this might be useful if you&#x27;re using just one notification to
606 # represent multiple new messages but you want the count here to represent
607 # the number of total new messages.
608 # If zero or unspecified, systems that support badging use the default, which
609 # is to increment a number displayed on the long-press menu each time a new
610 # notification arrives.
611 &quot;bodyLocArgs&quot;: [ # Variable string values to be used in place of the format specifiers in
612 # body_loc_key to use to localize the body text to the user&#x27;s current
613 # localization.
614 # See [Formatting and Styling](https://goo.gl/MalYE3) for more information.
615 &quot;A String&quot;,
616 ],
617 &quot;body&quot;: &quot;A String&quot;, # The notification&#x27;s body text. If present, it will override
618 # google.firebase.fcm.v1.Notification.body.
619 &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 -0700620 # is available on the device. The total blinking time is controlled by the
621 # OS.
Bu Sun Kim65020912020-05-20 12:08:20 -0700622 &quot;lightOffDuration&quot;: &quot;A String&quot;, # Required. Along with `light_on_duration `, define the blink rate of LED
623 # flashes. Resolution defined by
624 # [proto.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)
625 &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 -0700626 # [google.type.Color](https://github.com/googleapis/googleapis/blob/master/google/type/color.proto).
627 # for simplicity of conversion to/from color representations in various
628 # languages over compactness; for example, the fields of this representation
Bu Sun Kim65020912020-05-20 12:08:20 -0700629 # can be trivially provided to the constructor of &quot;java.awt.Color&quot; in Java; it
630 # can also be trivially provided to UIColor&#x27;s &quot;+colorWithRed:green:blue:alpha&quot;
Dan O'Mearadd494642020-05-01 07:42:23 -0700631 # method in iOS; and, with just a little work, it can be easily formatted into
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 # a CSS &quot;rgba()&quot; string in JavaScript, as well.
Dan O'Mearadd494642020-05-01 07:42:23 -0700633 #
634 # Note: this proto does not carry information about the absolute color space
635 # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
636 # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
637 # space.
638 #
639 # Example (Java):
640 #
641 # import com.google.type.Color;
642 #
643 # // ...
644 # public static java.awt.Color fromProto(Color protocolor) {
645 # float alpha = protocolor.hasAlpha()
646 # ? protocolor.getAlpha().getValue()
647 # : 1.0;
648 #
649 # return new java.awt.Color(
650 # protocolor.getRed(),
651 # protocolor.getGreen(),
652 # protocolor.getBlue(),
653 # alpha);
654 # }
655 #
656 # public static Color toProto(java.awt.Color color) {
657 # float red = (float) color.getRed();
658 # float green = (float) color.getGreen();
659 # float blue = (float) color.getBlue();
660 # float denominator = 255.0;
661 # Color.Builder resultBuilder =
662 # Color
663 # .newBuilder()
664 # .setRed(red / denominator)
665 # .setGreen(green / denominator)
666 # .setBlue(blue / denominator);
667 # int alpha = color.getAlpha();
668 # if (alpha != 255) {
669 # result.setAlpha(
670 # FloatValue
671 # .newBuilder()
672 # .setValue(((float) alpha) / denominator)
673 # .build());
674 # }
675 # return resultBuilder.build();
676 # }
677 # // ...
678 #
679 # Example (iOS / Obj-C):
680 #
681 # // ...
682 # static UIColor* fromProto(Color* protocolor) {
683 # float red = [protocolor red];
684 # float green = [protocolor green];
685 # float blue = [protocolor blue];
686 # FloatValue* alpha_wrapper = [protocolor alpha];
687 # float alpha = 1.0;
688 # if (alpha_wrapper != nil) {
689 # alpha = [alpha_wrapper value];
690 # }
691 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
692 # }
693 #
694 # static Color* toProto(UIColor* color) {
695 # CGFloat red, green, blue, alpha;
696 # if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) {
697 # return nil;
698 # }
699 # Color* result = [[Color alloc] init];
700 # [result setRed:red];
701 # [result setGreen:green];
702 # [result setBlue:blue];
703 # if (alpha &lt;= 0.9999) {
704 # [result setAlpha:floatWrapperWithValue(alpha)];
705 # }
706 # [result autorelease];
707 # return result;
708 # }
709 # // ...
710 #
711 # Example (JavaScript):
712 #
713 # // ...
714 #
715 # var protoToCssColor = function(rgb_color) {
716 # var redFrac = rgb_color.red || 0.0;
717 # var greenFrac = rgb_color.green || 0.0;
718 # var blueFrac = rgb_color.blue || 0.0;
719 # var red = Math.floor(redFrac * 255);
720 # var green = Math.floor(greenFrac * 255);
721 # var blue = Math.floor(blueFrac * 255);
722 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700723 # if (!(&#x27;alpha&#x27; in rgb_color)) {
Dan O'Mearadd494642020-05-01 07:42:23 -0700724 # return rgbToCssColor_(red, green, blue);
725 # }
726 #
727 # var alphaFrac = rgb_color.alpha.value || 0.0;
Bu Sun Kim65020912020-05-20 12:08:20 -0700728 # var rgbParams = [red, green, blue].join(&#x27;,&#x27;);
729 # return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;);
Dan O'Mearadd494642020-05-01 07:42:23 -0700730 # };
731 #
732 # var rgbToCssColor_ = function(red, green, blue) {
733 # var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue);
734 # var hexString = rgbNumber.toString(16);
735 # var missingZeros = 6 - hexString.length;
Bu Sun Kim65020912020-05-20 12:08:20 -0700736 # var resultBuilder = [&#x27;#&#x27;];
Dan O'Mearadd494642020-05-01 07:42:23 -0700737 # for (var i = 0; i &lt; missingZeros; i++) {
Bu Sun Kim65020912020-05-20 12:08:20 -0700738 # resultBuilder.push(&#x27;0&#x27;);
Dan O'Mearadd494642020-05-01 07:42:23 -0700739 # }
740 # resultBuilder.push(hexString);
Bu Sun Kim65020912020-05-20 12:08:20 -0700741 # return resultBuilder.join(&#x27;&#x27;);
Dan O'Mearadd494642020-05-01 07:42:23 -0700742 # };
743 #
744 # // ...
Bu Sun Kim65020912020-05-20 12:08:20 -0700745 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
746 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
747 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
748 &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 -0700749 # the final pixel color is defined by the equation:
750 #
751 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
752 #
753 # This means that a value of 1.0 corresponds to a solid color, whereas
754 # a value of 0.0 corresponds to a completely transparent color. This
755 # uses a wrapper message rather than a simple float scalar so that it is
756 # possible to distinguish between a default value and the value being unset.
757 # If omitted, this color object is to be rendered as a solid color
758 # (as if the alpha value had been explicitly given with a value of 1.0).
Dan O'Mearadd494642020-05-01 07:42:23 -0700759 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700760 &quot;lightOnDuration&quot;: &quot;A String&quot;, # Required. Along with `light_off_duration`, define the blink rate of LED
Dan O'Mearadd494642020-05-01 07:42:23 -0700761 # flashes. Resolution defined by
762 # [proto.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)
763 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700764 &quot;icon&quot;: &quot;A String&quot;, # The notification&#x27;s icon.
Dan O'Mearadd494642020-05-01 07:42:23 -0700765 # Sets the notification icon to myicon for drawable resource myicon.
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 # If you don&#x27;t send this key in the request, FCM displays the launcher icon
Dan O'Mearadd494642020-05-01 07:42:23 -0700767 # specified in your app manifest.
Bu Sun Kim65020912020-05-20 12:08:20 -0700768 &quot;color&quot;: &quot;A String&quot;, # The notification&#x27;s icon color, expressed in #rrggbb format.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700769 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700770 &quot;restrictedPackageName&quot;: &quot;A String&quot;, # Package name of the application where the registration token must match in
771 # order to receive the message.
772 &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 -0700773 # device is offline. The maximum time to live supported is 4 weeks, and the
774 # default value is 4 weeks if not set. Set it to 0 if want to send the
775 # message immediately.
776 # In JSON format, the Duration type is encoded as a string rather than an
Bu Sun Kim65020912020-05-20 12:08:20 -0700777 # object, where the string ends in the suffix &quot;s&quot; (indicating seconds) and
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700778 # is preceded by the number of seconds, with nanoseconds expressed as
779 # fractional seconds. For example, 3 seconds with 0 nanoseconds should be
Bu Sun Kim65020912020-05-20 12:08:20 -0700780 # encoded in JSON format as &quot;3s&quot;, while 3 seconds and 1 nanosecond should
781 # be expressed in JSON format as &quot;3.000000001s&quot;. The ttl will be rounded down
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700782 # to the nearest second.
Bu Sun Kim65020912020-05-20 12:08:20 -0700783 },
784 &quot;condition&quot;: &quot;A String&quot;, # Condition to send a message to,
785 # e.g. &quot;&#x27;foo&#x27; in topics &amp;&amp; &#x27;bar&#x27; in topics&quot;.
786 &quot;apns&quot;: { # [Apple Push Notification Service](https://goo.gl/MXRTPa) specific options. # Input only. [Apple Push Notification Service](https://goo.gl/MXRTPa)
787 # specific options.
788 &quot;payload&quot;: { # APNs payload as a JSON object, including both `aps` dictionary and custom
789 # payload. See [Payload Key
790 # Reference](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification).
791 # If present, it overrides google.firebase.fcm.v1.Notification.title
792 # and google.firebase.fcm.v1.Notification.body.
793 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
794 },
795 &quot;fcmOptions&quot;: { # Options for features provided by the FCM SDK for iOS. # Options for features provided by the FCM SDK for iOS.
796 &quot;image&quot;: &quot;A String&quot;, # Contains the URL of an image that is going to be displayed in a
797 # notification. If present, it will override
798 # google.firebase.fcm.v1.Notification.image.
799 &quot;analyticsLabel&quot;: &quot;A String&quot;, # Label associated with the message&#x27;s analytics data.
800 },
801 &quot;headers&quot;: { # HTTP request headers defined in Apple Push Notification Service. Refer to
802 # [APNs request
803 # headers](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns)
804 # for supported headers, e.g. &quot;apns-priority&quot;: &quot;10&quot;.
805 &quot;a_key&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700806 },
807 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700808 &quot;webpush&quot;: { # [Webpush protocol](https://tools.ietf.org/html/rfc8030) options. # Input only. [Webpush protocol](https://tools.ietf.org/html/rfc8030)
809 # options.
810 &quot;notification&quot;: { # Web Notification options as a JSON object. Supports Notification instance
811 # properties as defined in [Web Notification
812 # API](https://developer.mozilla.org/en-US/docs/Web/API/Notification). If
813 # present, &quot;title&quot; and &quot;body&quot; fields override
814 # [google.firebase.fcm.v1.Notification.title] and
815 # [google.firebase.fcm.v1.Notification.body].
816 &quot;a_key&quot;: &quot;&quot;, # Properties of the object.
817 },
818 &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.
822 },
823 &quot;headers&quot;: { # HTTP headers defined in webpush protocol. Refer to
824 # [Webpush protocol](https://tools.ietf.org/html/rfc8030#section-5) for
825 # supported headers, e.g. &quot;TTL&quot;: &quot;15&quot;.
826 &quot;a_key&quot;: &quot;A String&quot;,
827 },
828 &quot;data&quot;: { # Arbitrary key/value payload. If present, it will override
829 # google.firebase.fcm.v1.Message.data.
830 &quot;a_key&quot;: &quot;A String&quot;,
831 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700832 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700833 &quot;name&quot;: &quot;A String&quot;, # Output Only. The identifier of the message sent, in the format of
834 # `projects/*/messages/{message_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700835 }</pre>
836</div>
837
838</body></html>