
    (pha                     B   S r SSKrSSKrSSKrSSKrSSKrSSKJr  SSKJr  SSKJr  Sr	S r
S S jrS S	 jrS S
 jrS S jrS!S jrS!S jrS rS rS rS r " S S5      r " S S5      r " S S5      r " S S\5      r " S S\5      r " S S5      r " S S5      rg)"zFirebase 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                 B    [         R                  " U [        [        5      $ N)r   get_app_service_PROJECT_MANAGEMENT_ATTRIBUTE_ProjectManagementServiceapps    T/var/www/html/venv/lib/python3.13/site-packages/firebase_admin/project_management.py_get_project_management_servicer   #   s    !!#'DF_``    c                 (    [        U [        U5      S9$ )zObtains 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-LS-QRRr   c                 (    [        U [        U5      S9$ )zObtains 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    [        U 5      R                  5       $ )zLists 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    [        U 5      R                  5       $ )zLists 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                 6    [        U5      R                  X5      $ )aP  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<^^r   c                 6    [        U5      R                  X5      $ )a6  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                 j    U b  [        U [        5      (       a  U $ [        SR                  U5      5      e)Nz{0} must be a string.
isinstancestr
ValueErrorformatobj
field_names     r   _check_is_string_or_noner/   v   s/    
{jc**

,33J?
@@r   c                 r    [        U [        5      (       a	  U (       a  U $ [        SR                  U5      5      e)Nz{0} must be a non-empty string.r'   r,   s     r   _check_is_nonempty_stringr1   |   s-    #s

6==jI
JJr   c                      U c  g [        X5      $ r   )r1   r,   s     r   !_check_is_nonempty_string_or_noner3      s    
{$S55r   c                 @    U c  [        SR                  U5      5      eU $ )Nz{0} cannot be None.)r*   r+   r,   s     r   _check_not_noner5      s#    
{.55jABBJr   c                   R    \ rS rSrSrS r\S 5       rS rS r	S r
S rS	 rS
 rSrg)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                     Xl         X l        g r   _app_id_serviceselfr   r   s      r   __init__AndroidApp.__init__       r   c                     U R                   $ )zReturns 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.
r:   r=   s    r   r   AndroidApp.app_id        ||r   c                 L    U R                   R                  U R                  5      $ )zRetrieves 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_metadatar:   rC   s    r   get_metadataAndroidApp.get_metadata   s     }}55dllCCr   c                 N    U R                   R                  U R                  U5      $ )a(  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_namer:   r=   new_display_names     r   set_display_nameAndroidApp.set_display_name   s      }}99$,,HXYYr   c                 L    U R                   R                  U R                  5      $ )zFRetrieves the configuration artifact associated with this Android app.)r;   get_android_app_configr:   rC   s    r   
get_configAndroidApp.get_config   s    }}33DLLAAr   c                 L    U R                   R                  U R                  5      $ )a  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_certificatesr:   rC   s    r   rU   AndroidApp.get_sha_certificates        }}11$,,??r   c                 N    U R                   R                  U R                  U5      $ )a7  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_certificater:   )r=   certificate_to_adds     r   rY   AndroidApp.add_sha_certificate   s      }}00?QRRr   c                 8    U R                   R                  U5      $ )aC  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   r]   !AndroidApp.delete_sha_certificate   s     }}334IJJr   r9   N)__name__
__module____qualname____firstlineno____doc__r>   propertyr   rH   rN   rR   rU   rY   r]   __static_attributes__ r   r   r   r      sD       
DZB
@SKr   r   c                   @    \ rS rSrSrS r\S 5       rS rS r	S r
Srg	)
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                     Xl         X l        g r   r9   r<   s      r   r>   IOSApp.__init__   r@   r   c                     U R                   $ )zReturns 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.
rB   rC   s    r   r   IOSApp.app_id   rE   r   c                 L    U R                   R                  U R                  5      $ )zRetrieves 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_metadatar:   rC   s    r   rH   IOSApp.get_metadata  rW   r   c                 N    U R                   R                  U R                  U5      $ )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_namer:   rL   s     r   rN   IOSApp.set_display_name  s      }}55dllDTUUr   c                 L    U R                   R                  U R                  5      $ )zBRetrieves the configuration artifact associated with this iOS app.)r;   get_ios_app_configr:   rC   s    r   rR   IOSApp.get_config#  s    }}//==r   r9   N)r`   ra   rb   rc   rd   r>   re   r   rH   rN   rR   rf   rg   r   r   r   r      s1       
@V>r   r   c                   T    \ rS rSrSrS r\S 5       r\S 5       r\S 5       r	S r
Srg	)
_AppMetadatai(  z9Detailed information about a Firebase Android or iOS app.c                     [        US5      U l        [        US5      U l        [        US5      U l        [        US5      U l        g )Nnamer   r"   
project_id)r1   _namer:   r/   _display_name_project_id)r=   rz   r   r"   r{   s        r   r>   _AppMetadata.__init__+  s>     /tV<
0B5lNS4ZNr   c                     U R                   $ )zThe globally unique, Firebase-assigned identifier of this Android or iOS app.

This ID is unique even across apps of different platforms.
rB   rC   s    r   r   _AppMetadata.app_id3  s     ||r   c                     U R                   $ )zThe 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.)r}   rC   s    r   r"   _AppMetadata.display_name;  s    
 !!!r   c                     U R                   $ )zPThe permanent, globally unique, user-assigned ID of the parent Firebase project.)r~   rC   s    r   r{   _AppMetadata.project_idB  s     r   c                 *   [        U[        U 5      5      (       d  gU R                  UR                  :H  =(       aY    U R                  UR                  :H  =(       a9    U R                  UR                  :H  =(       a    U R
                  UR
                  :H  $ NF)r(   typer|   r   r"   r{   r=   others     r   __eq___AppMetadata.__eq__G  ss    %d,,

ekk) `dkkU\\.I `!!U%7%77`<@OOuO_O_<_	ar   )r:   r}   r|   r~   N)r`   ra   rb   rc   rd   r>   re   r   r"   r{   r   rf   rg   r   r   rx   rx   (  sM    CO   " "    ar   rx   c                   T   ^  \ rS rSrSrU 4S jr\S 5       rU 4S jrS r	S r
SrU =r$ )	AndroidAppMetadataiP  z;Android-specific information about an Android Firebase app.c                 P   > [         [        U ]  X#XE5        [        US5      U l        g)3Clients should not instantiate this class directly.r!   N)superr   r>   r1   _package_name)r=   r!   rz   r   r"   r{   	__class__s         r   r>   AndroidAppMetadata.__init__S  s$     $0|X6|^Tr   c                     U R                   $ )zTThe canonical package name of this Android app as it would appear in the Play Store.r   rC   s    r   r!   AndroidAppMetadata.package_nameX  s     !!!r   c                 j   > [         [        U ]  U5      =(       a    U R                  UR                  :H  $ r   )r   r   r   r!   r=   r   r   s     r   r   AndroidAppMetadata.__eq__]  s1    ($6u= 8!!U%7%77	9r   c                 .    U R                  U5      (       + $ r   r   r   s     r   __ne__AndroidAppMetadata.__ne__a      ;;u%%%r   c                     [        U R                  U R                  U R                  U R                  U R
                  45      $ r   )hashr|   r   r"   r{   r!   rC   s    r   __hash__AndroidAppMetadata.__hash__d  s7    ZZd&7&7$J[J[\^ 	^r   r   )r`   ra   rb   rc   rd   r>   re   r!   r   r   r   rf   __classcell__r   s   @r   r   r   P  s6    EU
 " "9&^ ^r   r   c                   T   ^  \ rS rSrSrU 4S jr\S 5       rU 4S jrS r	S r
SrU =r$ )	IOSAppMetadataii  z3iOS-specific information about an iOS Firebase app.c                 P   > [         [        U ]  X#XE5        [        US5      U l        g)r   r%   N)r   r   r>   r1   
_bundle_id)r=   r%   rz   r   r"   r{   r   s         r   r>   IOSAppMetadata.__init__l  s"    nd,T<T3I{Kr   c                     U R                   $ )zOThe canonical bundle ID of this iOS app as it would appear in the iOS AppStore.r   rC   s    r   r%   IOSAppMetadata.bundle_idq  s     r   c                 j   > [         [        U ]  U5      =(       a    U R                  UR                  :H  $ r   )r   r   r   r%   r   s     r   r   IOSAppMetadata.__eq__v  s'    ^T1%8^T^^u=^^r   c                 .    U R                  U5      (       + $ r   r   r   s     r   r   IOSAppMetadata.__ne__y  r   r   c                     [        U R                  U R                  U R                  U R                  U R
                  45      $ r   )r   r|   r   r"   r{   r%   rC   s    r   r   IOSAppMetadata.__hash__|  s1    TZZd.?.?RVR`R`abbr   r   )r`   ra   rb   rc   rd   r>   re   r%   r   r   r   rf   r   r   s   @r   r   r   i  s7    =L
  _&c cr   r   c                       \ rS rSrSrSrSr\R                  " S5      r	\R                  " S5      r
SS jr\S	 5       r\S
 5       r\S 5       rS rS rS rSrg)SHACertificatei  zIRepresents 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                 f   [        US5        [        US5        X l        UR                  5       U l        [
        R                  R                  U5      (       a  [
        R                  U l	        g[
        R                  R                  U5      (       a  [
        R                  U l	        g[        S5      e)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_hashrz   zHThe supplied certificate hash is neither a valid SHA-1 nor SHA_256 hash.N)r1   r3   r|   lower	_sha_hashr   	_SHA_1_REmatchr   
_cert_type_SHA_256_REr   r*   )r=   r   rz   s      r   r>   SHACertificate.__init__  s     	"(J7)$7
!)##))(33,22DO''--h77,44DOZ\ \r   c                     U R                   $ )zReturns 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.
)r|   rC   s    r   rz   SHACertificate.name  s     zzr   c                     U R                   $ )zJReturns the certificate hash.

Returns:
    string: The certificate hash.
)r   rC   s    r   r   SHACertificate.sha_hash  s     ~~r   c                     U R                   $ )zpReturns the type of the SHA certificate encoded in the hash.

Returns:
    string: One of 'SHA_1' or 'SHA_256'.
)r   rC   s    r   	cert_typeSHACertificate.cert_type  s     r   c                     [        U[        5      (       d  gU R                  UR                  :H  =(       a9    U R                  UR                  :H  =(       a    U R                  UR                  :H  $ r   )r(   r   rz   r   r   r   s     r   r   SHACertificate.__eq__  sP    %00		UZZ' 2DMMU^^,K 2%//1	3r   c                 .    U R                  U5      (       + $ r   r   r   s     r   r   SHACertificate.__ne__  r   r   c                 Z    [        U R                  U R                  U R                  45      $ r   )r   rz   r   r   rC   s    r   r   SHACertificate.__hash__  s     TYYt~~>??r   )r   r|   r   r   )r`   ra   rb   rc   rd   r   r   recompiler   r   r>   re   rz   r   r   r   r   r   rf   rg   r   r   r   r     s    SEG

./I**01K\0      3&@r   r   c                       \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSrS rS rS rS rS rS rS rS rS rS rS$S jrS$S jrS rS rS rS rS rS rS r S  r!S$S! jr"S$S" jr#S#r$g)%r   i  zNProvides methods for interacting with the Firebase Project Management Service.zhttps://firebase.googleapis.comd      g      ?g      ?androidAppspackageNameiosAppsbundleIdc                 f   UR                   nU(       d  [        S5      eX l        SR                  [        R
                  5      nUR                  R                  S[        R                  5      n[        R                  " UR                  R                  5       [        R                  SU0US9U l        g )NzProject 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)r{   r*   r~   r+   firebase_admin__version__optionsgetr   DEFAULT_TIMEOUT_SECONDSJsonHttpClientr   get_credentialr   BASE_URL_client)r=   r   r{   version_headerr   s        r   r>   "_ProjectManagementService.__init__  s    ^^
AB B &+22>3M3MN++//-1U1UV#22~~446.77'8	r   c                 f    U R                  [        R                  [        R                  [        US9$ N)platform_resource_nameidentifier_namemetadata_classr   )_get_app_metadatar   ANDROID_APPS_RESOURCE_NAMEANDROID_APP_IDENTIFIER_NAMEr   r=   r   s     r   rG   2_ProjectManagementService.get_android_app_metadata  s2    %%#<#W#W5QQ-	 &  	r   c                 f    U R                  [        R                  [        R                  [        US9$ r   )r   r   IOS_APPS_RESOURCE_NAMEIOS_APP_IDENTIFIER_NAMEr   r   s     r   ro   ._ProjectManagementService.get_ios_app_metadata  s2    %%#<#S#S5MM)	 &  	r   c                     [        US5        SR                  X5      nU R                  SU5      nU" Xb   US   US   UR                  S5      =(       d    SUS   S	9$ )
z;Retrieves detailed information about an Android or iOS app.r   z/v1beta1/projects/-/{0}/{1}r   rz   appIddisplayNameN	projectId)rz   r   r"   r{   )r1   r+   _make_requestr   )r=   r   r   r   r   pathresponses          r   r   +_ProjectManagementService._get_app_metadata  sk    !&(3,334JS%%eT2%&!G$!m4<,. 	.r   c                 B    U R                  UU[        R                  S9  g N)r   rM   r   )_set_display_namer   r   r=   r   rM   s      r   rK   6_ProjectManagementService.set_android_app_display_name  s%    -#<#W#W 	 	Yr   c                 B    U R                  UU[        R                  S9  g r   )r   r   r   r  s      r   rr   2_ProjectManagementService.set_ios_app_display_name  s%    -#<#S#S 	 	Ur   c                 N    SR                  X15      nSU0nU R                  SXES9  g)z/Sets the display name of an Android or iOS app.z2/v1beta1/projects/-/{0}/{1}?updateMask=displayNamer   patchjsonN)r+   r   )r=   r   rM   r   r   request_bodys         r   r   +_ProjectManagementService._set_display_name  s3    CJJ",%'787D<r   c                 F    U R                  [        R                  [        S9$ N)r   	app_class)
_list_appsr   r   r   rC   s    r   r   +_ProjectManagementService.list_android_apps  s$    #<#W#W   " 	"r   c                 F    U R                  [        R                  [        S9$ r  )r  r   r   r   rC   s    r   r   '_ProjectManagementService.list_ios_apps  s$    #<#S#S   	r   c                   ^ ^ SR                  T R                  U[        R                  5      nT R	                  SU5      n/ n UR                  S5      nU(       d   U$ UR                  UU 4S jU 5       5        UR                  S5      nU(       d   U$ SR                  T R                  UU[        R                  5      nT R	                  SU5      nM  )z>Lists all the Android or iOS apps within the Firebase project.z&/v1beta1/projects/{0}/{1}?pageSize={2}r   appsc              3   8   >#    U  H  nT" US    TS9v   M     g7f)r   r   Nrg   ).0r   r  r=   s     r   	<genexpr>7_ProjectManagementService._list_apps.<locals>.<genexpr>+  s     ZUYcYc'lDIUYs   nextPageTokenz4/v1beta1/projects/{0}/{1}?pageToken={2}&pageSize={3})r+   r~   r   MAXIMUM_LIST_APPS_PAGE_SIZEr   r   extend)r=   r   r  r   r   	apps_listr  next_page_tokens   ` `     r   r  $_ProjectManagementService._list_apps  s    7>>"%AAC %%eT2	<<'D  ZUYZZ&ll?;O"  JPP  &)EE	GD
 ))%6H r   Nc                 h    U R                  [        R                  [        R                  UU[        S9$ N)r   r   
identifierr"   r  )_create_appr   r   r   r   )r=   r!   r"   s      r   r    ,_ProjectManagementService.create_android_app8  s5    #<#W#W5QQ#%    " 	"r   c                 h    U R                  [        R                  [        R                  UU[        S9$ r  )r!  r   r   r   r   )r=   r%   r"   s      r   r$   (_ProjectManagementService.create_ios_app@  s5    #<#S#S5MM %    	r   c                     [        US5        SR                  U R                  U5      nX#0nU(       a  XGS'   U R                  SXgS9nUS   n	U R	                  U	5      n
U" U
S   U S9$ )	zCreates an Android or iOS app.r"   z/v1beta1/projects/{0}/{1}r   postr  rz   r   r   )r/   r+   r~   r   _poll_app_creation)r=   r   r   r   r"   r  r   r	  r   operation_namepoll_responses              r   r!  %_ProjectManagementService._create_appH  s{     	!~>*11$2B2BDZ['4*6'%%fd%F!&)//?g 6EEr   c                    [        [        R                  5       H  n[        [        R                  U5      nU[        R
                  -  n[        R                  " U5        SR                  U5      nU R                  SU5      u  pgUR                  S5      nU(       d  M  UR                  S5      n	U	(       a  U	s  $ [        R                  " SUS9e   [        R                  " S5      e)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'  ,_ProjectManagementService._poll_app_creationZ  s    $%>%W%WXO)II?\L ,/H/d/d dJJ()##N3D+/+B+B5$+O(M $$V,Dt(,,Z8#O --Q"/1 1  Y  ../KLLr   c                 >    U R                  [        R                  US9$ N)r   r   )_get_app_configr   r   r   s     r   rQ   0_ProjectManagementService.get_android_app_confign  s&    ###<#W#W $  	r   c                 >    U R                  [        R                  US9$ r=  )r>  r   r   r   s     r   ru   ,_ProjectManagementService.get_ios_app_configs  s(    ###<#S#S\b $ d 	dr   c                     SR                  X5      nU R                  SU5      n[        R                  " US   5      R	                  SS9$ )Nz"/v1beta1/projects/-/{0}/{1}/configr   configFileContentszutf-8)encoding)r+   r   base64standard_b64decodedecode)r=   r   r   r   r   s        r   r>  )_ProjectManagementService._get_app_configw  sM    3::;QZ%%eT2 ((2F)GHOOY`Oaar   c                     SR                  U5      nU R                  SU5      nUR                  S5      =(       d    / nU Vs/ s H  n[        US   US   S9PM     sn$ s  snf )N'/v1beta1/projects/-/androidApps/{0}/shar   certificatesshaHashrz   )r   rz   )r+   r   r   r   )r=   r   r   r   	cert_listcerts         r   rU   ._ProjectManagementService.get_sha_certificates~  sa    8??G%%eT2LL06B	XabXaPTYd6lKXabbbs   Ac                     SR                  U5      n[        US5      R                  nUR                  nXES.nU R	                  SX6S9  g )NrJ  rZ   )rL  certTyper&  r  )r+   r5   r   r   r   )r=   r   rZ   r   r   r   r	  s          r   rY   -_ProjectManagementService.add_sha_certificate  sL    8??G"#57KLUU&00	#+C64;r   c                 v    [        US5      R                  nSR                  U5      nU R                  SU5        g )Nr^   z/v1beta1/{0}delete)r5   rz   r+   r   )r=   r^   rz   r   s       r   r]   0_ProjectManagementService.delete_sha_certificate  s6    46MNSS$$T*8T*r   c                 .    U R                  XU5      u  pEU$ r   )r5  )r=   methodurlr  body_s         r   r   '_ProjectManagementService._make_request  s    ))&t<r   c                      U R                   R                  XUS9$ ! [        R                  R                   a  n[
        R                  " U5      eS nAff = f)N)rW  rX  r  )r   body_and_responserequestsr   RequestExceptionr   #handle_platform_error_from_requests)r=   rW  rX  r  errors        r   r5  ,_ProjectManagementService._body_and_response  sQ    	D<<11t1TT""33 	D<<UCC	Ds    AAA)r   r~   r   )%r`   ra   rb   rc   rd   r   r  r/  r2  r1  r   r   r   r   r>   rG   ro   r   rK   rr   r   r   r   r  r    r$   r!  r'  rQ   ru   r>  rU   rY   r]   r   r5  rf   rg   r   r   r   r     s    X0H"% "%&)#!."/&( 
.YU="

2"F$M(
dbc<+
Dr   r   r   )NN)rd   rE  r   r3  r^  r   r   r   r   r
   r   r   r   r   r   r    r$   r/   r1   r3   r5   r   r   rx   r   r   r   r   rg   r   r   <module>rc     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   