o
    0=j«`  ã                   @   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)Ú_utilsZ_project_managementc                 C   s   t  | tt¡S ©N)r   Zget_app_serviceÚ_PROJECT_MANAGEMENT_ATTRIBUTEÚ_ProjectManagementService©Úapp© r
   úkC:\Users\psant\Downloads\Anu Raj Backend\school\venv\Lib\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ÚserviceN)Ú
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   N)Ú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.
    N)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.
    N)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.
    N)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.
    N)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 must be a string.©Ú
isinstanceÚstrÚ
ValueError©ÚobjÚ
field_namer
   r
   r   Ú_check_is_string_or_nonev   s   r(   c                 C   s    t | tƒr	| r	| S t|› d�ƒ‚)Nz 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 cannot be None.)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.
        N©r.   ©r1   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.
        N)r/   Úget_android_app_metadatar.   r6   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.
        N)r/   Úset_android_app_display_namer.   ©r1   Únew_display_namer
   r
   r   Úset_display_name²   ó   zAndroidApp.set_display_namec                 C   r8   )zFRetrieves the configuration artifact associated with this Android app.N)r/   Úget_android_app_configr.   r6   r
   r
   r   Ú
get_configÁ   ó   zAndroidApp.get_configc                 C   r8   )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.
        N)r/   Úget_sha_certificatesr.   r6   r
   r
   r   rE   Å   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.)
        N)r/   Úadd_sha_certificater.   )r1   Úcertificate_to_addr
   r
   r   rF   Ñ   rA   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.)
        N)r/   Údelete_sha_certificate)r1   Úcertificate_to_deleter
   r
   r   rH   à   s   z!AndroidApp.delete_sha_certificateN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r2   Úpropertyr   r:   r@   rC   rE   rF   rH   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   r-   r0   r
   r
   r   r2   ù   r3   zIOSApp.__init__c                 C   r4   )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.
        Nr5   r6   r
   r
   r   r   ý   r7   zIOSApp.app_idc                 C   r8   )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.
        N)r/   Úget_ios_app_metadatar.   r6   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.
        N)r/   Úset_ios_app_display_namer.   r>   r
   r
   r   r@     rA   zIOSApp.set_display_namec                 C   r8   )zBRetrieves the configuration artifact associated with this iOS app.N)r/   Úget_ios_app_configr.   r6   r
   r
   r   rC   #  rD   zIOSApp.get_configN)
rJ   rK   rL   rM   r2   rN   r   r:   r@   rC   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)   Ú_namer.   r(   Ú_display_nameÚ_project_id)r1   rS   r   r   rT   r
   r
   r   r2   +  s   z_AppMetadata.__init__c                 C   r4   )zšThe globally unique, Firebase-assigned identifier of this Android or iOS app.

        This ID is unique even across apps of different platforms.
        Nr5   r6   r
   r
   r   r   3  s   z_AppMetadata.app_idc                 C   r4   )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.N)rV   r6   r
   r
   r   r   ;  s   z_AppMetadata.display_namec                 C   r4   )zPThe permanent, globally unique, user-assigned ID of the parent Firebase project.N)rW   r6   r
   r
   r   rT   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"   ÚtyperU   r   r   rT   ©r1   Úotherr
   r
   r   Ú__eq__G  s   
ÿ
ÿz_AppMetadata.__eq__N)
rJ   rK   rL   rM   r2   rN   r   r   rT   r]   r
   r
   r
   r   rR   (  s    


rR   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|dƒ| _dS )ú3Clients should not instantiate this class directly.r   N)Úsuperr2   r)   Ú_package_name)r1   r   rS   r   r   rT   ©Ú	__class__r
   r   r2   S  ó   zAndroidAppMetadata.__init__c                 C   r4   )zTThe canonical package name of this Android app as it would appear in the Play Store.N)rc   r6   r
   r
   r   r   X  rX   zAndroidAppMetadata.package_namec                    ó   t ƒ  |¡o| j|jkS r   )rb   r]   r   r[   rd   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   )ÚhashrU   r   r   rT   r   r6   r
   r
   r   Ú__hash__d  s   ÿzAndroidAppMetadata.__hash__)rJ   rK   rL   rM   r2   rN   r   r]   rj   rn   Ú__classcell__r
   r
   rd   r   r_   P  s    
r_   c                       r^   )ÚIOSAppMetadataz3iOS-specific information about an iOS Firebase app.c                    r`   )ra   r    N)rb   r2   r)   Ú
_bundle_id)r1   r    rS   r   r   rT   rd   r
   r   r2   l  rf   zIOSAppMetadata.__init__c                 C   r4   )zOThe canonical bundle ID of this iOS app as it would appear in the iOS AppStore.N)rq   r6   r
   r
   r   r    q  rX   zIOSAppMetadata.bundle_idc                    rg   r   )rb   r]   r    r[   rd   r
   r   r]   v  s   zIOSAppMetadata.__eq__c                 C   rh   r   ri   r[   r
   r
   r   rj   y  rk   zIOSAppMetadata.__ne__c                 C   rl   r   )rm   rU   r   r   rT   r    r6   r
   r
   r   rn   |  s   zIOSAppMetadata.__hash__)rJ   rK   rL   rM   r2   rN   r    r]   rj   rn   ro   r
   r
   rd   r   rp   i  s    
