
                            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)Createz.Create the IAP TCP Destination Group resource.EXAMPLESa            To create a DestGroup with name ``GROUP_NAME'', in region ``REGION''
          in the current project run:

          $ {command} GROUP_NAME --region=REGION

          To create a DestGroup with name ``GROUP_NAME'', in region ``REGION''
          with ip ranges ``CIDR1'', ``CIDR2'' in the current project run:

          $ {command} GROUP_NAME --region=REGION --ip-range-list=CIDR1,CIDR2

          To create a DestGroup with name ``GROUP_NAME'', in region ``REGION''
          with fqdns ``FQDN1'', ``FQDN2'' in the current project run:

          $ {command} GROUP_NAME --region=REGION --fqdn-list=FQDN1,FQDN2

          To create a DestGroup with name ``GROUP_NAME'', in region ``REGION''
          with fqdns ``FQDN1'', ``FQDN2'' and ip ranges ``CIDR1'',``CIDR2'' in
          the project ``PROJECT_ID'' run:

          $ {command} GROUP_NAME --region=REGION --fqdn-list=FQDN1,FQDN2
          --ip-range-list=CIDR1,CIDR2 --project=PROJECT_ID

          GROUP_NAME can only contain lower-case letters (a-z) and dashes (-).
          c                     t        j                  |        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AddDestGroupArgsAddDestGroupCreateIpAndFqdnArgsr   URI_FLAGRemoveFromParser)parsers    )lib/surface/iap/tcp/dest_groups/create.pyArgszCreate.Args:   s2     f%,,V4MM""6*    c                     t        j                  | j                         |      }|j                  |j                  |j
                        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   ParseIapDestGroupResourceReleaseTrackr	   ip_range_list	fqdn_list)selfargsiap_setting_refs      r   Runz
Create.RunF   s?     88T#O!!$"4"4dnnEEr   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r    r   r   r	   r	      s0     7-: 	+ 	+Fr   r	   N)r!   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.iapr   r   ReleaseTracksr   ALPHABETAGACommandr	   r$   r   r   <module>r-      ss    ( &  ' ( ; D%%++T->->-C-C%%((*7FT\\ 7F*7Fr   