
                            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	  ej                  ej                  j                  ej                  j                  ej                  j                         G d dej                               Zy	)
z!Create IAP TCP Destination Group.    )absolute_import)division)unicode_literals)base)utilc                   .    e Zd ZdZddiZed        Zd Zy)Listz-Lists the IAP TCP Destination Group resource.EXAMPLESa  
          To list all Destination Groups in the current project run:

          $ {command}

          To list all Destination Groups in region ``REGION'' in the current
          project run:

          $ {command} --region=REGION

          To limit the results returned by the server to be at most ``PAGE_SIZE'',
          run:

          $ {command} --page-size=PAGE_SIZE

          To list at most `5` Destination Groups sorted alphabetically by project
          ID, run:

          $ {command} --sort-by=projectId --limit=5

          To list all Destination Groups in the project ``PROJECT'' run:

          $ {command} --project=PROJECT

          To list all Destination Groups that have cidr ``CIDR'' run:

          $ {command} --filter="cidrs=CIDR"

          To list all Destination Groups that have FQDN ``FQDN'' run:

          $ {command} --filter="fqdns=FQDN"

          To list all Destination Groups that have name ``NAME'' run:

          $ {command} --filter="name=NAME"
          c                 l    t        j                  |        t        j                  j	                  |        y)zRegisters flags for this command.

    Args:
      parser: An argparse.ArgumentParser-like object. It is mocked out in order
        to capture some information, but behaves like an ArgumentParser.
    N)iap_utilAddDestGroupListRegionArgsr   URI_FLAGRemoveFromParser)parsers    'lib/surface/iap/tcp/dest_groups/list.pyArgsz	List.ArgsF   s$     ''/MM""6*    c                     t        j                  | j                         |      }|j                  |j                  |j
                        }t        |      S )a  This is what gets called when the user runs this command.

    Args:
      args: An argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      The specified function with its description and configured filter
    )r   &ParseIapDestGroupResourceWithNoGroupIdReleaseTrackr	   	page_sizelimitlist)selfargsiap_setting_refresults_to_yields       r   RunzList.RunR   sK     EET#O&++DNNDJJG
  !!r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r    r   r   r	   r	      s0     6$'-R 	+ 	+"r   r	   N)r"   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.iapr   r   ReleaseTracksr   ALPHABETAGAListCommandr	   r%   r   r   <module>r.      su    ( &  ' ( ; D%%++T->->-C-C%%((*H"4 H"*H"r   