Ë
    ö%9jŸa  ã                   ó6  — d Z ddlZddlZddlZddlZddlZddlmZ ddlmZ ddlmZ dZ	d„ Z
d d„Zd d	„Zd d
„Zd d„Zd!d„Zd!d„Zd„ Zd„ Zd„ Zd„ Z G d„ d«      Z G d„ d«      Z G d„ d«      Z G d„ de«      Z G d„ de«      Z G d„ d«      Z G d„ d«      Zy)"z…Firebase Project Management module.

This module enables management of resources in Firebase projects, such as Android and iOS apps.
é    N)Ú
exceptions)Ú_http_client)Ú_utilsÚ_project_managementc                 ó@   — t        j                  | t        t        «      S ©N)r   Úget_app_serviceÚ_PROJECT_MANAGEMENT_ATTRIBUTEÚ_ProjectManagementService©Úapps    ú]/var/www/html/truck-me/venv/lib/python3.12/site-packages/firebase_admin/project_management.pyÚ_get_project_management_servicer   #   s   € Ü×!Ñ! #Ô'DÔF_Ó`Ð`ó    c                 ó.   — t        | t        |«      ¬«      S )zýObtains a reference to an Android app in the associated Firebase project.

    Args:
        app_id: The app ID that identifies this Android app.
        app: An App instance (optional).

    Returns:
        AndroidApp: An ``AndroidApp`` instance.
    ©Úapp_idÚservice)Ú
AndroidAppr   ©r   r   s     r   Úandroid_appr   '   s   € ô ˜VÔ-LÈSÓ-QÔRÐRr   c                 ó.   — t        | t        |«      ¬«      S )zíObtains a reference to an iOS app in the associated Firebase project.

    Args:
        app_id: The app ID that identifies this iOS app.
        app: An App instance (optional).

    Returns:
        IOSApp: An ``IOSApp`` instance.
    r   )ÚIOSAppr   r   s     r   Úios_appr   4   s   € ô ˜Ô)HÈÓ)MÔNÐNr   c                 ó4   — t        | «      j                  «       S )zñLists all Android apps in the associated Firebase project.

    Args:
        app: An App instance (optional).

    Returns:
        list: a list of ``AndroidApp`` instances referring to each Android app in the Firebase
        project.
    )r   Úlist_android_appsr   s    r   r   r   A   s   € ô +¨3Ó/×AÑAÓCÐCr   c                 ó4   — t        | «      j                  «       S )zÝLists all iOS apps in the associated Firebase project.

    Args:
        app: An App instance (optional).

    Returns:
        list: a list of ``IOSApp`` instances referring to each iOS app in the Firebase project.
    )r   Úlist_ios_appsr   s    r   r   r   N   s   € ô +¨3Ó/×=Ñ=Ó?Ð?r   c                 ó8   — t        |«      j                  | |«      S )al  Creates a new Android app in the associated Firebase project.

    Args:
        package_name: The package name of the Android app to be created.
        display_name: A nickname for this Android app (optional).
        app: An App instance (optional).

    Returns:
        AndroidApp: An ``AndroidApp`` instance that is a reference to the newly created app.
    )r   Úcreate_android_app)Úpackage_nameÚdisplay_namer   s      r   r    r    Z   s   € ô +¨3Ó/×BÑBÀ<ÐQ]Ó^Ð^r   c                 ó8   — t        |«      j                  | |«      S )aR  Creates a new iOS app in the associated Firebase project.

    Args:
        bundle_id: The bundle ID of the iOS app to be created.
        display_name: A nickname for this iOS app (optional).
        app: An App instance (optional).

    Returns:
        IOSApp: An ``IOSApp`` instance that is a reference to the newly created app.
    )r   Úcreate_ios_app)Ú	bundle_idr"   r   s      r   r$   r$   h   s   € ô +¨3Ó/×>Ñ>¸yÈ,ÓWÐWr   c                 ó^   — | �t        | t        «      r| S t        dj                  |«      «      ‚)Nz{0} must be a string.©Ú
