
    	                         S 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S
SS.\l        g)zCCommand for getting NAT IP information from Compute Engine routers.    )absolute_import)division)unicode_literals)base_classes)base)flagsc                   2    \ rS rSrSrSr\S 5       rS rSr	g)GetNatIpInfo   z'Display NAT IP information in a router.Nc                     [         R                  " 5       U l        U R                  R                  USS9  [         R                  " U5        [
        R                  R                  U5        g )Nzget NAT IP info)operation_type)routers_flagsRouterArgument
ROUTER_ARGAddArgumentAddGetNatIpInfoArgsr   URI_FLAGRemoveFromParser)clsparsers     .lib/surface/compute/routers/get_nat_ip_info.pyArgsGetNatIpInfo.Args    sJ    "113CNNNv6GH%%f-MM""6*    c                    [         R                  " U R                  5       5      nUR                  nU R                  R                  UUR                  [        R                  " U5      S9nUR                  5       nUR                  (       a  UR                  US'   UR                  R                  " S0 UD6nUR                  UR                  R                  SU4/5      S   $ )N)scope_listernatNamer
   r    )r   ComputeApiHolderReleaseTrackclientr   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListerAsDictnat_namemessages!ComputeRoutersGetNatIpInfoRequestMakeRequestsapitools_clientrouters)selfargsholderr!   
router_refparamsrequests          r   RunGetNatIpInfo.Run'   s    **4+<+<+>?F]]F22"88@ 3 J  F}}--fYoo??I&IG!7!7!?!?!/!:  ; <<=? ?r   r   )
__name__
__module____qualname____firstlineno____doc__r   classmethodr   r3   __static_attributes__r   r   r   r
   r
      s!    /*+ +?r   r
   zy
        $ {command}

        shows a mapping of IP:[usage, mode]
        allocated to each NAT via the specified router.aU          To show NAT IP information from all NATs in router 'r1' in region
        'us-central1', run:

            $ {command} r1 --region=us-central1

        To show NAT IP information for a specific NAT 'nat1' in router 'r1' in
        region 'us-central1', run:

            $ {command} r1 --region=us-central1 --nat-name="nat1"
        )DESCRIPTIONEXAMPLESN)r9   
__future__r   r   r   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer   r$   *googlecloudsdk.command_lib.compute.routersr   DescribeCommandr
   detailed_helpr   r   r   <module>rE      sG    J &  ' 7 ( E M?4'' ?@;

 r   