@@ -36,7 +36,7 @@ class Message(object):
36
36
android: An instance of ``messaging.AndroidConfig`` (optional).
37
37
webpush: An instance of ``messaging.WebpushConfig`` (optional).
38
38
apns: An instance of ``messaging.ApnsConfig`` (optional).
39
- fcm_options: An instance of ``messaging.FcmOptions `` (optional).
39
+ fcm_options: An instance of ``messaging.FCMOptions `` (optional).
40
40
token: The registration token of the device to which the message should be sent (optional).
41
41
topic: Name of the FCM topic to which the message should be sent (optional). Topic name
42
42
may contain the ``/topics/`` prefix.
@@ -67,7 +67,7 @@ class MulticastMessage(object):
67
67
android: An instance of ``messaging.AndroidConfig`` (optional).
68
68
webpush: An instance of ``messaging.WebpushConfig`` (optional).
69
69
apns: An instance of ``messaging.ApnsConfig`` (optional).
70
- fcm_options: An instance of ``messaging.FcmOptions `` (optional).
70
+ fcm_options: An instance of ``messaging.FCMOptions `` (optional).
71
71
"""
72
72
def __init__ (self , tokens , data = None , notification = None , android = None , webpush = None , apns = None ,
73
73
fcm_options = None ):
@@ -112,7 +112,7 @@ class AndroidConfig(object):
112
112
data: A dictionary of data fields (optional). All keys and values in the dictionary must be
113
113
strings. When specified, overrides any data fields set via ``Message.data``.
114
114
notification: A ``messaging.AndroidNotification`` to be included in the message (optional).
115
- fcm_options: A ``messaging.AndroidFcmOptions `` to be included in the message (optional).
115
+ fcm_options: A ``messaging.AndroidFCMOptions `` to be included in the message (optional).
116
116
"""
117
117
118
118
def __init__ (self , collapse_key = None , priority = None , ttl = None , restricted_package_name = None ,
@@ -172,7 +172,7 @@ def __init__(self, title=None, body=None, icon=None, color=None, sound=None, tag
172
172
self .channel_id = channel_id
173
173
174
174
175
- class AndroidFcmOptions (object ):
175
+ class AndroidFCMOptions (object ):
176
176
"""Options for features provided by the FCM SDK for Android.
177
177
178
178
Args:
@@ -193,7 +193,7 @@ class WebpushConfig(object):
193
193
data: A dictionary of data fields (optional). All keys and values in the dictionary must be
194
194
strings. When specified, overrides any data fields set via ``Message.data``.
195
195
notification: A ``messaging.WebpushNotification`` to be included in the message (optional).
196
- fcm_options: A ``messaging.WebpushFcmOptions `` instance to be included in the message
196
+ fcm_options: A ``messaging.WebpushFCMOptions `` instance to be included in the message
197
197
(optional).
198
198
199
199
.. _Webpush Specification: https://tools.ietf.org/html/rfc8030#section-5
@@ -278,7 +278,7 @@ def __init__(self, title=None, body=None, icon=None, actions=None, badge=None, d
278
278
self .custom_data = custom_data
279
279
280
280
281
- class WebpushFcmOptions (object ):
281
+ class WebpushFCMOptions (object ):
282
282
"""Options for features provided by the FCM SDK for Web.
283
283
284
284
Args:
@@ -298,7 +298,7 @@ class APNSConfig(object):
298
298
Args:
299
299
headers: A dictionary of headers (optional).
300
300
payload: A ``messaging.APNSPayload`` to be included in the message (optional).
301
- fcm_options: A ``messaging.APNSFcmOptions `` instance to be included in the message
301
+ fcm_options: A ``messaging.APNSFCMOptions `` instance to be included in the message
302
302
(optional).
303
303
304
304
.. _APNS Documentation: https://developer.apple.com/library/content/documentation\
@@ -413,7 +413,7 @@ def __init__(self, title=None, subtitle=None, body=None, loc_key=None, loc_args=
413
413
self .custom_data = custom_data
414
414
415
415
416
- class APNSFcmOptions (object ):
416
+ class APNSFCMOptions (object ):
417
417
"""Options for features provided by the FCM SDK for iOS.
418
418
419
419
Args:
@@ -425,7 +425,7 @@ def __init__(self, analytics_label=None):
425
425
self .analytics_label = analytics_label
426
426
427
427
428
- class FcmOptions (object ):
428
+ class FCMOptions (object ):
429
429
"""Options for features provided by SDK.
430
430
431
431
Args:
@@ -535,15 +535,15 @@ def encode_android(cls, android):
535
535
536
536
@classmethod
537
537
def encode_android_fcm_options (cls , fcm_options ):
538
- """Encodes a AndroidFcmOptions instance into a json."""
538
+ """Encodes an AndroidFCMOptions instance into a json."""
539
539
if fcm_options is None :
540
540
return None
541
- if not isinstance (fcm_options , AndroidFcmOptions ):
541
+ if not isinstance (fcm_options , AndroidFCMOptions ):
542
542
raise ValueError ('AndroidConfig.fcm_options must be an instance of '
543
- 'AndroidFcmOptions class.' )
543
+ 'AndroidFCMOptions class.' )
544
544
result = {
545
545
'analytics_label' : _Validators .check_analytics_label (
546
- 'AndroidFcmOptions .analytics_label' , fcm_options .analytics_label ),
546
+ 'AndroidFCMOptions .analytics_label' , fcm_options .analytics_label ),
547
547
}
548
548
result = cls .remove_null_values (result )
549
549
return result
@@ -703,7 +703,7 @@ def encode_webpush_notification_actions(cls, actions):
703
703
704
704
@classmethod
705
705
def encode_webpush_fcm_options (cls , options ):
706
- """Encodes a WebpushFcmOptions instance into JSON."""
706
+ """Encodes a WebpushFCMOptions instance into JSON."""
707
707
if options is None :
708
708
return None
709
709
result = {
@@ -712,7 +712,7 @@ def encode_webpush_fcm_options(cls, options):
712
712
result = cls .remove_null_values (result )
713
713
link = result .get ('link' )
714
714
if link is not None and not link .startswith ('https://' ):
715
- raise ValueError ('WebpushFcmOptions .link must be a HTTPS URL.' )
715
+ raise ValueError ('WebpushFCMOptions .link must be a HTTPS URL.' )
716
716
return result
717
717
718
718
@classmethod
@@ -746,14 +746,14 @@ def encode_apns_payload(cls, payload):
746
746
747
747
@classmethod
748
748
def encode_apns_fcm_options (cls , fcm_options ):
749
- """Encodes an APNSFcmOptions instance into JSON."""
749
+ """Encodes an APNSFCMOptions instance into JSON."""
750
750
if fcm_options is None :
751
751
return None
752
- if not isinstance (fcm_options , APNSFcmOptions ):
753
- raise ValueError ('APNSConfig.fcm_options must be an instance of APNSFcmOptions class.' )
752
+ if not isinstance (fcm_options , APNSFCMOptions ):
753
+ raise ValueError ('APNSConfig.fcm_options must be an instance of APNSFCMOptions class.' )
754
754
result = {
755
755
'analytics_label' : _Validators .check_analytics_label (
756
- 'APNSFcmOptions .analytics_label' , fcm_options .analytics_label ),
756
+ 'APNSFCMOptions .analytics_label' , fcm_options .analytics_label ),
757
757
}
758
758
result = cls .remove_null_values (result )
759
759
return result
@@ -897,14 +897,14 @@ def default(self, obj): # pylint: disable=method-hidden
897
897
898
898
@classmethod
899
899
def encode_fcm_options (cls , fcm_options ):
900
- """Encodes an FcmOptions instance into JSON."""
900
+ """Encodes an FCMOptions instance into JSON."""
901
901
if fcm_options is None :
902
902
return None
903
- if not isinstance (fcm_options , FcmOptions ):
904
- raise ValueError ('Message.fcm_options must be an instance of FcmOptions class.' )
903
+ if not isinstance (fcm_options , FCMOptions ):
904
+ raise ValueError ('Message.fcm_options must be an instance of FCMOptions class.' )
905
905
result = {
906
906
'analytics_label' : _Validators .check_analytics_label (
907
- 'FcmOptions .analytics_label' , fcm_options .analytics_label ),
907
+ 'FCMOptions .analytics_label' , fcm_options .analytics_label ),
908
908
}
909
909
result = cls .remove_null_values (result )
910
910
return result
0 commit comments