isinstanceÚstrÚ
ValueErrorÚformat©ÚobjÚ
field_names     r   Ú_check_is_string_or_noner/   v   s,   € Ø
€{”j ¤cÔ*Øˆ
Ü
Ð,×3Ñ3°JÓ?Ó
@Ð@r   c                 ó^   — t        | t        «      r| r| S t        dj                  |«      «      ‚)Nz{0} must be a non-empty string.r'   r,   s     r   Ú_check_is_nonempty_stringr1   |   s*   € Ü�#”sÔ¡Øˆ
Ü
Ð6×=Ñ=¸jÓIÓ
JÐJr   c                 ó    — | €y t        | |«      S r   )r1   r,   s     r   Ú!_check_is_nonempty_string_or_noner3   ‚   s   € Ø
€{ØÜ$ S¨*Ó5Ð5r   c                 ó>   — | €t        dj                  |«      «      ‚| S )Nz{0} cannot be None.)r*   r+   r,   s     r   Ú_check_not_noner5   ˆ   s#   € Ø
€{ÜÐ.×5Ñ5°jÓAÓBÐBØ€Jr   c                   óJ   — e Zd ZdZd„ Zed„ «       Zd„ Zd„ Zd„ Z	d„ Z
d„ Zd	„ Zy
)r   a!  A reference to an Android app within a Firebase project.

    Note: Unless otherwise specified, all methods defined in this class make an RPC.

    Please use the module-level function ``android_app(app_id)`` to obtain instances of this class
    instead of instantiating it directly.
    c                 ó    — || _         || _        y r   ©Ú_app_idÚ_service©Úselfr   r   s      r   Ú__init__zAndroidApp.__init__—   ó   € ØˆŒØˆ�r   c                 ó   — | j                   S )záReturns the app ID of the Android app to which this instance refers.

        Note: This method does not make an RPC.

        Returns:
            string: The app ID of the Android app to which this instance refers.
        ©r9   ©r<   s    r   r   zAndroidApp.app_id›   ó   € ð �|‰|Ðr   c                 óL   — | j                   j                  | j                  «      S )a&  Retrieves detailed information about this Android app.

        Returns:
            AndroidAppMetadata: An ``AndroidAppMetadata`` instance.

        Raises:
            FirebaseError: If an error occurs while communicating with the Firebase Project
                Management Service.
        )r:   Úget_android_app_metadatar9   rA   s    r   Úget_metadatazAndroidApp.get_metadata¦   s   € ð �}‰}×5Ñ5°d·l±lÓCÐCr   c                 óN   — | j                   j                  | j                  |«      S )ah  Updates the display name attribute of this Android app to the one given.

        Args:
            new_display_name: The new display name for this Android app.

        Returns:
            NoneType: None.

        Raises:
            FirebaseError: If an error occurs while communicating with the Firebase Project
                Management Service.
        )r:   Úset_android_app_display_namer9   ©r<   Únew_display_names     r   Úset_display_namezAndroidApp.set_display_name²   s    € ð �}‰}×9Ñ9¸$¿,¹,ÐHXÓYÐYr   c                 óL   — | j                   j                  | j                  «      S )zFRetrieves the configuration artifact associated with this Android app.)r:   Úget_android_app_configr9   rA   s    r   Ú
get_configzAndroidApp.get_configÁ   s   € à�}‰}×3Ñ3°D·L±LÓAÐAr   c                 óL   — | j                   j                  | j                  «      S )a5  Retrieves the entire list of SHA certificates associated with this Android app.

        Returns:
            list: A list of ``SHACertificate`` instances.

        Raises:
            FirebaseError: If an error occurs while communicating with the Firebase Project
                Management Service.
        )r:   Úget_sha_certificatesr9   rA   s    r   rO   zAndroidApp.get_sha_certificatesÅ   ó   € ð �}‰}×1Ñ1°$·,±,Ó?Ð?r   c                 óN   — | j                   j                  | j                  |«      S )aw  Adds a SHA certificate to this Android app.

        Args:
            certificate_to_add: The SHA certificate to add.

        Returns:
            NoneType: None.

        Raises:
            FirebaseError: If an error occurs while communicating with the Firebase Project
                Management Service. (For example, if the certificate_to_add already exists.)
        )r:   Úadd_sha_certificater9   )r<   Úcertificate_to_adds     r   rR   zAndroidApp.add_sha_certificateÑ   s    € ð �}‰}×0Ñ0°·±Ð?QÓRÐRr   c                 ó8   — | j                   j                  |«      S )aƒ  Removes a SHA certificate from this Android app.

        Args:
            certificate_to_delete: The SHA certificate to delete.

        Returns:
            NoneType: None.

        Raises:
            FirebaseError: If an error occurs while communicating with the Firebase Project
                Management Service. (For example, if the certificate_to_delete is not found.)
        )r:   Údelete_sha_certificate)r<   Úcertificate_to_deletes     r   rU   z!AndroidApp.delete_sha_certificateà   s   € ð �}‰}×3Ñ3Ð4IÓJÐJr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r=   Úpropertyr   rE   rJ   rM   rO   rR   rU   © r   r   r   r   Ž   sD   „ ñò ð ñó ðò
