diff --git a/src/FirebaseCloudMessaging/Message.php b/src/FirebaseCloudMessaging/Message.php index e2f2113300..c8eb1f24db 100644 --- a/src/FirebaseCloudMessaging/Message.php +++ b/src/FirebaseCloudMessaging/Message.php @@ -42,6 +42,12 @@ class Message extends \Google\Model public $data; protected $fcmOptionsType = FcmOptions::class; protected $fcmOptionsDataType = ''; + /** + * Optional. Firebase Installation ID to send a message to. + * + * @var string + */ + public $fid; /** * Output Only. The identifier of the message sent, in the format of * `projects/messages/{message_id}`. @@ -52,8 +58,11 @@ class Message extends \Google\Model protected $notificationType = Notification::class; protected $notificationDataType = ''; /** - * Registration token to send a message to. + * Deprecated: Use `fid` instead. Registration token to send a message to. + * During the transition period, this field also accepts a Firebase + * Installation ID (FID). * + * @deprecated * @var string */ public $token; @@ -155,6 +164,22 @@ public function getFcmOptions() { return $this->fcmOptions; } + /** + * Optional. Firebase Installation ID to send a message to. + * + * @param string $fid + */ + public function setFid($fid) + { + $this->fid = $fid; + } + /** + * @return string + */ + public function getFid() + { + return $this->fid; + } /** * Output Only. The identifier of the message sent, in the format of * `projects/messages/{message_id}`. @@ -189,8 +214,11 @@ public function getNotification() return $this->notification; } /** - * Registration token to send a message to. + * Deprecated: Use `fid` instead. Registration token to send a message to. + * During the transition period, this field also accepts a Firebase + * Installation ID (FID). * + * @deprecated * @param string $token */ public function setToken($token) @@ -198,6 +226,7 @@ public function setToken($token) $this->token = $token; } /** + * @deprecated * @return string */ public function getToken()