
    <
                     8   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  \R                  " \R                  R                   \R                  R"                  \R                  R$                  5       " S
 S\R&                  5      5       rg)z"Updates a AlloyDB user's password.    )absolute_import)division)unicode_literals)api_util)base)flags)user_helper)
propertiesc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Update   zDUpdate an AlloyDB user's password within a given cluster and region.z{description}z      To update a user's password, run:

        $ {command} my-username --cluster=my-cluster --region=us-central1 --password=postgres
      )DESCRIPTIONEXAMPLESc                     [         R                  " U5        [         R                  " U5        [         R                  " US5        [         R                  " US5        g)zmSpecifies additional command flags.

Args:
  parser: argparse.Parser: Parser object for command line inputs.
FTN)r   AddUsername	AddRegion
AddClusterAddUserPassword)clsparsers     )lib/surface/alloydb/users/set_password.pyArgsUpdate.Args+   s>     
f	OOF	VU#	&$'    c                    [         R                  " U R                  5       5      nUR                  nUR                  nUR
                  R                  S[        R                  R                  R                  R                  UR                  UR                  UR                  S9n[        R                   " XEU5      nUR"                  R%                  U5      $ )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usersId)r   AlloyDBClientReleaseTrackalloydb_clientalloydb_messagesresource_parserCreater
   VALUEScoreproject	GetOrFailregionclusterusernamer	   ConstructPatchRequestFromArgs!projects_locations_clusters_usersPatch)selfargsclientr"   r#   user_refreqs          r   Run
Update.Run7   s     ##D$5$5$78F**N..%%,,3$$))11;;KK<< - H 
3
3DC ;;AA#FFr    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpclassmethodr   r5   __static_attributes__r7   r   r   r   r      s3     M %
- 	( 	(Gr   r   N)r<   
__future__r   r   r   googlecloudsdk.api_lib.alloydbr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.alloydbr   r	   googlecloudsdk.corer
   ReleaseTracksr!   ALPHABETAGAUpdateCommandr   r7   r   r   <module>rJ      s|    ) &  ' 3 ( 4 : * T..33T5F5F5I5I/GT /G/Gr   