
                         j   S r SSKJr  SSKJr  SSKJr  SSK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  \
R"                  " \
R$                  R&                  \
R$                  R(                  \
R$                  R*                  5      \
R,                   " S S\
R.                  5      5       5       rg)zhDeletes a user in a given instance.

Deletes a user in a given instance specified by username and host.
    )absolute_import)division)unicode_literalsN)api_util)
operations)base)flags)
properties)
console_ioc                   J    \ rS rSrSr\S 5       rS\R                  4S jr	Sr
g)Delete"   z|Deletes a Cloud SQL user in a given instance.

Deletes a Cloud SQL user in a given instance specified by username and host.
c                    [         R                  " U 5        [         R                  " U 5        [         R                  " U 5        [        R
                  R                  U 5        U R                  R                  [         R                  5        g )N)
r	   AddInstanceAddUsernameAddHostr   
ASYNC_FLAGAddToParserdisplay_infoAddCacheUpdaterUserCompleter)parsers    lib/surface/sql/users/delete.pyArgsDelete.Args+   sV    	f	f	MM&OO'
''(;(;<    argsc           	         [         R                  " [         R                  5      nUR                  nUR                  nUR
                  R                  UR                  S[        R                  R                  R                  R                  0SS9nSnUR                  nUR                  (       a&  SR                  UR                  UR                  5      n[         R"                  " SR                  U5      SSS9  UR$                  R'                  UR)                  UR                  UR+                  5       UR                  UR                  S	95      nUR
                  R-                  S
UR.                  UR                  S9nUR0                  (       a=  UR2                  R5                  UR7                  UR                  UR8                  S95      $ [2        R:                  R=                  X6S5        g)zLists Cloud SQL users in a given instance.

Args:
  args: The arguments that this command was invoked
      with.

Returns:
  SQL user resource iterator.
projectzsql.instances)params
collectionNzf{0}@{1}zr{0} will be deleted. New connections can no longer be made using this user. Existing connections are not affected.T)messagedefaultcancel_on_no)r   instancenamehostzsql.operations)	operationr   )r   r(   zDeleting Cloud SQL user)r   	SqlClientAPI_VERSION_DEFAULT
sql_clientsql_messagesresource_parserParser%   r
   VALUEScorer   	GetOrFailusernamer'   formatr   PromptContinueusersr   SqlUsersDeleteRequestNameCreater&   async_r   GetSqlOperationsGetRequestr(   OperationsV1Beta4WaitForOperation)	selfr   clientr+   r,   instance_refoperation_ref	user_nameresult_operations	            r   Run
Delete.Run3   s     < <=F""J&&L))//:,,1199CCD" 0 $L MIyy##DMM499=iGGMvH "''..** ((!&&(	 	+ 	 **11"''$$ 2 &M {{""&&

.
.#++}7N7N / PQ Q   11*2KMr    N)__name__
__module____qualname____firstlineno____doc__staticmethodr   argparse	NamespacerD   __static_attributes__rF   r   r   r   r   "   s/    
 = =-Mh(( -Mr   r   )rK   
__future__r   r   r   rM   googlecloudsdk.api_lib.sqlr   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.sqlr	   googlecloudsdk.corer
   googlecloudsdk.core.consoler   ReleaseTracksReleaseTrackGABETAALPHAUniverseCompatibleDeleteCommandr   rF   r   r   <module>r]      s   
 '  '  / 1 ( 0 * 2 D%%(($*;*;*@*@%%++-;MT ;M -;Mr   