DòZòBò
@òSóKr   r   c                   ó8   — e Zd ZdZd„ Zed„ «       Zd„ Zd„ Zd„ Z	y)r   a  A reference to an iOS app within a Firebase project.

    Note: Unless otherwise specified, all methods defined in this class make an RPC.

    Please use the module-level function ``ios_app(app_id)`` to obtain instances of this class
    instead of instantiating it directly.
    c                 ó    — || _         || _        y r   r8   r;   s      r   r=   zIOSApp.__init__ù   r>   r   c                 ó   — | j                   S )zÙReturns the app ID of the iOS app to which this instance refers.

        Note: This method does not make an RPC.

        Returns:
            string: The app ID of the iOS app to which this instance refers.
        r@   rA   s    r   r   zIOSApp.app_idý   rB   r   c                 óL   — | j                   j                  | j                  «      S )a  Retrieves detailed information about this iOS app.

        Returns:
            IOSAppMetadata: An ``IOSAppMetadata`` instance.

        Raises:
            FirebaseError: If an error occurs while communicating with the Firebase Project
                Management Service.
        )r:   Úget_ios_app_metadatar9   rA   s    r   rE   zIOSApp.get_metadata  rP   r   c                 óN   — | j                   j                  | j                  |«      S )a`  Updates the display name attribute of this iOS app to the one given.

        Args:
            new_display_name: The new display name for this iOS app.

        Returns:
            NoneType: None.

        Raises:
            FirebaseError: If an error occurs while communicating with the Firebase Project
                Management Service.
        )r:   Úset_ios_app_display_namer9   rH   s     r   rJ   zIOSApp.set_display_name  s    € ð �}‰}×5Ñ5°d·l±lÐDTÓUÐUr   c                 óL   — | j                   j                  | j                  «      S )zBRetrieves the configuration artifact associated with this iOS app.)r:   Úget_ios_app_configr9   rA   s    r   rM   zIOSApp.get_config#  s   € à�}‰}×/Ñ/°·±Ó=Ð=r   N)
rW   rX   rY   rZ   r=   r[   r   rE   rJ   rM   r\   r   r   r   r   ð   s1   „ ñò ð ñó ðò
@òVó>r   r   c                   óL   — e Zd ZdZd„ Zed„ «       Zed„ «       Zed„ «       Zd„ Z	y)Ú_AppMetadataz9Detailed information about a Firebase Android or iOS app.c                 óŒ   — t        |d«      | _        t        |d«      | _        t        |d«      | _        t        |d«      | _        y )NÚnamer   r"   Ú
project_id)r1   Ú_namer9   r/   Ú_display_nameÚ_project_id)r<   ri   r   r"   rj   s        r   r=   z_AppMetadata.__init__+  s>   € ô /¨t°VÓ<ˆŒ
Ü0°¸ÓBˆŒÜ5°lÀNÓSˆÔÜ4°ZÀÓNˆÕr   c                 ó   — | j                   S )zšThe globally unique, Firebase-assigned identifier of this Android or iOS app.

        This ID is unique even across apps of different platforms.
        r@   rA   s    r   r   z_AppMetadata.app_id3  s   € ð �|‰|Ðr   c                 ó   — | j                   S )z�The user-assigned display name of this Android or iOS app.

        Note that the display name can be None if it has never been set by the user.)rl   rA   s    r   r"   z_AppMetadata.display_name;  s   € ð
 ×!Ñ!Ð!r   c                 ó   — | j                   S )zPThe permanent, globally unique, user-assigned ID of the parent Firebase project.)rm   rA   s    r   rj   z_AppMetadata.project_idB  s   € ð ×ÑÐr   c                 ó  — t        |t        | «      «      sy| j                  |j                  k(  xrO | j                  |j                  k(  xr4 | j                  |j                  k(  xr | j
                  |j
                  k(  S ©NF)r(   Útyperk   r   r"   rj   ©r<   Úothers     r   Ú__eq__z_AppMetadata.__eq__G  sp   € Ü˜%¤ d£Ô,Øà—
‘
˜eŸk™kÑ)ò `¨d¯k©k¸U¿\¹\Ñ.Iò `Ø×!Ñ! U×%7Ñ%7Ñ7ò`Ø<@¿O¹OÈu×O_ÑO_Ñ<_ð	ar   N)
rW   rX   rY   rZ   r=   r[   r   r"   rj   rv   r\   r   r   rg   rg   (  sM   „ ÙCòOð ñó ðð ñ"ó ð"ð ñ ó ð óar   rg   c                   óH   ‡ — e Zd ZdZˆ fd„Zed„ «       Zˆ fd„Zd„ Zd„ Z	ˆ xZ
S )ÚAndroidAppMetadataz;Android-specific information about an Android Firebase app.c                 óT   •— t         t        | �  ||||«       t        |d«      | _        y)ú3Clients should not instantiate this class directly.r!   N)Úsuperrx   r=   r1   Ú_package_name)r<   r!   ri   r   r"   rj   Ú	__class__s         €r   r=   zAndroidAppMetadata.__init__S  s(   ø€ äÔ  $Ñ0°°v¸|ÈZÔXÜ6°|À^ÓTˆÕr   c                 ó   — | j                   S )zTThe canonical package name of this Android app as it would appear in the Play Store.)r|   rA   s    r   r!   zAndroidAppMetadata.package_nameX  s   € ð ×!Ñ!Ð!r   c                 ó`   •— t         t        | �  |«      xr | j                  |j                  k(  S r   )r{   rx   rv   r!   ©r<   ru   r}   s     €r   rv   zAndroidAppMetadata.__eq__]  s1   ø€ ÜÔ(¨$Ñ6°uÓ=ò 8Ø×!Ñ! U×%7Ñ%7Ñ7ð	9r   c                 ó&   — | j                  |«       S r   ©rv   rt   s     r   Ú__ne__zAndroidAppMetadata.__ne__a  ó   € Ø—;‘;˜uÓ%Ð%Ð%r   c                 ó†   — t        | j                  | j                  | j                  | j                  | j
                  f«      S r   )Úhashrk   r   r"   rj   r!   rA   s    r   Ú__hash__zAndroidAppMetadata.__hash__d  s7   € ÜØ�Z‰Z˜Ÿ™ d×&7Ñ&7¸¿¹È$×J[ÑJ[Ð\ó^ð 	^r   )rW   rX   rY   rZ   r=   r[   r!   rv   rƒ   r‡   Ú__classcell__©r}   s   @r   rx   rx   P  s0   ø„ ÙEôUð
 ñ"ó ð"ô9ò&ö^r   rx   c                   óH   ‡ — e Zd ZdZˆ fd„Zed„ «       Zˆ fd„Zd„ Zd„ Z	ˆ xZ
