
    	                         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  G d d	ej                        Zd
dde_        y)zCCommand for getting NAT IP information from Compute Engine routers.    )absolute_import)division)unicode_literals)base_classes)base)flagsc                   *    e Zd ZdZdZed        Zd Zy)GetNatIpInfoz'Display NAT IP information in a router.Nc                     t        j                         | _        | j                  j                  |d       t        j                  |       t
        j                  j                  |       y )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ArgszGetNatIpInfo.Args    sJ    "113CNNNv6GH%%f-MM""6*    c                    t        j                  | j                               }|j                  }| j                  j                  ||j                  t        j                  |            }|j                         }|j                  r|j                  |d<    |j                  j                  di |}|j                  |j                  j                  d|fg      d   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   RunzGetNatIpInfo.Run'   s    **4+<+<+>?F]]F22"88@ 3 J  F}}--fY?foo??I&IG!7!7!?!?!/!:  ; <<=? ?r   )__name__
__module____qualname____doc__r   classmethodr   r1   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)r5   
__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>r@      sG    J &  ' 7 ( E M?4'' ?@;

 r   