o
    ×èFhŸa  ã                   @   s"  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d„ Z
d+d	d
„Zd+dd„Zd+dd„Zd+dd„Zd,dd„Zd,dd„Zdd„ Zdd„ Zdd„ Zdd„ ZG dd„ dƒZG dd „ d ƒZG d!d"„ d"ƒZG d#d$„ d$eƒZG d%d&„ d&eƒZG d'd(„ d(ƒZG d)d*„ d*ƒZdS )-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                 C   s   t  | tt¡S ©N)r   Úget_app_serviceÚ_PROJECT_MANAGEMENT_ATTRIBUTEÚ_ProjectManagementService©Úapp© r   úZ/var/www/html/loop/nvenv/lib/python3.10/site-packages/firebase_admin/project_management.pyÚ_get_project_management_service#   s   r   c                 C   ó   t | t|ƒd�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   r   r   r   Úandroid_app'   ó   
r   c                 C   r   )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   r   r   r   Úios_app4   r   r   c                 C   ó   t | ƒ ¡ 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
   r   r   r   r   A   s   
r   c                 C   r   )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
   r   r   r   r   N   s   	r   c                 C   ó   t |ƒ | |¡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   r   r   r   r   Z   ó   r   c                 C   r   )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   r   r   r   r!   h   r    r!   c                 C   s$   | d u s	t | tƒr| S td |¡ƒ‚)Nz{0} must be a string.©Ú
isinstanceÚstrÚ
ValueErrorÚformat©ÚobjÚ
field_namer   r   r   Ú_check_is_string_or_nonev   s   r+   c                 C   s    t | tƒr	| r	| S td |¡ƒ‚)Nz{0} must be a non-empty string.r#   r(   r   r   r   Ú_check_is_nonempty_string|   s   r,   c                 C   s   | d u rd S t | |ƒS r   )r,   r(   r   r   r   Ú!_check_is_nonempty_string_or_none‚   s   
r-   c                 C   s   | d u rt d |¡ƒ‚| S )Nz{0} cannot be None.)r&   r'   r(   r   r   r   Ú_check_not_noneˆ   s   r.   c                   @   sT   e Zd ZdZdd„ Zedd„ ƒZdd„ Zdd	„ Zd
d„ Z	dd„ Z
dd„ Zdd„ ZdS )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                 C   ó   || _ || _d S r   ©Ú_app_idÚ_service©Úselfr   r   r   r   r   Ú__init__—   ó   
zAndroidApp.__init__c                 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.
        ©r1   ©r4   r   r   r   r   ›   ó   	zAndroidApp.app_idc                 C   ó   | 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.
        )r2   Úget_android_app_metadatar1   r9   r   r   r   Úget_metadata¦   ó   
zAndroidApp.get_metadatac                 C   ó   | 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.
        )r2   Úset_android_app_display_namer1   ©r4   Únew_display_namer   r   r   Úset_display_name²   ó   zAndroidApp.set_display_namec                 C   r;   )zFRetrieves the configuration artifact associated with this Android app.)r2   Úget_android_app_configr1   r9   r   r   r   Ú
get_configÁ   ó   zAndroidApp.get_configc                 C   r;   )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.
        )r2   Úget_sha_certificatesr1   r9   r   r   r   rH   Å   r>   zAndroidApp.get_sha_certificatesc                 C   r?   )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.)
        )r2   Úadd_sha_certificater1   )r4   Úcertificate_to_addr   r   r   rI   Ñ   rD   zAndroidApp.add_sha_certificatec                 C   s   | 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.)
        )r2   Údelete_sha_certificate)r4   Úcertificate_to_deleter   r   r   rK   à   s   z!AndroidApp.delete_sha_certificateN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r5   Úpropertyr   r=   rC   rF   rH   rI   rK   r   r   r   r   r   Ž   s    

