
    	                     b    S r SSKJr  SSKJr  SSKJr  SSKJr   " S S\R                  5      r
g)	zThe meta cache delete command.    )base)
cache_util)log)
console_ioc                   .    \ rS rSrSr\S 5       rS rSrg)Delete   z1Delete a persistent cache or tables in the cache.c                 R    [         R                  " U 5        U R                  SSSS9  g )Ntables*zThe table names or name patterns to delete, where `?` matches any character and ```*``` matches any string of zero or more characters. If omitted then the entired cache is deleted.)nargshelp)r   AddCacheFlagadd_argument)parsers     lib/surface/meta/cache/delete.pyArgsDelete.Args   s0    F#
J  L    c                    S nUR                   (       d>  UR                  S5      (       d(  U" UR                  5        [        R                  " 5         g [        R
                  " UR                  5       n[        R                  " SR                  UR                  5      5        UR                   (       a  UR                    VVs/ s H  nUR                  U5        H  nUPM     M      nnnU(       d>  [        R                  " SR                  SR                  UR                   5      5      5      e[        R                  " SR                  SR                  U5      5      SSS9  U H$  nUR                  U5      nUR	                  5         M&      S S S 5        g U" UR                  5        UR	                  5         S S S 5        g s  snnf ! , (       d  f       g = f)	Nc                 N    [         R                  " SR                  U 5      SSS9  g)z2Prompt for cache deletion and return confirmation.z&The entire [{}] cache will be deleted.T)messagecancel_on_nodefaultN)r   PromptContinueformat)names    r   _RequireConfirmation(Delete.Run.<locals>._RequireConfirmation(   s$    :AA$Gr   cachezcache name {}zNo tables matched [{}].,z[{}] will be deleted.T)r   r   r   )r   IsSpecifiedr    r   r   GetCacher   infor   r   SelectNoTablesMatchedjoinr   r   Table)selfargsr   r    patternr   namestables           r   Run
Delete.Run&   sh    ;;t//884::&			TZZ	(E	hh%%ejj12	%)[[ 4['"\\'2T 2 [ 4**+D+K+Khht{{#,% & &!!+22388E?C	 D++d#%
,,.   
)	(" 5::&lln% 
)( #4 
)	(( s&   3AG	%G(B'G	"G	G		
G N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r.   __static_attributes__r0   r   r   r   r      s    9L L"r   r   N)r5   googlecloudsdk.callioper   googlecloudsdk.command_lib.metar   googlecloudsdk.corer   googlecloudsdk.core.consoler   Commandr   r0   r   r   <module>r=      s(     % ) 6 # 2/T\\ /r   