S )ÚIOSAppMetadataz3iOS-specific information about an iOS Firebase app.c                 óT   •— t         t        | �  ||||«       t        |d«      | _        y)rz   r%   N)r{   r‹   r=   r1   Ú
_bundle_id)r<   r%   ri   r   r"   rj   r}   s         €r   r=   zIOSAppMetadata.__init__l  s&   ø€ äŒn˜dÑ,¨T°6¸<ÈÔTÜ3°I¸{ÓKˆ�r   c                 ó   — | j                   S )zOThe canonical bundle ID of this iOS app as it would appear in the iOS AppStore.)r�   rA   s    r   r%   zIOSAppMetadata.bundle_idq  s   € ð �‰Ðr   c                 ó`   •— t         t        | �  |«      xr | j                  |j                  k(  S r   )r{   r‹   rv   r%   r€   s     €r   rv   zIOSAppMetadata.__eq__v  s'   ø€ Ü”^ TÑ1°%Ó8Ò^¸T¿^¹^ÈuÏÉÑ=^Ð^r   c                 ó&   — | j                  |«       S r   r‚   rt   s     r   rƒ   zIOSAppMetadata.__ne__y  r„   r   c                 ó†   — t        | j                  | j                  | j                  | j                  | j
                  f«      S r   )r†   rk   r   r"   rj   r%   rA   s    r   r‡   zIOSAppMetadata.__hash__|  s1   € Ü�T—Z‘Z §¡¨d×.?Ñ.?ÀÇÁÐRV×R`ÑR`ÐaÓbÐbr   )rW   rX   rY   rZ   r=   r[   r%   rv   rƒ   r‡   rˆ   r‰   s   @r   r‹   r‹   i  s1   ø„ Ù=ôLð
 ñó ðô_ò&öcr   r‹   c                   óª   — e Zd ZdZdZdZ ej                  d«      Z ej                  d«      Z	dd„Z
ed„ «       Zed	„ «       Zed
„ «       Zd„ Zd„ Zd„ Zy)ÚSHACertificatezIRepresents a SHA-1 or SHA-256 certificate associated with an Android app.ÚSHA_1ÚSHA_256z^[0-9A-Fa-f]{40}$z^[0-9A-Fa-f]{64}$Nc                 óT  — t        |d«       t        |d«       || _        |j                  «       | _        t
        j                  j                  |«      rt
        j                  | _	        yt
        j                  j                  |«      rt
        j                  | _	        yt        d«      ‚)aú  Creates a new SHACertificate instance.

        Args:
            sha_hash: A string; the certificate hash for the Android app.
            name: The fully qualified resource name of this certificate; note that this field should
                be omitted if the instance is being constructed for the purpose of calling the
                add_sha_certificate() method on an ``AndroidApp``.

        Raises:
            ValueError: If the sha_hash is not a valid SHA-1 or SHA-256 certificate hash.
        Úsha_hashri   zHThe supplied certificate hash is neither a valid SHA-1 nor SHA_256 hash.N)r1   r3   rk   ÚlowerÚ	_sha_hashr“   Ú	_SHA_1_REÚmatchr”   Ú
