Ë
    €Ïc  ã                   óÂ   — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddl	mZ dd	l	mZ dd
lmZ d„ Zej                    G d„ dej"                  «      «       Zy)z.Command to delete notification configurations.é    )Úabsolute_import)Údivision)Úunicode_literals)Úbase)Ú#notification_configuration_iterator)Útask_executor)Útask_graph_executor)Útask_status)Ú&delete_notification_configuration_taskc              #   ó¬   K  — t        j                  | «      D ]8  }t        j                  |j                  |j
                  j                  «      –— Œ: y­w)z>Creates delete tasks from notification_configuration_iterator.N)r   Ú'get_notification_configuration_iteratorr   Ú#DeleteNotificationConfigurationTaskÚ
bucket_urlÚnotification_configurationÚid)ÚurlsÚ*notification_configuration_iterator_results     ú3lib/surface/storage/buckets/notifications/delete.pyÚ0_delete_notification_configuration_task_iteratorr      sM   è ø€ ô *ß.Ñ.¨tö5ð 1ô 2ß/Ñ/Ø9×DÑDØ9ß*Ñ*¯2©2ó	/ó 0ñ5ùs   ‚AAc                   ó0   — e Zd ZdZdddœZed„ «       Zd„ Zy)ÚDeletez1Delete notification configurations from a bucket.aý  
      *{command}* deletes notification configurations from a bucket. If a
      notification configuration name is passed as a parameter, that
      configuration alone is deleted. If a bucket name is passed, all
      notification configurations associated with the bucket are deleted.

      Cloud Pub/Sub topics associated with this notification configuration
      are not deleted by this command. Those must be deleted separately,
      for example with the command "gcloud pubsub topics delete".
      a.  
      Delete a single notification configuration (with ID 3) in the
      bucket `example-bucket`:

        $ {command} projects/_/buckets/example-bucket/notificationConfigs/3

      Delete all notification configurations in the bucket `example-bucket`:

        $ {command} gs://example-bucket
      )ÚDESCRIPTIONÚEXAMPLESc                 ó,   — | j                  ddd¬«       y )Nr   Ú+z6Specifies notification configuration names or buckets.)ÚnargsÚhelp)Úadd_argument)Úparsers    r   ÚArgszDelete.ArgsF   s   € à
×ÑØØØEð õ Gó    c           	      óò   — t         j                  j                  «       }t        j                  t        |j                  «      d|t        j                  t        j                  j                  d ¬«      ¬«       y )NT)Úincrement_typeÚmanifest_path)ÚparallelizableÚtask_status_queueÚprogress_manager_args)r	   Úmultiprocessing_contextÚQueuer   Úexecute_tasksr   r   r
   ÚProgressManagerArgsÚIncrementTypeÚINTEGER)ÚselfÚargsr&   s      r   ÚRunz
Delete.RunM   sW   € Ü+×CÑC×IÑIÓKÐÜ×ÑÜ8¸¿¹ÓCØØ+Ü)×=Ñ=Ü&×4Ñ4×<Ñ<Øô ö	r!   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Údetailed_helpÚstaticmethodr    r0   © r!   r   r   r   )   s1   „ á9ð	
ð	
ñ€-ð2 ñGó ðGó	r!   r   N)r4   Ú
__future__r   r   r   Úgooglecloudsdk.callioper   Ú"googlecloudsdk.command_lib.storager   Ú(googlecloudsdk.command_lib.storage.tasksr   r	   r
   Ú>googlecloudsdk.command_lib.storage.tasks.buckets.notificationsr   r   ÚUniverseCompatibleÚDeleteCommandr   r7   r!   r   Ú<module>r?      sQ   ðñ 5å &Ý Ý 'å (Ý RÝ BÝ HÝ @Ý qò	0ð ×Ñô,ˆT×Ñó ,ó ñ,r!   