r   c                   @   s<   e Zd ZdZdd„ Zedd„ ƒZdd„ Zdd	„ Zd
d„ Z	dS )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                 C   r/   r   r0   r3   r   r   r   r5   ù   r6   zIOSApp.__init__c                 C   r7   )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.
        r8   r9   r   r   r   r   ý   r:   zIOSApp.app_idc                 C   r;   )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.
        )r2   Úget_ios_app_metadatar1   r9   r   r   r   r=     r>   zIOSApp.get_metadatac                 C   r?   )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.
        )r2   Úset_ios_app_display_namer1   rA   r   r   r   rC     rD   zIOSApp.set_display_namec                 C   r;   )zBRetrieves the configuration artifact associated with this iOS app.)r2   Úget_ios_app_configr1   r9   r   r   r   rF   #  rG   zIOSApp.get_configN)
rM   rN   rO   rP   r5   rQ   r   r=   rC   rF   r   r   r   r   r   ð   s    

r   c                   @   sD   e Zd ZdZdd„ Zedd„ ƒZedd„ ƒZedd	„ ƒZd
d„ Z	dS )Ú_AppMetadataz9Detailed information about a Firebase Android or iOS app.c                 C   s4   t |dƒ| _t |dƒ| _t|dƒ| _t |dƒ| _d S )NÚnamer   r   Ú
project_id)r,   Ú_namer1   r+   Ú_display_nameÚ_project_id)r4   rV   r   r   rW   r   r   r   r5   +  s   z_AppMetadata.__init__c                 C   r7   )zšThe globally unique, Firebase-assigned identifier of this Android or iOS app.

        This ID is unique even across apps of different platforms.
        r8   r9   r   r   r   r   3  s   z_AppMetadata.app_idc                 C   r7   )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.)rY   r9   r   r   r   r   ;  s   z_AppMetadata.display_namec                 C   r7   )zPThe permanent, globally unique, user-assigned ID of the parent Firebase project.)rZ   r9   r   r   r   rW   B  ó   z_AppMetadata.project_idc                 C   sB   t |t| ƒƒs	dS | j|jko | j|jko | j|jko | j|jkS ©NF)r$   ÚtyperX   r   r   rW   ©r4   Úotherr   r   r   Ú__eq__G  s   
ÿ
ÿz_AppMetadata.__eq__N)
rM   rN   rO   rP   r5   rQ   r   r   rW   r`   r   r   r   r   rU   (  s    


rU   c                       óH   e Zd ZdZ‡ fdd„Zedd„ ƒZ‡ fdd„Zdd	„ Zd
d„ Z	‡  Z
S )ÚAndroidAppMetadataz;Android-specific information about an Android Firebase app.c                    ó&   t t| ƒ ||||¡ t|dƒ| _dS )ú3Clients should not instantiate this class directly.r   N)Úsuperrb   r5   r,   Ú_package_name)r4   r   rV   r   r   rW   ©Ú	__class__r   r   r5   S  ó   zAndroidAppMetadata.__init__c                 C   r7   )zTThe canonical package name of this Android app as it would appear in the Play Store.)rf   r9   r   r   r   r   X  r[   zAndroidAppMetadata.package_namec                    ó   t t| ƒ |¡o| j|jkS r   )re   rb   r`   r   r^   rg   r   r   r`   ]  s   
ÿzAndroidAppMetadata.__eq__c                 C   ó   |   |¡ S r   ©r`   r^   r   r   r   Ú__ne__a  ó   zAndroidAppMetadata.__ne__c                 C   ó   t | j| j| j| j| jfƒS r   )ÚhashrX   r   r   rW   r   r9   r   r   r   Ú__hash__d  s   ÿzAndroidAppMetadata.__hash__)rM   rN   rO   rP   r5   rQ   r   r`   rm   rq   Ú__classcell__r   r   rg   r   rb   P  s    
rb   c                       ra   )ÚIOSAppMetadataz3iOS-specific information about an iOS Firebase app.c                    rc   )rd   r"   N)re   rs   r5   r,   Ú
_bundle_id)r4   r"   rV   r   r   rW   rg   r   r   r5   l  ri   zIOSAppMetadata.__init__c                 C   r7   )zOThe canonical bundle ID of this iOS app as it would appear in the iOS AppStore.)rt   r9   r   r   r   r"   q  r[   zIOSAppMetadata.bundle_idc                    rj   r   )re   rs   r`   r"   r^   rg   r   r   r`   v  ó   zIOSAppMetadata.__eq__c                 C   rk   r   rl   r^   r   r   r   rm   y  rn   zIOSAppMetadata.__ne__c                 C   ro   r   )rp   rX   r   r   rW   r"   r9   r   r   r   rq   |  ru   zIOSAppMetadata.__hash__)rM   rN   rO   rP   r5   rQ   r"   r`   rm   rq   rr   r   r   rg   r   rs   i  s    
rs   c                   @   sr   e Zd ZdZdZdZe d¡Ze d¡Z	ddd„Z
ed	d
„ ƒZedd„ ƒZedd„ ƒZdd„ Zdd„ Zdd„ ZdS )Ú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                 C   s\   t |dƒ t|dƒ || _| ¡ | _tj |¡rtj| _	dS tj
 |¡r*tj| _	dS 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_hashrV   zHThe supplied certificate hash is neither a valid SHA-1 nor SHA_256 hash.N)r,   r-   rX   ÚlowerÚ	_sha_hashrv   Ú	_SHA_1_REÚmatchrw   Ú