_cert_typeÚ_SHA_256_REr•   r*   )r<   r—   ri   s      r   r=   zSHACertificate.__init__‰  s�   € ô 	" (¨JÔ7Ü)¨$°Ô7ØˆŒ
Ø!Ÿ™Ó)ˆŒÜ×#Ñ#×)Ñ)¨(Ô3Ü,×2Ñ2ˆD�OÜ×'Ñ'×-Ñ-¨hÔ7Ü,×4Ñ4ˆD�OäØZó\ð \r   c                 ó   — | j                   S )záReturns the fully qualified resource name of this certificate, if known.

        Returns:
            string: The fully qualified resource name of this certificate, if known; otherwise, the
            empty string.
        )rk   rA   s    r   ri   zSHACertificate.name¡  s   € ð �z‰zÐr   c                 ó   — | j                   S )zbReturns the certificate hash.

        Returns:
            string: The certificate hash.
        )r™   rA   s    r   r—   zSHACertificate.sha_hash«  s   € ð �~‰~Ðr   c                 ó   — | j                   S )zˆReturns the type of the SHA certificate encoded in the hash.

        Returns:
            string: One of 'SHA_1' or 'SHA_256'.
        )rœ   rA   s    r   Ú	cert_typezSHACertificate.cert_type´  s   € ð �‰Ðr   c                 óÂ   — t        |t        «      sy| j                  |j                  k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S rr   )r(   r“   ri   r—   r¡   rt   s     r   rv   zSHACertificate.__eq__½  sM   € Ü˜%¤Ô0ØØ—	‘	˜UŸZ™ZÑ'ò 2¨D¯M©M¸U¿^¹^Ñ,Kò 2Ø—‘ %§/¡/Ñ1ð	3r   c                 ó&   — | j                  |«       S r   r‚   rt   s     r   rƒ   zSHACertificate.__ne__Ã  r„   r   c                 óZ   — t        | j                  | j                  | j                  f«      S r   )r†   ri   r—   r¡   rA   s    r   r‡   zSHACertificate.__hash__Æ  s    € Ü�T—Y‘Y §¡¨t¯~©~Ð>Ó?Ð?r   r   )rW   rX   rY   rZ   r”   r•   ÚreÚcompilerš   r�   r=   r[   ri   r—   r¡   rv   rƒ   r‡   r\   r   r   r“   r“   €  sƒ   „ ÙSà€EØ€Gà�—
‘
Ð.Ó/€IØ�"—*‘*Ð0Ó1€Kó\ð0 ñó ðð ñó ðð ñó ðò3ò&ó@r   r“   c                   óÀ   — e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd"d„Zd"d„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z d"d „Z!d"d!„Z"y)#r   zNProvides methods for interacting with the Firebase Project Management Service.zhttps://firebase.googleapis.coméd   é   g      à?g      ø?ÚandroidAppsÚpackageNameÚiosAppsÚbundleIdc                 ób  — |j                   }|st        d«      ‚|| _        dj                  t        j
                  «      }|j                  j                  dt        j                  «      }t        j                  |j                  j                  «       t        j                  d|i|¬«      | _        y )NzÐProject ID is required to access the Firebase Project Management Service. Either set the projectId option, or use service account credentials. Alternatively, set the GOOGLE_CLOUD_PROJECT environment variable.zPython/Admin/{0}ÚhttpTimeoutzX-Client-Version)Ú
