
    X                     N   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S	.rS
 r\R                  " \R                  R                  \R                  R                   \R                  R"                  5      \R$                   " S S\R&                  5      5       5       rg)z*Describes a Gcloud Deploy target resource.    )
exceptions)base)describe)flags)resource_argsz{description}z     To describe a target called 'test' for delivery pipeline 'test-pipeline' in region 'us-central1', run:

       $ {command} test --delivery-pipeline=test-pipeline --region=us-central1

  )DESCRIPTIONEXAMPLESc                     [         R                  " U SS9  [        R                  " U SS9  [        R                  " U 5        [        R
                  " U 5        g)zRegister flags for this command.

Args:
  parser: An argparse.ArgumentParser-like object. It is mocked out in order to
    capture some information, but behaves like an ArgumentParser.
T)
positionalF)requiredN)r   AddTargetResourceArgr   AddDeliveryPipelineAddListAllPipelinesAddSkipPipelineLookupparsers    &lib/surface/deploy/targets/describe.py_CommonArgsr   &   s@     $$V=FU3F#f%    c                   p    \ rS rSrSr\r\S 5       r\	R                  " \R                  5      S 5       rSrg)Describe3   a  Describes details specific to the individual target, delivery pipeline qualified.

The output contains four sections:

Target:

  detail of the target to be described.

Latest Release:

  the detail of the active release in the target.

Latest Rollout:

  the detail of the active rollout in the target.

Deployed:

  timestamp of the last successful deployment.

Pending Approvals:

  list of the rollouts that require approval.
c                     [        U 5        g )N)r   r   s    r   ArgsDescribe.ArgsR   s
    r   c                     UR                   R                  R                  5       n[        R                  " X!R
                  UR                  UR                  5      $ )z9This is what gets called when the user runs this command.)CONCEPTStargetParser   DescribeTargetdelivery_pipelineskip_pipeline_lookuplist_all_pipelines)selfargs
target_refs      r   RunDescribe.RunV   sI    
 %%++-J"":/E/E#'#<#<#'#:#:< <r    N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpstaticmethodr   gcloud_exception CatchHTTPErrorRaiseHTTPExceptiondeploy_exceptionsHTTP_ERROR_FORMATr'   __static_attributes__r)   r   r   r   r   3   sH    2 !-  44))<<r   r   N)r.   googlecloudsdk.api_lib.utilr   r2   googlecloudsdk.callioper   !googlecloudsdk.command_lib.deployr   r4   r   r   r/   r   ReleaseTracksReleaseTrackALPHABETAGADefaultUniverseOnlyDescribeCommandr   r)   r   r   <module>rA      s    1 G ( 6 M 3 ; 			

& D%%++T->->-C-C%%((*)<t## )< *)<r   