
                             S r SSKJr  SSKJr  SSKJr  SSK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KJr   " S S\R*                  5      r\R.                  " S5      SSS.\l        g)z8Command for removing a NAT from a Compute Engine router.    )absolute_import)division)unicode_literalsN)encoding)base_classes)utils)base)flags)
nats_utilsc                   >    \ rS rSrSrSr\S 5       rS rS r	S r
Srg)	AlphaDelete    zdRemove a NAT from a Compute Engine router.

*{command}* removes a NAT from a Compute Engine router.
Nc                     [         R                  " 5       U l        U R                  R                  U5        [        R
                  " USSSS9  [        R                  " USSS9  g )NNATdeleteT)operation_typeplural)routers_flagsRouterArgumentForNat
ROUTER_ARGAddArgumentcompute_flagsAddRegionFlag
nats_flagsAddNatNameArg)clsparsers     *lib/surface/compute/routers/nats/delete.pyArgsAlphaDelete.Args(   sO    "779CNNNv&ht= VHTJ    c           	          UR                   R                  SUR                  R                  UR	                  5       UUR
                  UR                  S94$ )NPatch)routerrouterResourceregionproject)apitools_clientroutersmessagesComputeRoutersPatchRequestNamer&   r'   )selfclient
router_refreplacements       r   _GetPatchRequestAlphaDelete._GetPatchRequest2   sS    ""**GOO66!(*!(("**	 7 ,- -r!   c                     [         R                  " U5      nUR                   H4  n[        R                  " XE5      nUR
                  R                  U5        M6     UR
                  (       d  UR                  S5        U$ )zBMutate the router and record any cleared_fields for Patch request.nats)r   CopyProtoMessagenamer   FindNatOrRaiser4   removeappend)r-   argsexistingcleared_fieldsr0   r6   nats          r   ModifyAlphaDelete.Modify:   sc    ++H5K		%%k8cc" 
 F#r!   c           
         [         R                  " U R                  5       5      nUR                  nU R                  R                  XR                  5      nUR                  UR                  R                  SUR                  R                  " S0 UR                  5       D64/5      n/ nU R                  XS   U5      n[        R                  " SSR!                  UR"                  UR%                  5       5      /5        UR                  R'                  U5         UR                  U R)                  X4U5      /5      nS S S 5        U$ ! , (       d  f       W$ = f)NGetr   r   z{} in router {} )r   ComputeApiHolderReleaseTrackr.   r   ResolveAsResource	resourcesMakeRequestsr(   r)   r*   ComputeRoutersGetRequestAsDictr>   r   PromptForDeletionHelperformatr6   r,   IncludeFieldsr1   )	r-   r:   holderr.   r/   objectsr<   
new_objectresults	            r   RunAlphaDelete.RunH   s+   **4+<+<+>?F]]F2249I9IJJ!!

 
 
(
(%
//
2
2
IZ5F5F5H
I
K 	LMG
 NT1:~>J	!!!((JOO4EFGI 
			-	-n	=""  Z@
ACf 
> M	 
>	= Ms   #E
ErB   )__name__
__module____qualname____firstlineno____doc__r   classmethodr   r1   r>   rQ   __static_attributes__rB   r!   r   r   r       s1    
 *K K-r!   r   zN          *{command}* is used to delete a NAT on a Compute Engine router.
    zg    To delete NAT 'n1' in router 'r1', run:

      $ {command} n1 --router=r1 --region=us-central1
    a      This command, when specified without alpha or beta, uses the compute/v1/routers API. The full documentation
    for this API can be found at: https://cloud.google.com/compute/docs/reference/rest/v1/routers/

    The beta command uses the compute/beta/routers API. The full documentation
    for this API can be found at: https://cloud.google.com/compute/docs/reference/rest/beta/routers/

    The alpha command uses the compute/alpha/routers API. Full documentation is not available for the alpha API.
    )DESCRIPTIONEXAMPLESzAPI REFERENCE)rW   
__future__r   r   r   textwrapapitools.base.pyr   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper	   "googlecloudsdk.command_lib.computer
   r   *googlecloudsdk.command_lib.compute.routersr   /googlecloudsdk.command_lib.compute.routers.natsr   r   DeleteCommandr   dedentdetailed_helprB   r!   r   <module>rg      sh    ? &  '  % 7 0 ( E M O F=$$$ =D 	  		 r!   