credentialÚbase_urlÚheadersÚtimeout)rj   r*   rm   r+   Úfirebase_adminÚ__version__ÚoptionsÚgetr   ÚDEFAULT_TIMEOUT_SECONDSÚJsonHttpClientr°   Úget_credentialr   ÚBASE_URLÚ_client)r<   r   rj   Úversion_headerr³   s        r   r=   z"_ProjectManagementService.__init__Ø  s“   € Ø—^‘^ˆ
ÙÜðAóBð Bð &ˆÔØ+×2Ñ2´>×3MÑ3MÓNˆØ—+‘+—/‘/ -´×1UÑ1UÓVˆÜ#×2Ñ2Ø—~‘~×4Ñ4Ó6Ü.×7Ñ7Ø'¨Ð8Øô	ˆ�r   c                 ól   — | j                  t        j                  t        j                  t        |¬«      S ©N)Úplatform_resource_nameÚidentifier_nameÚmetadata_classr   )Ú_get_app_metadatar   ÚANDROID_APPS_RESOURCE_NAMEÚANDROID_APP_IDENTIFIER_NAMErx   ©r<   r   s     r   rD   z2_ProjectManagementService.get_android_app_metadataè  s2   € Ø×%Ñ%Ü#<×#WÑ#WÜ5×QÑQÜ-Øð	 &ó ð 	r   c                 ól   — | j                  t        j                  t        j                  t        |¬«      S r¿   )rÃ   r   ÚIOS_APPS_RESOURCE_NAMEÚIOS_APP_IDENTIFIER_NAMEr‹   rÆ   s     r   ra   z._ProjectManagementService.get_ios_app_metadataï  s2   € Ø×%Ñ%Ü#<×#SÑ#SÜ5×MÑMÜ)Øð	 &ó ð 	r   c                 óº   — t        |d«       dj                  ||«      }| j                  d|«      } |||   |d   |d   |j                  d«      xs d|d   ¬	«      S )
z;Retrieves detailed information about an Android or iOS app.r   z/v1beta1/projects/-/{0}/{1}r·   ri   ÚappIdÚdisplayNameNÚ	projectId)ri   r   r"   rj   )r1   r+   Ú_make_requestr·   )r<   rÀ   rÁ   rÂ   r   ÚpathÚresponses          r   rÃ   z+_ProjectManagementService._get_app_metadataö  so   € ä! &¨(Ô3Ø,×3Ñ3Ð4JÈFÓSˆØ×%Ñ% e¨TÓ2ˆÙØ�_Ñ%Ø˜&Ñ!Ø˜GÑ$Ø!Ÿ™ mÓ4Ò<¸Ø Ñ,ô.ð 	.r   c                 óH   — | j                  ||t        j                  ¬«       y ©N)r   rI   rÀ   )Ú_set_display_namer   rÄ   ©r<   r   rI   s      r   rG   z6_ProjectManagementService.set_android_app_display_name  s%   € Ø×ÑØØ-Ü#<×#WÑ#Wð 	õ 	Yr   c                 óH   — | j                  ||t        j                  ¬«       y rÒ   )rÓ   r   rÈ   rÔ   s      r   rc   z2_ProjectManagementService.set_ios_app_display_name  s%   € Ø×ÑØØ-Ü#<×#SÑ#Sð 	õ 	Ur   c                 óX   — dj                  ||«      }d|i}| j                  d||¬«       y)z/Sets the display name of an Android or iOS app.z2/v1beta1/projects/-/{0}/{1}?updateMask=displayNamerÌ   Úpatch©ÚjsonN)r+   rÎ   )r<   r   rI   rÀ   rÏ   Úrequest_bodys         r   rÓ   z+_ProjectManagementService._set_display_name  s7   € àC×JÑJØ" Fó,ˆà%Ð'7Ð8ˆØ×Ñ˜7 D¨|ÐÕ<r   c                 óL   — | j                  t        j                  t        ¬«      S ©N)rÀ   Ú	app_class)Ú
_list_appsr   rÄ   r   rA   s    r   r   z+_ProjectManagementService.list_android_apps  s$   € Ø�‰Ü#<×#WÑ#WÜ ð ó "ð 	"r   c                 óL   — | j                  t        j                  t        ¬«      S rÜ   )rÞ   r   rÈ   r   rA   s    r   r   z'_ProjectManagementService.list_ios_apps  s$   € Ø�‰Ü#<×#SÑ#SÜð ó ð 	r   c                 ó’  ‡ ‡— dj                  ‰ j                  |t        j                  «      }‰ j	                  d|«      }g }	 |j                  d«      }|s	 |S |j                  ˆˆ fd„|D «       «       |j                  d«      }|s	 |S dj                  ‰ j                  ||t        j                  «      }‰ j	                  d|«      }Œ†)z>Lists all the Android or iOS apps within the Firebase project.z&/v1beta1/projects/{0}/{1}?pageSize={2}r·   Úappsc              3   ó8   •K  — | ]  } ‰|d    ‰¬«      –— Œ y­w)rË   r   Nr\   )Ú.0r   rÝ   r<   s     €€r   ú	<genexpr>z7_ProjectManagementService._list_apps.<locals>.<genexpr>+  s   øè ø€ ÒZÈc™Y¨c°'©lÀD×IÐIÑZùs   ƒÚnextPageTokenz4/v1beta1/projects/{0}/{1}?pageToken={2}&pageSize={3})r+   rm   r   ÚMAXIMUM_LIST_APPS_PAGE_SIZErÎ   r·   Úextend)r<   rÀ   rÝ   rÏ   rÐ   Ú	apps_listrá   Únext_page_tokens   ` `     r   rÞ   z$_ProjectManagementService._list_apps  sÙ   ù€ à7×>Ñ>Ø×ÑØ"Ü%×AÑAóCˆð ×%Ñ% e¨TÓ2ˆØˆ	ØØ—<‘< Ó'ˆDÙØð Ðð ×ÑÔZÐUYÔZÔZØ&Ÿl™l¨?Ó;ˆOÙ"Øð Ðð J×PÑPØ× Ñ Ø&ØÜ)×EÑEó	GˆDð
 ×)Ñ)¨%°Ó6ˆHð r   Nc                 ón   — | j                  t        j                  t        j                  ||t        ¬«      S ©N)rÀ   rÁ   Ú
