
    	                         d Z ddlmZ ddlmZ ddlmZ ddl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  G d
 de	j&                        Z ej*                  d      dde_        y)z0Command to list NATs on a Compute Engine router.    )absolute_import)division)unicode_literalsN)base_classes)base)flags)
nats_utilsc                   &    e Zd ZdZed        Zd Zy)Listz*Lists the NATs on a Compute Engine router.c                    t        j                         | _        | j                  j                  |       t	        j
                  |       |j                  j                  t        j                         t        j                  |dd       y )NzNAT containing the Ruleslist)operation_type)routers_flagsRouterArgumentForNat
ROUTER_ARGAddArgumentrules_flagsAddNatNameArgdisplay_info	AddFormatDEFAULT_LIST_FORMATcompute_flagsAddRegionFlag)clsparsers     .lib/surface/compute/routers/nats/rules/list.pyArgsz	List.Args"   sc    "779CNNNv&f%
!!+"A"AB*6C    c                    t        j                  | j                               }|j                  j                  }|j                  j
                  j                  }| j                  j                  ||j                        }|j                  }|j                   |di |j                               }|j                  }t        j                  ||      }	|	j                   S )N )r   ComputeApiHolderReleaseTrackclientmessagesapitools_clientroutersr   ResolveAsResource	resourcesComputeRoutersGetRequestGetAsDictnatr	   FindNatOrRaiserules)
selfargsholderr$   service
router_refrequest_typerouternat_namer,   s
             r   RunzList.Run.   s    **4+<+<+>?F}}%%Hmm++33G2249I9IJJ44L[[<
(9(9(;<=FxxH

#
#FH
5C99r   N)__name__
__module____qualname____doc__classmethodr   r7   r    r   r   r   r      s    2	C 	Cr   r   zK        *{command}* is used to list the Rule on a Compute Engine NAT.
     z    To list all Rules in Nat ``n1'' in router ``r1'' in region ``us-central1'',
    run:

        $ {command} --nat=n1 --router=r1 --region=us-central1.
    )DESCRIPTIONEXAMPLES)r;   
__future__r   r   r   textwrapgooglecloudsdk.api_lib.computer   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer   r   *googlecloudsdk.command_lib.compute.routersr   /googlecloudsdk.command_lib.compute.routers.natsr	   5googlecloudsdk.command_lib.compute.routers.nats.rulesr   DescribeCommandr   dedentdetailed_helpr    r   r   <module>rJ      s_    7 &  '  7 ( E M F V4 D 	 	 	
	 r   