
                             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Jr  SSKJ	r	  SSK
Jr  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SrS\-   S-   r " S S\	5      rg)z@Implementation of rb command for deleting cloud storage buckets.    )absolute_import)print_function)division)unicode_literals)NotEmptyException)Command)CommandArgument)ApiSelector)CommandException)NO_URLS_MATCHED_TARGET)StorageUrlFromString)NO_MAX)GcloudStorageFlag)GcloudStorageMapz(
  gsutil rb [-f] gs://<bucket_name>...
z
<B>SYNOPSIS</B>
a  


<B>DESCRIPTION</B>
  Delete one or more buckets. Buckets must be empty before you can delete them.

  Be certain you want to delete a bucket before you do so, as once it is
  deleted the name becomes available and another user may create a bucket with
  that name. (But see also "DOMAIN NAMED BUCKETS" under "gsutil help naming"
  for help carving out parts of the bucket name space.)


<B>OPTIONS</B>
  -f          Continues silently (without printing error messages) despite
              errors when removing buckets. If some buckets couldn't be removed,
              gsutil's exit status will be non-zero even if this flag is set.
              If no buckets could be removed, the command raises a
              "no matches" error.
c                      \ rS rSrSr\R                  " S/ SQ\S\SSSS\	R                  \	R                  /\	R                  \R                  " 5       /S	9r\R                  " S/ SQS
S\0 S9r\" / SQS\" S5      0S9rS rSrg)	RbCommand<   z$Implementation of gsutil rb command.rb)deletebucketremovebucketremovebucketsrmdir   fFr   )command_name_aliasesusage_synopsismin_argsmax_argssupported_sub_argsfile_url_okprovider_url_okurls_start_arggs_api_supportgs_default_apiargparse_argumentscommand_helpzRemove buckets)	help_namehelp_name_aliases	help_typehelp_one_line_summary	help_textsubcommand_help_text)storagebucketsdelete-fz--continue-on-error)gcloud_commandflag_mapc                 |   SU l         U R                  (       a$  U R                   H  u  pUS:X  d  M  SU l         M     SnSnU R                   H  n[        U5      nUR	                  5       (       a  [        S5      e [        U R                  U5      R                  S/S95      nU H\  nUR                  n	U R                  R                  SU	5         U R                  R                  U	R                  U	R                  S9  SnM^     M     U(       d%  [        [$        [        U R                  5      -  5      eU(       a  S$ S$ !   SnU R                   (       a   GM  e = f! [          a=  n
SnU R                   (       a   S	n
A
M  S
U
R"                  ;   a  [        SU	-  5      ee S	n
A
f  SnU R                   (       d  e  N= f)z'Command entry point for the rb command.Fr0   Tz."rb" command requires a provider or bucket URLid)bucket_fieldszRemoving %s...)providerNVersionedBucketNotEmptyzqBucket is not empty. Note: this is a versioned bucket, so to delete all objects
you need to use:
	gsutil rm -r %sr   r   )continue_on_errorsub_optsargsr   IsObjectr   listWildcardIteratorIterBucketsstorage_urlloggerinfo
gsutil_apiDeleteBucketbucket_nameschemer   reasonr   )selfounused_adid_some_worksome_failedurl_strwildcard_urlblrsblrurles              $platform/gsutil/gslib/commands/rb.py
RunCommandRbCommand.RunCommandn   s   "D}}+!9#'$
  ' MK99)'2l				 	   , - 	-
 !!'*66dV6LN #oo)3/	
//
&
&s
&
L  ) / X 3d499oEFF1"";!!

 ! 
	+##(AHH4" $9 <?$? @ @
 	+'' (s0   <(E.EEE
F;(F F  F;)r8   N)__name__
__module____qualname____firstlineno____doc__r   CreateCommandSpec	_SYNOPSISr   r
   XMLJSONr	   %MakeZeroOrMoreCloudBucketURLsArgumentcommand_specHelpSpec_DETAILED_HELP_TEXT	help_specr   r   gcloud_storage_maprS   __static_attributes__     rR   r   r   <   s    , **
 
//


 !%%

?
?
A),2  ,#) (5
!"788#rf   r   N)rY   
__future__r   r   r   r   gslib.cloud_apir   gslib.commandr   gslib.command_argumentr	   gslib.cs_api_mapr
   gslib.exceptionr   r   gslib.storage_urlr   gslib.utils.constantsr   gslib.utils.shim_utilr   r   r[   ra   r   re   rf   rR   <module>rp      sd    G & %  ' - ! 2 ( , 2 2 ( 3 2	 .j# j#rf   