identifierr"   rÝ   )Ú_create_appr   rÄ   rÅ   r   )r<   r!   r"   s      r   r    z,_ProjectManagementService.create_android_app8  s5   € Ø×ÑÜ#<×#WÑ#WÜ5×QÑQØ#Ø%Ü ð  ó "ð 	"r   c                 ón   — | j                  t        j                  t        j                  ||t        ¬«      S rë   )rí   r   rÈ   rÉ   r   )r<   r%   r"   s      r   r$   z(_ProjectManagementService.create_ios_app@  s5   € Ø×ÑÜ#<×#SÑ#SÜ5×MÑMØ Ø%Üð  ó ð 	r   c                 óÖ   — t        |d«       dj                  | j                  |«      }||i}|r||d<   | j                  d||¬«      }|d   }	| j	                  |	«      }
 ||
d   | ¬«      S )	zCreates an Android or iOS app.r"   z/v1beta1/projects/{0}/{1}rÌ   ÚpostrØ   ri   rË   r   )r/   r+   rm   rÎ   Ú_poll_app_creation)r<   rÀ   rÁ   rì   r"   rÝ   rÏ   rÚ   rÐ   Úoperation_nameÚpoll_responses              r   rí   z%_ProjectManagementService._create_appH  s�   € ô 	! ¨~Ô>Ø*×1Ñ1°$×2BÑ2BÐDZÓ[ˆØ'¨Ð4ˆÙØ*6ˆL˜Ñ'Ø×%Ñ% f¨d¸Ð%ÓFˆØ! &Ñ)ˆØ×/Ñ/°Ó?ˆÙ ¨gÑ 6ÀÔEÐEr   c                 óº  — t        t        j                  «      D ]«  }t        t        j                  |«      }|t        j
                  z  }t        j                  |«       dj                  |«      }| j                  d|«      \  }}|j                  d«      }|sŒ|j                  d«      }	|	r|	c S t        j                  d|¬«      ‚ t        j                  d«      ‚)zVPolls the Long-Running Operation repeatedly until it is done with exponential backoff.z/v1/{0}r·   ÚdonerÐ   z;Polling finished, but the operation terminated in an error.)Úhttp_responsezPolling deadline exceeded.)Úranger   ÚMAXIMUM_POLLING_ATTEMPTSÚpowÚPOLL_EXPONENTIAL_BACKOFF_FACTORÚPOLL_BASE_WAIT_TIME_SECONDSÚtimeÚsleepr+   Ú_body_and_responser·   r   ÚUnknownErrorÚDeadlineExceededError)
