
                         2   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  \R                  " \R                  R                  \R                  R                   \R                  R"                  5       " S	 S
\R$                  5      5       rS rg)zDescribes a AlloyDB cluster.    )absolute_import)division)unicode_literals)api_util)base)flags)
propertiesc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Describe   z:Describe an AlloyDB cluster in a given project and region.z{description}zc        To describe a cluster, run:

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

Args:
  parser: argparse.Parser: Parser object for command line inputs.
N)r   	AddRegion
AddCluster)parsers    (lib/surface/alloydb/clusters/describe.pyArgsDescribe.Args+   s     
OOF	V    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                  S9nUR                  UR                  5       S9nUR                   R#                  U5      n[%        UR&                  5        U$ )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)
projectsIdlocationsId
clustersId)name)r   AlloyDBClientReleaseTrackalloydb_clientalloydb_messagesresource_parserCreater	   VALUEScoreproject	GetOrFailregioncluster*AlloydbProjectsLocationsClustersGetRequestRelativeNameprojects_locations_clustersGet!normalize_automated_backup_policyautomatedBackupPolicy)selfargsclientr   r   cluster_refreqr'   s           r   RunDescribe.Run5   s     ##D$5$5$78F**N..((//-$$))11;;KKDLL 0 :K 
E
E%%' F C 88<<SAG%g&C&CDNr    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r3   __static_attributes__r5   r   r   r   r      s2     C 		-  r   r   c                     U c  gU R                   c  gU R                   R                   H  nUR                  b  M  SUl        M     g)z<Normalizes the policy so that it looks correct when printed.Nr   )weeklySchedule
startTimeshours)policy
start_times     r   r,   r,   N   sE    ^
"
))44j
 j 5r   N)r:   
__future__r   r   r   googlecloudsdk.api_lib.alloydbr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.alloydbr   googlecloudsdk.corer	   ReleaseTracksr   ALPHABETAGADescribeCommandr   r,   r5   r   r   <module>rN      s|    # &  ' 3 ( 4 * D%%++T->->-C-C%%((*.t## .*.br   