# FirebaseAdmin.Messaging.Message

Represents a message that can be sent via Firebase Cloud [Messaging](https://firebase.google.com/docs/reference/admin/dotnet/namespace/firebase-admin/messaging#namespace_firebase_admin_1_1_messaging) (FCM).

## Summary

Contains payload information as well as the recipient information. The recipient information must be specified by setting exactly one of the [Token](https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a46ff329980e0a7c781f613662a36bc47), [Fid](https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a76fe16d74c2838fddc9cbb33a4285fd4), [Topic](https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a0ac14aae4cec3b8e5dfbf83c05b8fc61) or [Condition](https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a6d1ea27a99dc64d81b3ba4fa76800e7d) fields.

| ### Properties ||
|---|---|
| `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1ab269ce2d0bd0a8e702ca53acc74105e6` | `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/android-config#class_firebase_admin_1_1_messaging_1_1_android_config` Gets or sets the Android-specific information to be included in the message. |
| `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a008d7023bec1b3cbbda1efba780ee57d` | `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/apns-config#class_firebase_admin_1_1_messaging_1_1_apns_config` Gets or sets the APNs-specific information to be included in the message. |
| `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a6d1ea27a99dc64d81b3ba4fa76800e7d` | `string` Gets or sets the FCM condition to which the message should be sent. |
| `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a60de8969556aba3ad8bef3726ba474b4` | `IReadOnlyDictionary< string, string >` Gets or sets a collection of key-value pairs that will be added to the message as data fields. |
| `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a41b3dd406f297e6e23f001bc53d7738b` | `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/fcm-options#class_firebase_admin_1_1_messaging_1_1_fcm_options` Gets or sets the FCM options to be included in the message. |
| `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a76fe16d74c2838fddc9cbb33a4285fd4` | `string` Gets or sets the Firebase Installation ID (FID) of the device to which the message should be sent. |
| `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a33d3be0f16d59b644fea8ee7a1f94459` | `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/notification#class_firebase_admin_1_1_messaging_1_1_notification` Gets or sets the notification information to be included in the message. |
| `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a46ff329980e0a7c781f613662a36bc47` | `string` Gets or sets the registration token of the device to which the message should be sent. |
| `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a0ac14aae4cec3b8e5dfbf83c05b8fc61` | `string` Gets or sets the name of the FCM topic to which the message should be sent. |
| `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1aaa78bf326fcb498fe16749a4fb38a5ee` | `https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/webpush-config#class_firebase_admin_1_1_messaging_1_1_webpush_config` Gets or sets the Webpush-specific information to be included in the message. |

## Properties

### Android

```
AndroidConfig Android
```
Gets or sets the Android-specific information to be included in the message.

### Apns

```
ApnsConfig Apns
```
Gets or sets the APNs-specific information to be included in the message.

### Condition

```
string Condition
```
Gets or sets the FCM condition to which the message should be sent.

Must be a valid condition string such as `"'foo' in topics"`.

### Data

```
IReadOnlyDictionary< string, string > Data
```
Gets or sets a collection of key-value pairs that will be added to the message as data fields.

Keys and the values must not be null.

### FcmOptions

```
FcmOptions FcmOptions
```
Gets or sets the FCM options to be included in the message.

### Fid

```
string Fid
```
Gets or sets the Firebase Installation ID (FID) of the device to which the message should be sent.

### Notification

```
Notification Notification
```
Gets or sets the notification information to be included in the message.

### Token

```
string Token
```
Gets or sets the registration token of the device to which the message should be sent.

Deprecated. Use [Fid](https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/message#class_firebase_admin_1_1_messaging_1_1_message_1a76fe16d74c2838fddc9cbb33a4285fd4) instead.

### Topic

```
string Topic
```
Gets or sets the name of the FCM topic to which the message should be sent.

Topic names may contain the `/topics/` prefix.

### Webpush

```
WebpushConfig Webpush
```
Gets or sets the Webpush-specific information to be included in the message.