r<   rò   Úcurrent_attemptÚdelay_factorÚwait_time_secondsrÏ   ró   rö   rõ   rÐ   s
             r   rñ   z,_ProjectManagementService._poll_app_creationZ  sÑ   € ä$Ô%>×%WÑ%WÓXò 	1ˆOÜÜ)×IÑIÈ?ó\ˆLà ,Ô/H×/dÑ/dÑ dÐÜ�J‰JÐ(Ô)Ø×#Ñ# NÓ3ˆDØ+/×+BÑ+BÀ5È$Ó+OÑ(ˆM˜=Ø ×$Ñ$ VÓ,ˆDÚØ(×,Ñ,¨ZÓ8�ÙØ#’Oä ×-Ñ-ØQØ"/ô1ð 1ð	1ô  ×.Ñ.Ð/KÓLÐLr   c                 óD   — | j                  t        j                  |¬«      S ©N)rÀ   r   )Ú_get_app_configr   rÄ   rÆ   s     r   rL   z0_ProjectManagementService.get_android_app_confign  s&   € Ø×#Ñ#Ü#<×#WÑ#WØð $ó ð 	r   c                 óD   — | j                  t        j                  |¬«      S r  )r  r   rÈ   rÆ   s     r   re   z,_ProjectManagementService.get_ios_app_configs  s(   € Ø×#Ñ#Ü#<×#SÑ#SÐ\bð $ó dð 	dr   c                 óš   — dj                  ||«      }| j                  d|«      }t        j                  |d   «      j	                  d¬«      S )Nz"/v1beta1/projects/-/{0}/{1}/configr·   ÚconfigFileContentszutf-8)Úencoding)r+   rÎ   Úbase64Ústandard_b64decodeÚdecode)r<   rÀ   r   rÏ   rÐ   s        r   r  z)_ProjectManagementService._get_app_configw  sP   € Ø3×:Ñ:Ð;QÐSYÓZˆØ×%Ñ% e¨TÓ2ˆô ×(Ñ(¨Ð2FÑ)GÓH×OÑOÐY`ÐOÓaÐar   c                 ó¾   — dj                  |«      }| j                  d|«      }|j                  d«      xs g }|D �cg c]  }t        |d   |d   ¬«      ‘Œ c}S c c}w )Nú'/v1beta1/projects/-/androidApps/{0}/shar·   ÚcertificatesÚshaHashri   )r—   ri   )r+   rÎ   r·   r“   )r<   r   rÏ   rÐ   Ú	cert_listÚcerts         r   rO   z._ProjectManagementService.get_sha_certificates~  s[   € Ø8×?Ñ?ÀÓGˆØ×%Ñ% e¨TÓ2ˆØ—L‘L Ó0Ò6°Bˆ	ØXaÖbÐPT”¨¨Y©¸dÀ6¹lÖKÒbÐbùÒbs   ½Ac                 óœ   — dj                  |«      }t        |d«      j                  }|j                  }||dœ}| j	                  d||¬«       y )Nr  rS   )r  ÚcertTyperð   rØ   )r+   r5   r—   r¡   rÎ   )r<   r   rS   rÏ   r—   r¡   rÚ   s          r   rR   z-_ProjectManagementService.add_sha_certificate„  sP   € Ø8×?Ñ?ÀÓGˆÜ"Ð#5Ð7KÓL×UÑUˆØ&×0Ñ0ˆ	Ø#+¸ÑCˆØ×Ñ˜6 4¨lÐÕ;r   c                 óv   — t        |d«      j                  }dj                  |«      }| j                  d|«       y )NrV   z/v1beta1/{0}Údelete)r5   ri   r+   rÎ   )r<   rV   ri   rÏ   s       r   rU   z0_ProjectManagementService.delete_sha_certificate‹  s6   € ÜÐ4Ð6MÓN×SÑSˆØ×$Ñ$ TÓ*ˆØ×Ñ˜8 TÕ*r   c                 ó2   — | j                  |||«      \  }}|S r   )rþ   )r<   ÚmethodÚurlrÙ   ÚbodyÚ_s         r   rÎ   z'_ProjectManagementService._make_request�  s   € Ø×)Ñ)¨&°#°tÓ<‰ˆˆaØˆr   c                 ó´   — 	 | j                   j                  |||¬«      S # t        j                  j                  $ r}t        j                  |«      ‚d }~ww xY w)N)r  r  rÙ   )r¼   Úbody_and_responseÚrequestsr   ÚRequestExceptionr   Ú#handle_platform_error_from_requests)r<   r  r  rÙ   Úerrors        r   rþ   z,_ProjectManagementService._body_and_response”  sS   € ð	DØ—<‘<×1Ñ1¸ÀSÈtÐ1ÓTÐTøÜ×"Ñ"×3Ñ3ò 	DÜ×<Ñ<¸UÓCÐCûð	Dús   ‚   A½AÁAr   )#rW   rX   rY   rZ   r»   ræ   rø   rû   rú   rÄ   rÅ   rÈ   rÉ   r=   rD   ra   rÃ   rG   rc   rÓ   r   r   rÞ   r    r$   rí   rñ   rL   re   r  rO   rR   rU   rÎ   rþ   r\   r   r   r   r   Ê  s°   „ ÙXà0€HØ"%ÐØ ÐØ"%ÐØ&)Ð#à!.ÐØ"/ÐØ&ÐØ(Ðòò òò
.òYòUò=ò"ò
ò
ó2"óòFò$Mò(ò
dòbòcò<ò+ó
ôDr   r   r   )NN)rZ   r  r¥   rü   r  r´   r   r   r   r
   r   r   r   r   r   r    r$   r/   r1   r3   r5   r   r   rg   rx   r‹   r“   r   r\   r   r   ú<module>r#     sÌ   ðñó
 Û 	Û ã ã Ý %Ý 'Ý !ð !6Ð òaó
Só
Oó
Dó	@ó_óXòAòKò6ò÷_Kñ _K÷D5>ñ 5>÷p$añ $aôP^˜ô ^ô2c�\ô c÷.G@ñ G@÷TNDò NDr   