_cert_typeÚ_SHA_256_RErx   r&   )r4   ry   rV   r   r   r   r5   ‰  s   


ÿzSHACertificate.__init__c                 C   r7   )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.
        )rX   r9   r   r   r   rV   ¡  s   zSHACertificate.namec                 C   r7   )zbReturns the certificate hash.

        Returns:
            string: The certificate hash.
        )r{   r9   r   r   r   ry   «  ó   zSHACertificate.sha_hashc                 C   r7   )zˆReturns the type of the SHA certificate encoded in the hash.

        Returns:
            string: One of 'SHA_1' or 'SHA_256'.
        )r~   r9   r   r   r   Ú	cert_type´  r€   zSHACertificate.cert_typec                 C   s2   t |tƒsdS | j|jko| j|jko| j|jkS r\   )r$   rv   rV   ry   r�   r^   r   r   r   r`   ½  s
   

ÿzSHACertificate.__eq__c                 C   rk   r   rl   r^   r   r   r   rm   Ã  rn   zSHACertificate.__ne__c                 C   s   t | j| j| jfƒS r   )rp   rV   ry   r�   r9   r   r   r   rq   Æ  s   zSHACertificate.__hash__r   )rM   rN   rO   rP   rw   rx   ÚreÚcompiler|   r   r5   rQ   rV   ry   r�   r`   rm   rq   r   r   r   r   rv   €  s     



	

rv   c                   @   sì   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d„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zd8d d!„Zd8d"d#„Zd$d%„ Zd&d'„ Zd(d)„ Zd*d+„ Zd,d-„ Zd.d/„ Zd0d1„ Zd2d3„ Z d8d4d5„Z!d8d6d7„Z"dS )9r	   zNProvides methods for interacting with the Firebase Project Management Service.zhttps://firebase.googleapis.coméd   é   g      à?g      ø?ÚandroidAppsÚpackageNameÚiosAppsÚbundleIdc                 C   sX   |j }|s	tdƒ‚|| _d tj¡}|j dtj	¡}tj
|j ¡ tjd|i|d�| _d S )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)rW   r&   rZ   r'   Úfirebase_adminÚ__version__ÚoptionsÚgetr   ÚDEFAULT_TIMEOUT_SECONDSÚJsonHttpClientr‹   Úget_credentialr	   ÚBASE_URLÚ_client)r4   r   rW   Úversion_headerrŽ   r   r   r   r5   Ø  s   ÿüz"_ProjectManagementService.__init__c                 C   ó   | j tjtjt|d�S ©N)Úplatform_resource_nameÚidentifier_nameÚmetadata_classr   )Ú_get_app_metadatar	   ÚANDROID_APPS_RESOURCE_NAMEÚANDROID_APP_IDENTIFIER_NAMErb   ©r4   r   r   r   r   r<   è  ó   üz2_ProjectManagementService.get_android_app_metadatac                 C   r™   rš   )rž   r	   ÚIOS_APPS_RESOURCE_NAMEÚIOS_APP_IDENTIFIER_NAMErs   r¡   r   r   r   rR   ï  r¢   z._ProjectManagementService.get_ios_app_metadatac                 C   sN   t |dƒ d ||¡}|  d|¡}||| |d |d | d¡p!d|d d	�S )
z;Retrieves detailed information about an Android or iOS app.r   z/v1beta1/projects/-/{0}/{1}r’   rV   ÚappIdÚdisplayNameNÚ	projectId)rV   r   r   rW   )r,   r'   Ú_make_requestr’   )r4   r›   rœ   r�   r   ÚpathÚresponser   r   r   rž   ö  s   
ûz+_ProjectManagementService._get_app_metadatac                 C   ó   | j ||tjd� d S ©N)r   rB   r›   )Ú_set_display_namer	   rŸ   ©r4   r   rB   r   r   r   r@     ó
   
