1313# limitations under the License.
1414
1515"""Types and utilities used by the messaging (FCM) module."""
16+ from __future__ import annotations
17+ import datetime
18+ from typing import Dict , Optional , Union
1619
1720from firebase_admin import exceptions
1821
@@ -51,10 +54,25 @@ class AndroidConfig:
5154 fcm_options: A ``messaging.AndroidFCMOptions`` to be included in the message (optional).
5255 direct_boot_ok: A boolean indicating whether messages will be allowed to be delivered to
5356 the app while the device is in direct boot mode (optional).
57+ bandwidth_constrained_ok: A boolean indicating whether messages will be allowed to be
58+ delivered to the app while the device is on a bandwidth constrained network (optional).
59+ restricted_satellite_ok: A boolean indicating whether messages will be allowed to be
60+ delivered to the app while the device is on a restricted satellite network (optional).
5461 """
5562
56- def __init__ (self , collapse_key = None , priority = None , ttl = None , restricted_package_name = None ,
57- data = None , notification = None , fcm_options = None , direct_boot_ok = None ):
63+ def __init__ (
64+ self ,
65+ collapse_key : Optional [str ] = None ,
66+ priority : Optional [str ] = None ,
67+ ttl : Optional [Union [int , float , datetime .timedelta ]] = None ,
68+ restricted_package_name : Optional [str ] = None ,
69+ data : Optional [Dict [str , str ]] = None ,
70+ notification : Optional [AndroidNotification ] = None ,
71+ fcm_options : Optional [AndroidFCMOptions ] = None ,
72+ direct_boot_ok : Optional [bool ] = None ,
73+ bandwidth_constrained_ok : Optional [bool ] = None ,
74+ restricted_satellite_ok : Optional [bool ] = None
75+ ):
5876 self .collapse_key = collapse_key
5977 self .priority = priority
6078 self .ttl = ttl
@@ -63,6 +81,8 @@ def __init__(self, collapse_key=None, priority=None, ttl=None, restricted_packag
6381 self .notification = notification
6482 self .fcm_options = fcm_options
6583 self .direct_boot_ok = direct_boot_ok
84+ self .bandwidth_constrained_ok = bandwidth_constrained_ok
85+ self .restricted_satellite_ok = restricted_satellite_ok
6686
6787
6888class AndroidNotification :
0 commit comments