
    U                        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	  \R                  " \R                  R                  \R                  R                  \R                  R                  5       " S S\R                  5      5       rg	)
z!Create IAP TCP Destination Group.    )absolute_import)division)unicode_literals)base)utilc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	Update   z.Update the IAP TCP Destination Group resource.EXAMPLESa            To update a DestGroup with name ``GROUP_NAME'', in region ``REGION''
          with ip ranges ``CIDR1'', ``CIDR2'' in the current project run:

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

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

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

          To update 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} DEST_GROUP_NAME --region=REGION --fqdn-list=FQDN1,FQDN2
          --ip-range-list=CIDR1,CIDR2 --project=PROJECT_ID

          To clear the fqdn list in a DestGroup with name ``GROUP_NAME'', in
          region ``REGION'' in the current project run:

          $ {command} DEST_GROUP_NAME --region=REGION --fqdn-list=""

          To clear the ip range list in a DestGroup with name ``GROUP_NAME'', in
          region ``REGION'' in the current project run:

          $ {command} DEST_GROUP_NAME --region=REGION --ip-range-list=""
          c                 \    [         R                  " U 5        [         R                  " U 5        g)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AddDestGroupUpdateIpAndFqdnArgs)parsers    )lib/surface/iap/tcp/dest_groups/update.pyArgsUpdate.Args=   s      f%,,V4    c                 v   [         R                  " U R                  5       U5      nSnUR                  S5      (       a  UR                  S5      (       a  SnO=UR                  S5      (       a  SnO$UR                  S5      (       a  SnO[	        S5      eUR                  UR                  UR                  U5      $ )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
Raises:
  ValueError: If both ip-range-list and fqdn-list are not provided
 ip_range_list	fqdn_list*cidrsfqdnsz:The flags --fqdn-list or --ip-range-list must be provided.)r   ParseIapDestGroupResourceReleaseTrackIsSpecified
ValueErrorr	   r   r   )selfargsiap_setting_refupdate_masks       r   Run
Update.RunH   s     88T#O K((T-=-=k-J-Jk			/	*	*k			+	&	&k
FH H!!$"4"4dnn"-/ /r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r$   __static_attributes__r&   r   r   r	   r	      s0     7-@ 5 5/r   r	   N)r+   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.iapr   r   ReleaseTracksr   ALPHABETAGACommandr	   r&   r   r   <module>r7      sq    ( &  ' ( ; D%%++T->->-C-C%%((*G/T\\ G/*G/r   