rp   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_hashrS   zHThe supplied certificate hash is neither a valid SHA-1 nor SHA_256 hash.N)r)   r*   rU   ÚlowerÚ	_sha_hashrr   Ú	_SHA_1_REÚmatchrs   Ú
_cert_typeÚ_SHA_256_RErt   r$   )r1   ru   rS   r
   r
   r   r2   ‰  s   


ÿzSHACertificate.__init__c                 C   r4   )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.
        N)rU   r6   r
   r
   r   rS   ¡  s   zSHACertificate.namec                 C   r4   )zbReturns the certificate hash.

        Returns:
            string: The certificate hash.
        N)rw   r6   r
   r
   r   ru   «  ó   zSHACertificate.sha_hashc                 C   r4   )zˆReturns the type of the SHA certificate encoded in the hash.

        Returns:
            string: One of 'SHA_1' or 'SHA_256'.
        N)rz   r6   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 rY   )r"   rr   rS   ru   r}   r[   r
   r
   r   r]   ½  s
   

ÿzSHACertificate.__eq__c                 C   rh   r   ri   r[   r
   r
   r   rj   Ã  rk   zSHACertificate.__ne__c                 C   s   t | j| j| jfƒS r   )rm   rS   ru   r}   r6   r
   r
   r   rn   Æ  s   zSHACertificate.__hash__r   )rJ   rK   rL   rM   rs   rt   ÚreÚcompilerx   r{   r2   rN   rS   ru   r}   r]   rj   rn   r
   r
   r
   r   rr   €  s     



	

rr   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      ø?ZandroidAppsÚpackageNameZiosAppsZ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/ZhttpTimeoutzX-Client-Version)Ú
credentialÚbase_urlÚheadersÚtimeout)rT   r$   rW   Úfirebase_adminÚ__version__ÚoptionsÚgetr   ZDEFAULT_TIMEOUT_SECONDSZJsonHttpClientrƒ   Úget_credentialr   ÚBASE_URLÚ_client)r1   r	   rT   Zversion_headerr†   r
   r
   r   r2   Ø  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_NAMEr_   ©r1   r   r
   r
   r   r9   è  ó   üz2_ProjectManagementService.get_android_app_metadatac                 C   rŽ   r�   )r“   r   ÚIOS_APPS_RESOURCE_NAMEÚIOS_APP_IDENTIFIER_NAMErp   r–   r
   r
   r   rO   ï  r—   z._ProjectManagementService.get_ios_app_metadatac                 C   sR   t |dƒ d|› d|› �}|  d|¡}||| |d |d | d¡p#d|d	 d
�S )z;Retrieves detailed information about an Android or iOS app.r   ú/v1beta1/projects/-/ú/rŠ   rS   ÚappIdÚdisplayNameNZ	projectId)rS   r   r   rT   )r)   Ú_make_requestrŠ   )r1   r�   r‘   r’   r   ÚpathÚresponser
   r
   r   r“   ö  s   
ûz+_ProjectManagementService._get_app_metadatac                 C   ó   | j ||tjd� d S ©N)r   r?   r�   )Ú_set_display_namer   r”   ©r1   r   r?   r
   r
   r   r=     ó
   
ýz6_ProjectManagementService.set_android_app_display_namec                 C   r¡   r¢   )r£   r   r˜   r¤   r
   r
   r   rP     r¥   z2_ProjectManagementService.set_ios_app_display_namec                 C   s.   d|› d|› d�}d|i}| j d||d� dS )z/Sets the display name of an Android or iOS app.rš   r›   z?updateMask=displayNamer�   Úpatch©ÚjsonN)rž   )r1   r   r?   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   r6   r
   r
   r   r     ó   þz+_ProjectManagementService.list_android_appsc                 C   rª   r«   )r­   r   r˜   r   r6   r
   r
   r   r     r®   z'_ProjectManagementService.list_ios_appsc                    sœ   dˆj › d|› dtj› �}ˆ d|¡}g }	 | d¡}|s 	 |S | ‡ ‡fdd„|D ƒ¡ | d	¡}|s7	 |S dˆj › d|› d
|› dtj› �}ˆ d|¡}q)z>Lists all the Android or iOS apps within the Firebase project.ú/v1beta1/projects/r›   z
?pageSize=rŠ   TÚappsc                 3   s    � | ]}ˆ |d  ˆd�V  qdS )rœ   r   Nr
   )Ú.0r	   ©r¬   r1   r
   r   Ú	<genexpr>*  s   € z7_ProjectManagementService._list_apps.<locals>.<genexpr>ZnextPageTokenz?pageToken=z