ýz6_ProjectManagementService.set_android_app_display_namec                 C   r«   r¬   )r­   r	   r£   r®   r   r   r   rS     r¯   z2_ProjectManagementService.set_ios_app_display_namec                 C   s(   d  ||¡}d|i}| jd||d� dS )z/Sets the display name of an Android or iOS app.z2/v1beta1/projects/-/{0}/{1}?updateMask=displayNamer¦   Úpatch©ÚjsonN)r'   r¨   )r4   r   rB   r›   r©   Úrequest_bodyr   r   r   r­     s
   ÿz+_ProjectManagementService._set_display_namec                 C   ó   | j tjtd�S ©N)r›   Ú	app_class)Ú
_list_appsr	   rŸ   r   r9   r   r   r   r     ó   þz+_ProjectManagementService.list_android_appsc                 C   r´   rµ   )r·   r	   r£   r   r9   r   r   r   r     r¸   z'_ProjectManagementService.list_ios_appsc                    sˆ   d  ˆj|tj¡}ˆ d|¡}g }	 | d¡}|s	 |S | ‡ ‡fdd„|D ƒ¡ | d¡}|s3	 |S d  ˆj||tj¡}ˆ d|¡}q)	z>Lists all the Android or iOS apps within the Firebase project.z&/v1beta1/projects/{0}/{1}?pageSize={2}r’   TÚappsc                 3   s    � | ]}ˆ |d  ˆd�V  qdS )r¥   r   Nr   )Ú.0r   ©r¶   r4   r   r   Ú	<genexpr>+  s   € z7_ProjectManagementService._list_apps.<locals>.<genexpr>ÚnextPageTokenz4/v1beta1/projects/{0}/{1}?pageToken={2}&pageSize={3})r'   rZ   r	   ÚMAXIMUM_LIST_APPS_PAGE_SIZEr¨   r’   Úextend)r4   r›   r¶   r©   rª   Ú	apps_listr¹   Únext_page_tokenr   r»   r   r·     s2   ý
õ
úüòz$_ProjectManagementService._list_appsNc                 C   ó   | j tjtj||td�S ©N)r›   rœ   Ú
identifierr   r¶   )Ú_create_appr	   rŸ   r    r   )r4   r   r   r   r   r   r   8  ó   ûz,_ProjectManagementService.create_android_appc                 C   rÂ   rÃ   )rÅ   r	   r£   r¤   r   )r4   r"   r   r   r   r   r!   @  rÆ   z(_ProjectManagementService.create_ios_appc                 C   s^   t |dƒ d | j|¡}||i}|r||d< | jd||d�}|d }	|  |	¡}
||
d | d�S )	zCreates an Android or iOS app.r   z/v1beta1/projects/{0}/{1}r¦   Úpostr±   rV   r¥   r   )r+   r'   rZ   r¨   Ú_poll_app_creation)r4   r›   rœ   rÄ   r   r¶   r©   r³   rª   Úoperation_nameÚpoll_responser   r   r   rÅ   H  s   

