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

        $ {command} --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)r7   
__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   DescribeCommandr
   dedentdetailed_helpr   r   r   <module>rE      s`    7 &  '  7 ( E M O4 4 	 	 	
 r   