&pageSize=N)rW   r   ÚMAXIMUM_LIST_APPS_PAGE_SIZErž   rŠ   Úextend)r1   r�   r¬   rŸ   r    Z	apps_listr°   Znext_page_tokenr
   r²   r   r­     s0   ÿÿ
õ
ûÿþÿòz$_ProjectManagementService._list_appsNc                 C   ó   | j tjtj||td�S ©N)r�   r‘   Ú
identifierr   r¬   )Ú_create_appr   r”   r•   r   )r1   r   r   r
   r
   r   r   7  ó   ûz,_ProjectManagementService.create_android_appc                 C   r¶   r·   )r¹   r   r˜   r™   r   )r1   r    r   r
   r
   r   r   ?  rº   z(_ProjectManagementService.create_ios_appc                 C   sb   t |dƒ d| j› d|› �}||i}|r||d< | jd||d�}|d }	|  |	¡}
||
d | d	�S )zCreates an Android or iOS app.r   r¯   r›   r�   Úpostr§   rS   rœ   r   N)r(   rW   rž   Ú_poll_app_creation)r1   r�   r‘   r¸   r   r¬   rŸ   r©   r    Úoperation_nameÚpoll_responser
   r
   r   r¹   G  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/rŠ   Údoner    z;Polling finished, but the operation terminated in an error.)Úhttp_responsezPolling deadline exceeded.N)Úranger   ÚMAXIMUM_POLLING_ATTEMPTSÚpowÚPOLL_EXPONENTIAL_BACKOFF_FACTORÚPOLL_BASE_WAIT_TIME_SECONDSÚtimeÚsleepÚ_body_and_responserŠ   r   ZUnknownErrorZDeadlineExceededError)
r1   r½   Zcurrent_attemptZdelay_factorZwait_time_secondsrŸ   r¾   rÀ   r¿   r    r
   r
   r   r¼   Y  s&   ÿ




þû
z,_ProjectManagementService._poll_app_creationc                 C   ó   | j tj|d�S ©N)r�   r   )Ú_get_app_configr   r”   r–   r
   r
   r   rB   m  r®   z0_ProjectManagementService.get_android_app_configc                 C   rÉ   rÊ   )rË   r   r˜   r–   r
   r
   r   rQ   r  s   ÿz,_ProjectManagementService.get_ios_app_configc                 C   s4   d|› d|› d�}|   d|¡}t |d ¡jdd�S )Nrš   r›   z/configrŠ   ZconfigFileContentszutf-8)Úencoding)rž   Úbase64Ústandard_b64decodeÚdecode)r1   r�   r   rŸ   r    r
   r
   r   rË   v  s   z)_ProjectManagementService._get_app_configc                 C   s4   d|› d�}|   d|¡}| d¡pg }dd„ |D ƒS )Nú /v1beta1/projects/-/androidApps/ú/sharŠ   Zcertificatesc                 S   s    g | ]}t |d  |d d�‘qS )ÚshaHashrS   )ru   rS   )rr   )r±   Úcertr
   r
   r   Ú
<listcomp>�  s     zB_ProjectManagementService.get_sha_certificates.<locals>.<listcomp>)rž   rŠ   )r1   r   rŸ   r    Z	cert_listr
   r
   r   rE   }  s   z._ProjectManagementService.get_sha_certificatesc                 C   s<   d|› d�}t |dƒj}|j}||dœ}| jd||d� d S )NrÐ   rÑ   rG   )rÒ   ZcertTyper»   r§   )r+   ru   r}   rž   )r1   r   rG   rŸ   ru   r}   r©   r
   r
   r   rF   ƒ  s
   
z-_ProjectManagementService.add_sha_certificatec                 C   s&   t |dƒj}d|› �}|  d|¡ d S )NrI   z	/v1beta1/Údelete)r+   rS   rž   )r1   rI   rS   rŸ   r
   r
   r   rH   Š  s   
z0_ProjectManagementService.delete_sha_certificatec                 C   s   |   |||¡\}}|S r   )rÈ   )r1   Ú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�   Zbody_and_responseÚrequestsr   ÚRequestExceptionr   Z#handle_platform_error_from_requests)r1   rÖ   r×   r¨   Úerrorr
   r
   r   rÈ   “  s   
€ÿz,_ProjectManagementService._body_and_responser   )#rJ   rK   rL   rM   rŒ   r´   rÂ   rÅ   rÄ   r”   r•   r˜   r™   r2   r9   rO   r“   r=   rP   r£   r   r   r­   r   r   r¹   r¼   rB   rQ   rË   rE   rF   rH   rž   rÈ   r
   r
   r
   r   r   Ê  sB    


r   r   )NN)rM   rÍ   r~   rÆ   rÚ   r‡   r   r   r   r   r   r   r   r   r   r   r   r(   r)   r*   r+   r   r   rR   r_   rp   rr   r   r
   r
   r
   r   Ú<module>   s8   





b8(J