
    {
                     8   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  ej                  ej                   j"                  ej                   j$                  ej                   j&                         G d
 dej(                               Zy)zDeletes an AlloyDB user.    )absolute_import)division)unicode_literals)api_util)base)flags)
properties)
console_ioc                   0    e Zd ZdZdddZed        Zd Zy)Deletez+Deletes an AlloyDB user in a given cluster.z{description}zo      To delete an user, run:

        $ {command} my-username --cluster=my-cluster --region=us-central1
      )DESCRIPTIONEXAMPLESc                     t        j                  |        t        j                  | d       t        j                  |        y)zxSpecifies additional command flags.

    Args:
      parser: argparse.Parser, Parser object for command line inputs
    FN)r   AddUsername
AddCluster	AddRegion)parsers    #lib/surface/alloydb/users/delete.pyArgszDelete.Args-   s.     
f	VU#	OOF    c                    t        j                  | j                               }|j                  }|j                  }|j
                  j                  dt        j                  j                  j                  j                  |j                  |j                  |j                        }d}t        j                   |      sy|j#                  |j%                               }|j&                  j)                  |      S )zConstructs and sends request.

    Args:
      args: argparse.Namespace, An object that contains the values for the
        arguments specified in the .Args() method.

    Returns:
      ProcessHttpResponse of the request made.
    z)alloydb.projects.locations.clusters.users)
projectsIdlocationsId
clustersIdusersIdz2User will be deleted from cluster upon completion.)messageN)name)r   AlloyDBClientReleaseTrackalloydb_clientalloydb_messagesresource_parserCreater	   VALUEScoreproject	GetOrFailregionclusterusernamer
   PromptContinue2AlloydbProjectsLocationsClustersUsersDeleteRequestRelativeName!projects_locations_clusters_usersr   )selfargsclientr    r!   user_refprompt_messagereqs           r   Runz
Delete.Run8   s     ##D$5$5$78F**N..%%,,3$$))11;;KK<< - H JN$$^<

M
M""$ N C ;;BB3GGr   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r5    r   r   r   r      s2     4 %
-  Hr   r   N)r9   
__future__r   r   r   googlecloudsdk.api_lib.alloydbr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.alloydbr   googlecloudsdk.corer	   googlecloudsdk.core.consoler
   ReleaseTracksr   ALPHABETAGADeleteCommandr   r<   r   r   <module>rH      s     '  ' 4 ( 4 * 2 T..33T5F5F5I5I3HT 3H3Hr   