Current section
Files
Jump to
Current section
Files
lib/google_api/fcm/v1/model/android_notification.ex
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.
defmodule GoogleApi.FCM.V1.Model.AndroidNotification do
@moduledoc """
Notification to send to android devices.
## Attributes
* `body` (*type:* `String.t`, *default:* `nil`) - The notification's body text. If present, it will override google.firebase.fcm.v1.Notification.body.
* `bodyLocArgs` (*type:* `list(String.t)`, *default:* `nil`) - Variable string values to be used in place of the format specifiers in body_loc_key to use to localize the body text to the user's current localization. See [Formatting and Styling](https://goo.gl/MalYE3) for more information.
* `bodyLocKey` (*type:* `String.t`, *default:* `nil`) - The key to the body string in the app's string resources to use to localize the body text to the user's current localization. See [String Resources](https://goo.gl/NdFZGI) for more information.
* `bypassProxyNotification` (*type:* `boolean()`, *default:* `nil`) - If set, display notifications delivered to the device will be handled by the app instead of the proxy.
* `channelId` (*type:* `String.t`, *default:* `nil`) - The [notification's channel id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels) (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
* `clickAction` (*type:* `String.t`, *default:* `nil`) - The action associated with a user click on the notification. If specified, an activity with a matching intent filter is launched when a user clicks on the notification.
* `color` (*type:* `String.t`, *default:* `nil`) - The notification's icon color, expressed in #rrggbb format.
* `defaultLightSettings` (*type:* `boolean()`, *default:* `nil`) - If set to true, use the Android framework's default LED light settings for the notification. Default values are specified in [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml). If `default_light_settings` is set to true and `light_settings` is also set, the user-specified `light_settings` is used instead of the default value.
* `defaultSound` (*type:* `boolean()`, *default:* `nil`) - If set to true, use the Android framework's default sound for the notification. Default values are specified in [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
* `defaultVibrateTimings` (*type:* `boolean()`, *default:* `nil`) - If set to true, use the Android framework's default vibrate pattern for the notification. Default values are specified in [config.xml](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml). If `default_vibrate_timings` is set to true and `vibrate_timings` is also set, the default value is used instead of the user-specified `vibrate_timings`.
* `eventTime` (*type:* `DateTime.t`, *default:* `nil`) - Set the time that the event in the notification occurred. Notifications in the panel are sorted by this time. A point in time is represented using [protobuf.Timestamp](https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/Timestamp).
* `icon` (*type:* `String.t`, *default:* `nil`) - The notification's icon. Sets the notification icon to myicon for drawable resource myicon. If you don't send this key in the request, FCM displays the launcher icon specified in your app manifest.
* `image` (*type:* `String.t`, *default:* `nil`) - Contains the URL of an image that is going to be displayed in a notification. If present, it will override google.firebase.fcm.v1.Notification.image.
* `lightSettings` (*type:* `GoogleApi.FCM.V1.Model.LightSettings.t`, *default:* `nil`) - Settings to control the notification's LED blinking rate and color if LED is available on the device. The total blinking time is controlled by the OS.
* `localOnly` (*type:* `boolean()`, *default:* `nil`) - Set whether or not this notification is relevant only to the current device. Some notifications can be bridged to other devices for remote display, such as a Wear OS watch. This hint can be set to recommend this notification not be bridged. See [Wear OS guides](https://developer.android.com/training/wearables/notifications/bridger#existing-method-of-preventing-bridging)
* `notificationCount` (*type:* `integer()`, *default:* `nil`) - Sets the number of items this notification represents. May be displayed as a badge count for launchers that support badging.See [Notification Badge](https://developer.android.com/training/notify-user/badges). For example, this might be useful if you're using just one notification to represent multiple new messages but you want the count here to represent the number of total new messages. If zero or unspecified, systems that support badging use the default, which is to increment a number displayed on the long-press menu each time a new notification arrives.
* `notificationPriority` (*type:* `String.t`, *default:* `nil`) - Set the relative priority for this notification. Priority is an indication of how much of the user's attention should be consumed by this notification. Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification. The effect of setting the same priorities may differ slightly on different platforms. Note this priority differs from `AndroidMessagePriority`. This priority is processed by the client after the message has been delivered, whereas [AndroidMessagePriority](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#androidmessagepriority) is an FCM concept that controls when the message is delivered.
* `proxy` (*type:* `String.t`, *default:* `nil`) - Setting to control when a notification may be proxied.
* `sound` (*type:* `String.t`, *default:* `nil`) - The sound to play when the device receives the notification. Supports "default" or the filename of a sound resource bundled in the app. Sound files must reside in /res/raw/.
* `sticky` (*type:* `boolean()`, *default:* `nil`) - When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel. When set to true, the notification persists even when the user clicks it.
* `tag` (*type:* `String.t`, *default:* `nil`) - Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer.
* `ticker` (*type:* `String.t`, *default:* `nil`) - Sets the "ticker" text, which is sent to accessibility services. Prior to API level 21 (`Lollipop`), sets the text that is displayed in the status bar when the notification first arrives.
* `title` (*type:* `String.t`, *default:* `nil`) - The notification's title. If present, it will override google.firebase.fcm.v1.Notification.title.
* `titleLocArgs` (*type:* `list(String.t)`, *default:* `nil`) - Variable string values to be used in place of the format specifiers in title_loc_key to use to localize the title text to the user's current localization. See [Formatting and Styling](https://goo.gl/MalYE3) for more information.
* `titleLocKey` (*type:* `String.t`, *default:* `nil`) - The key to the title string in the app's string resources to use to localize the title text to the user's current localization. See [String Resources](https://goo.gl/NdFZGI) for more information.
* `vibrateTimings` (*type:* `list(String.t)`, *default:* `nil`) - Set the vibration pattern to use. Pass in an array of [protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration) to turn on or off the vibrator. The first value indicates the `Duration` to wait before turning the vibrator on. The next value indicates the `Duration` to keep the vibrator on. Subsequent values alternate between `Duration` to turn the vibrator off and to turn the vibrator on. If `vibrate_timings` is set and `default_vibrate_timings` is set to `true`, the default value is used instead of the user-specified `vibrate_timings`.
* `visibility` (*type:* `String.t`, *default:* `nil`) - Set the [Notification.visibility](https://developer.android.com/reference/android/app/Notification.html#visibility) of the notification.
"""
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:body => String.t() | nil,
:bodyLocArgs => list(String.t()) | nil,
:bodyLocKey => String.t() | nil,
:bypassProxyNotification => boolean() | nil,
:channelId => String.t() | nil,
:clickAction => String.t() | nil,
:color => String.t() | nil,
:defaultLightSettings => boolean() | nil,
:defaultSound => boolean() | nil,
:defaultVibrateTimings => boolean() | nil,
:eventTime => DateTime.t() | nil,
:icon => String.t() | nil,
:image => String.t() | nil,
:lightSettings => GoogleApi.FCM.V1.Model.LightSettings.t() | nil,
:localOnly => boolean() | nil,
:notificationCount => integer() | nil,
:notificationPriority => String.t() | nil,
:proxy => String.t() | nil,
:sound => String.t() | nil,
:sticky => boolean() | nil,
:tag => String.t() | nil,
:ticker => String.t() | nil,
:title => String.t() | nil,
:titleLocArgs => list(String.t()) | nil,
:titleLocKey => String.t() | nil,
:vibrateTimings => list(String.t()) | nil,
:visibility => String.t() | nil
}
field(:body)
field(:bodyLocArgs, type: :list)
field(:bodyLocKey)
field(:bypassProxyNotification)
field(:channelId)
field(:clickAction)
field(:color)
field(:defaultLightSettings)
field(:defaultSound)
field(:defaultVibrateTimings)
field(:eventTime, as: DateTime)
field(:icon)
field(:image)
field(:lightSettings, as: GoogleApi.FCM.V1.Model.LightSettings)
field(:localOnly)
field(:notificationCount)
field(:notificationPriority)
field(:proxy)
field(:sound)
field(:sticky)
field(:tag)
field(:ticker)
field(:title)
field(:titleLocArgs, type: :list)
field(:titleLocKey)
field(:vibrateTimings, type: :list)
field(:visibility)
end
defimpl Poison.Decoder, for: GoogleApi.FCM.V1.Model.AndroidNotification do
def decode(value, options) do
GoogleApi.FCM.V1.Model.AndroidNotification.decode(value, options)
end
end
defimpl Poison.Encoder, for: GoogleApi.FCM.V1.Model.AndroidNotification do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end