ó
    €Ïë  ã                   ó˜   • S r SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
r
 " S S\5      r " S	 S
\5      r " S S\5      r " S S\5      rg)z(Common utilities for deleting resources.é    )Úoperations_util)Úutil)Úbase)ÚlogNc                   óX   • \ rS rSrSr\R                  R                  4S jrS r	S r
Srg)ÚServiceDeletionWaiteré   zCClass for waiting for synchronous deletion of one or more Services.c                 ó   • / U l         Xl        g ©N©Úpending_deletesÚrelease_track©Úselfr   s     Ú7lib/googlecloudsdk/command_lib/metastore/delete_util.pyÚ__init__ÚServiceDeletionWaiter.__init__   ó   € Ø€DÔØ&Õó    c                 óL   • U R                   R                  [        X5      5        g)zíAdds a service whose deletion to track.

Args:
  service_name: str, the relative resource name of the service being deleted
  operation: Operation, the longrunning operation object returned by the API
    when the deletion was initiated
N)r   ÚappendÚ_PendingServiceDelete©r   Úservice_nameÚ	operations      r   ÚAddPendingDeleteÚ&ServiceDeletionWaiter.AddPendingDelete    s   € ð 	×Ñ×ÑÔ 5°lÓ NÕOr   c           
      ój  • SnU R                    HG  n [        R                  " UR                  SR	                  UR
                  5      U R                  S9  MI     U$ ! [        R                   aB  nSn[        R                  " UR
                  SS[        R                  " U5      S9   SnAMž  SnAff = f)ú;Polls pending deletions and returns when they are complete.FúWaiting for [{}] to be deleted©r   TÚservice©ÚkindÚis_asyncÚfailedN)r   Úoperations_api_utilÚWaitForOperationr   Úformatr   r   Úapi_utilÚOperationErrorr   ÚDeletedResourceÚsixÚ	text_type©r   Úencountered_errorsÚpending_deleteÚes       r   ÚWaitÚServiceDeletionWaiter.Wait*   s¨   € àÐØ×.Ô.ˆð%Ü×,Ò,Ø×$Ñ$Ø,×3Ñ3Ø×+Ñ+ó-à×,Ñ,ô		.ñ /ð Ðøô ×$Ñ$ó %Ø!ÐÜ×ÒØ×'Ñ'ØØÜ—=’= Ó#÷		%ð 	%ûð%úó   “AAÁB2Á07B-Â-B2r   N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   ÚReleaseTrackÚGAr   r   r3   Ú__static_attributes__© r   r   r   r      s$   † ÙKà#'×#4Ñ#4×#7Ñ#7ô 'òPõr   r   c                   ó   • \ rS rSrSrS rSrg)r   é>   z@Data class holding information about a pending service deletion.c                 ó   • Xl         X l        g r   )r   r   r   s      r   r   Ú_PendingServiceDelete.__init__A   s   € Ø$ÔØ…Nr   )r   r   N©r7   r8   r9   r:   r;   r   r>   r?   r   r   r   r   >   s
   † ÙHõr   r   c                   óX   • \ rS rSrSr\R                  R                  4S jrS r	S r
Srg)ÚFederationDeletionWaiteréF   zFClass for waiting for synchronous deletion of one or more Federations.c                 ó   • / U l         Xl        g r   r   r   s     r   r   Ú!FederationDeletionWaiter.__init__I   r   r   c                 óL   • U R                   R                  [        X5      5        g)zúAdds a federation whose deletion to track.

Args:
  federation_name: str, the relative resource name of the federation being
    deleted
  operation: Operation, the longrunning operation object returned by the API
    when the deletion was initiated
N)r   r   Ú_PendingFederationDelete©r   Úfederation_namer   s      r   r   Ú)FederationDeletionWaiter.AddPendingDeleteM   s    € ð 	×Ñ×ÑÜ  Ó<õ>r   c           
      ój  • SnU R                    HG  n [        R                  " UR                  SR	                  UR
                  5      U R                  S9  MI     U$ ! [        R                   aB  nSn[        R                  " UR
                  SS[        R                  " U5      S9   SnAMž  SnAff = f)r   Fr    r!   TÚ
federationr#   N)r   r'   r(   r   r)   rM   r   r*   r+   r   r,   r-   r.   r/   s       r   r3   ÚFederationDeletionWaiter.WaitY   s¨   € àÐØ×.Ô.ˆð%Ü×,Ò,Ø×$Ñ$Ø,×3Ñ3Ø×.Ñ.ó0à×,Ñ,ô		.ñ /ð Ðøô ×$Ñ$ó %Ø!ÐÜ×ÒØ×*Ñ*ØØÜ—=’= Ó#÷		%ð 	%ûð%úr5   r   Nr6   r?   r   r   rF   rF   F   s#   † ÙNà#'×#4Ñ#4×#7Ñ#7ô 'ò
>õr   rF   c                   ó   • \ rS rSrSrS rSrg)rK   ém   zCData class holding information about a pending federation deletion.c                 ó   • Xl         X l        g r   ©rM   r   rL   s      r   r   Ú!_PendingFederationDelete.__init__p   s   € Ø*ÔØ…Nr   rU   NrD   r?   r   r   rK   rK   m   s
   † ÙKõr   rK   )r;   Ú googlecloudsdk.api_lib.metastorer   r'   r   r*   Úgooglecloudsdk.callioper   Úgooglecloudsdk.corer   r-   Úobjectr   r   rF   rK   r?   r   r   Ú<module>r[      sN   ðñ /õ TÝ =Ý (Ý #Û 
ô"˜Fô "ôJ˜Fô ô$˜vô $ôN˜võ r   