
    	                         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
 ej                   G d d	ej                               Zd
dde_        y)z@Command for getting a route policy from a Compute Engine router.    )absolute_import)division)unicode_literals)base_classes)base)flagsc                   *    e Zd ZdZdZed        Zd Zy)GetRoutePolicyz0Get a route policy from a Compute Engine router.Nc                     t        j                         t        _        t        j                  j	                  |d       |j                  ddd       y )Nget)operation_typez--policy-namez Name of the route policy to get.T)helprequired)r   RouterArgumentr
   
ROUTER_ARGAddArgumentadd_argument)clsparsers     /lib/surface/compute/routers/get_route_policy.pyArgszGetRoutePolicy.Args"   sH     % 4 4 6N))&)G
3      c                    t        j                  | j                               }|j                  }t        j
                  j                  ||j                  t        j                  |            }|j                  j                  d |j                  j                  di |j                         d|j                  if}|j!                  |g      d   S )zFIssues the request necessary for getting a route policy from a Router.)scope_listerr
   policyr    )r   ComputeApiHolderReleaseTrackclientr
   r   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListerapitools_clientroutersmessages#ComputeRoutersGetRoutePolicyRequestAsDictpolicy_nameMakeRequests)selfargsholderr   
router_refrequests         r   RunzGetRoutePolicy.Run,   s    **4+<+<+>?F]]F**<<"88@ = J 	&&;;; 	
!	
*.*:*:	
G y)!,,r   )__name__
__module____qualname____doc__r   classmethodr   r0   r   r   r   r
   r
      s!    8* -r   r
   zB  *{command}* gets a route policy from a Compute Engine router.
  z          To get a route policy `my-policy` from a router `my-router` in region `us-central1`, run:

            $ {command} my-router --region=us-central1 --policy-name=my-policy

          )DESCRIPTIONEXAMPLESN)r4   
__future__r   r   r   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer   r"   *googlecloudsdk.command_lib.compute.routersUniverseCompatibleDescribeCommandr
   detailed_helpr   r   r   <module>r@      s\     G &  ' 7 ( E < "-T)) "- "-L	
  r   