z%_ProjectManagementService._create_appc           
      C   s†   t tjƒD ]8}ttj|ƒ}|tj }t |¡ d |¡}|  	d|¡\}}| 
d¡}|r=| 
d¡}	|	r6|	  S tjd|d�‚qt 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)
r4   rÉ   Úcurrent_attemptÚdelay_factorÚwait_time_secondsr©   rÊ   rÌ   rË   rª   r   r   r   rÈ   Z  s&   ÿ




þû
z,_ProjectManagementService._poll_app_creationc                 C   ó   | j tj|d�S ©N)r›   r   )Ú_get_app_configr	   rŸ   r¡   r   r   r   rE   n  r¸   z0_ProjectManagementService.get_android_app_configc                 C   rÚ   rÛ   )rÜ   r	   r£   r¡   r   r   r   rT   s  s   ÿz,_ProjectManagementService.get_ios_app_configc                 C   s.   d  ||¡}|  d|¡}t |d ¡jdd�S )Nz"/v1beta1/projects/-/{0}/{1}/configr’   ÚconfigFileContentszutf-8)Úencoding)r'   r¨   Úbase64Ústandard_b64decodeÚdecode)r4   r›   r   r©   rª   r   r   r   rÜ   w  s   z)_ProjectManagementService._get_app_configc                 C   s2   d  |¡}|  d|¡}| d¡pg }dd„ |D ƒS )Nú'/v1beta1/projects/-/androidApps/{0}/shar’   Úcertificatesc                 S   s    g | ]}t |d  |d d�‘qS )ÚshaHashrV   )ry   rV   )rv   )rº   Úcertr   r   r   Ú
<listcomp>‚  s     zB_ProjectManagementService.get_sha_certificates.<locals>.<listcomp>)r'   r¨   r’   )r4   r   r©   rª   Ú	cert_listr   r   r   rH   ~  s   
z._ProjectManagementService.get_sha_certificatesc                 C   s:   d  |¡}t|dƒj}|j}||dœ}| jd||d� d S )Nrâ   rJ   )rä   ÚcertTyperÇ   r±   )r'   r.   ry   r�   r¨   )r4   r   rJ   r©   ry   r�   r³   r   r   r   rI   „  s
   

z-_ProjectManagementService.add_sha_certificatec                 C   s&   t |dƒj}d |¡}|  d|¡ d S )NrL   z/v1beta1/{0}Údelete)r.   rV   r'   r¨   )r4   rL   rV   r©   r   r   r   rK   ‹  s   
z0_ProjectManagementService.delete_sha_certificatec                 C   s   |   |||¡\}}|S r   )rÔ   )r4   ÚmethodÚurlr²   ÚbodyÚ_r   r   r   r¨   �  s   z'_ProjectManagementService._make_requestc              
   C   s<   z
| j j|||d�W S  tjjy } zt |¡‚d }~ww )N)rê   rë   r²   )r—   Úbody_and_responseÚrequestsr   ÚRequestExceptionr   Ú#handle_platform_error_from_requests)r4   rê   rë   r²   Úerrorr   r   r   rÔ   ”  s   
€ÿz,_ProjectManagementService._body_and_responser   )#rM   rN   rO   rP   r–   r¾   rÎ   rÑ   rÐ   rŸ   r    r£   r¤   r5   r<   rR   rž   r@   rS   r­   r   r   r·   r   r!   rÅ   rÈ   rE   rT   rÜ   rH   rI   rK   r¨   rÔ   r   r   r   r   r	   Ê  sB    


r	   r   )NN)rP   rß   r‚   rÒ   rï   r�   r   r   r   r   r   r   r   r   r   r   r!   r+   r,   r-   r.   r   r   rU   rb   rs   rv   r	   r   r   r   r   Ú<module>   s8   





b8(J