
                            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	S
.rS r\R                  " \R                   R"                  \R                   R$                  \R                   R&                  5      \R(                   " S S\R*                  5      5       5       r\R.                  " \R0                  R2                  /S/\R4                  S9\R.                  " \R0                  R2                  /S/\R6                  S9\R.                  " \R0                  R2                  /SS/\R8                  S9/rg)z*Describes a Gcloud Deploy Policy resource.    )encoding)
exceptions)base)deploy_policy_util)manifest_util)resource_argsz{description}z   To describe a deploy policy called 'test-policy' in region 'us-central1', run:

     $ {command} test-policy --region=us-central1

)DESCRIPTIONEXAMPLESc                 .    [         R                  " U SS9  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)
positionalN)r   AddDeployPolicyResourceArgparsers    .lib/surface/deploy/deploy_policies/describe.py_CommonArgsr   %   s     **6dC    c                   p    \ rS rSrSr\r\S 5       r\	R                  " \R                  5      S 5       rSrg)Describe/   z#Show details about a deploy policy.c                     [        U 5        g )N)r   r   s    r   ArgsDescribe.Args8   s
    r   c                 X   UR                   R                  R                  5       n[        R                  " U5      n[
        R                  " U5      n[        R                  " U[        [        R                  R                  UR                  5       UR                  UR                  5        U$ )z9This is what gets called when the user runs this command.)CONCEPTSdeploy_policyParser   GetDeployPolicyr   MessageToDictr   ApplyTransforms_TRANSFORMSResourceKindDEPLOY_POLICYName
projectsIdlocationsId)selfargs
policy_ref
policy_objmanifests        r   RunDescribe.Run<   s    
 ,,224J#33J?J%%j1H!!""00 Or    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   /   sF    
 , -  44))r   r   name)kindsfieldsmovez7rules[].rolloutRestriction.timeWindows.oneTimeWindows[])r<   r=   replacez@rules[].rolloutRestriction.timeWindows.weeklyWindows[].startTimez>rules[].rolloutRestriction.timeWindows.weeklyWindows[].endTimeN)r2   apitools.base.pyr   googlecloudsdk.api_lib.utilr   r6   googlecloudsdk.callioper   !googlecloudsdk.command_lib.deployr   r8   r   r   r3   r   ReleaseTracksReleaseTrackALPHABETAGADefaultUniverseOnlyDescribeCommandr   TransformConfigr!   r"   AddApiVersionAndKind&ConvertPolicyOneTimeWindowToYamlFormatConvertTimeProtoToStringr    r-   r   r   <module>rO      sB   1 & F ( @ M ; ; #D T..33T5F5F5I5I t##  D !!))778 x// !!))778IJDD
 !!))778NL
 66r   