
    a
                         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)zACommand for removing 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)RemoveRoutePolicyz3Remove a route policy from a Compute Engine router.Nc                     t        j                         t        _        t        j                  j	                  |d       |j                  ddd       y )Ndelete)operation_typez--policy-namez'Name of the route policy to be removed.T)helprequired)r   RouterArgumentr
   
ROUTER_ARGAddArgumentadd_argument)clsparsers     2lib/surface/compute/routers/remove_route_policy.pyArgszRemoveRoutePolicy.Args!   sI    #(#7#7#9   ,,VH,M
:      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 )zIssues the request necessary for removing a route policy from a Router.

    Args:
      args: contains arguments passed to the command.

    Returns:
      The result of patching the router removing the route policy.
    )scope_listerDeleteRoutePolicypolicyr    )r   ComputeApiHolderReleaseTrackclientr
   r   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListerapitools_clientroutersmessages&ComputeRoutersDeleteRoutePolicyRequestAsDictpolicy_nameMakeRequests)selfargsholderr    
router_refrequests         r   RunzRemoveRoutePolicy.Run+   s     **4+<+<+>?F]]F"--??"88@ @ J 	&&>>> 	
!	
*.*:*:	
G y)!,,r   )__name__
__module____qualname____doc__r   classmethodr   r1   r   r   r   r
   r
      s!    ;* -r   r
   zE  *{command}* removes a route policy from a Compute Engine router.
  z       To remove 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)r5   
__future__r   r   r   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer   r#   *googlecloudsdk.command_lib.compute.routersUniverseCompatibleDeleteCommandr
   detailed_helpr   r   r   <module>rA      s]     H &  ' 7 ( E < (-** (- (-V	
#  r   