
    <                         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	KJr  S
r " S S\
R                   5      rSS jrSS jrSS jrS rS rS rS rS rg)z8Flags and helpers for the compute vpn-gateways commands.    )absolute_import)division)unicode_literals)arg_parsers)base)
completers)flags)	arg_utilsa(      table(
      name,
      vpnInterfaces[0].ipAddress:label=INTERFACE0,
      vpnInterfaces[1].ipAddress:label=INTERFACE1,
      vpnInterfaces[0].ipv6Address:label=INTERFACE0_IPV6,
      vpnInterfaces[1].ipv6Address:label=INTERFACE1_IPV6,
      network.basename(),
      region.basename()
    )c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )VpnGatewaysCompleter(   z0A VPN gateway completer for a resource argument.c                 4   > [         [        U ]
  " SSSS.UD6  g )Ncompute.vpnGatewaysz%alpha compute vpn-gateways list --uri)
collectionlist_command )superr   __init__)selfkwargs	__class__s     <lib/googlecloudsdk/command_lib/compute/vpn_gateways/flags.pyr   VpnGatewaysCompleter.__init__+   s(    	
. (<     r   )__name__
__module____qualname____firstlineno____doc__r   __static_attributes____classcell__)r   s   @r   r   r   (   s    8 r   r   c           
      Z    [         R                  " S[        USU S[         R                  S9$ )z>Returns the resource argument object for the VPN gateway flag.VPN GatewayzVPN Gatewaysr   )resource_name	completerpluralcustom_pluralrequiredregional_collectionregion_explanation)compute_flagsResourceArgumentr   REGION_PROPERTY_EXPLANATION)r(   r&   s     r   GetVpnGatewayArgumentr.   2   s2    		'	'!$"/&BB
D Dr   c                 B    [         R                  " SS[        SU SSSSS9	$ )	z0Returns the flag for specifying the VPN gateway.z--vpn-gatewayr#   Fr   zJReference to a VPN gateway, this flag is used for creating HA VPN tunnels.MShould be the same as region, if not specified, it will be automatically set.z=        Reference to a Highly Available VPN gateway.
        	namer$   r%   r&   r(   r)   
short_helpr*   detailed_helpr+   r,   r   r(   s    r   %GetVpnGatewayArgumentForOtherResourcer7   >   s6    		'	'!$/$:
 r   c                 B    [         R                  " SS[        SU SSSSS9	$ )	z5Returns the flag for specifying the peer VPN gateway.z--peer-gcp-gatewayr#   Fr   a"  Peer side Highly Available VPN gateway representing the remote tunnel endpoint, this flag is used when creating HA VPN tunnels from Google Cloud to Google Cloud.Either --peer-external-gateway or --peer-gcp-gateway must be specified when creating VPN tunnels from High Available VPN gateway.r0   zI        Reference to the peer side Highly Available VPN gateway.
        r1   r5   r6   s    r   )GetPeerVpnGatewayArgumentForOtherResourcer9   P   s7    		'	'!$/B
:
 r   c                  ,    [         R                  " SSS9$ )z-Returns the flag for VPN gateway description.z--descriptionz5An optional, textual description for the VPN gateway.)help)r   Argumentr   r   r   GetDescriptionFlagr=   f   s    	B
D Dr   c                  V    [         R                  " S[        R                  " SS9SSSS9$ )z_Returns the flag for interconnect attachments (VLAN attachments) associated with a VPN gateway.z--interconnect-attachments   )
max_lengthFINTERCONNECT_ATTACHMENTSa        Names of interconnect attachments (VLAN attachments) associated with the
      VPN gateway interfaces. You must specify this field when using a VPN gateway
      for HA VPN over Cloud Interconnect. Otherwise, this field is optional.

      For example,
      `--interconnect-attachments attachment-a-zone1,attachment-a-zone2`
      associates VPN gateway with attachment from zone1 on interface 0 and with
      attachment from zone2 on interface 1.
      )typer(   metavarr;   )r   r<   r   ArgListr   r   r   GetInterconnectAttachmentsFlagrE   m   s/    	"!,(	

 r   c                 *    U R                  USUUS.S9$ )z[Generates an interconnect attachment reference from the specified name, region and project.zcompute.interconnectAttachments)projectregion)r   params)Parse)	resourcesr2   rH   rG   s       r   GetInterconnectAttachmentRefrL      s)    	
2 
 
	 	r   c                  T    [         R                  " SSSSS.[        R                  SS9$ )zmReturns the flag for VPN gateway stack type.

Return:
  An enum presents the stack type for the VPN gateway.
z--stack-typez2Only IPv4 protocol is enabled on this VPN gateway.z=Both IPv4 and IPv6 protocols are enabled on this VPN gateway.z2Only IPv6 protocol is enabled on this VPN gateway.)	IPV4_ONLY	IPV4_IPV6	IPV6_ONLYz|      The stack type of the protocol(s) enabled on this VPN gateway.
      If not provided, `IPV4_ONLY` will be used.
      choicesrB   r;   r   r<   r
   ChoiceToEnumNamer   r   r   GetStackTyperU      s6     
KMK %%

 r   c                  R    [         R                  " SSSS.[        R                  SS9$ )zuReturns the flag for VPN gateway IP version.

Return:
  An enum presents the gateway IP version for the VPN gateway.
z--gateway-ip-versionzBEvery HA-VPN gateway interface is configured with an IPv4 address.zBEvery HA-VPN gateway interface is configured with an IPv6 address.)IPV4IPV6z      IP version of the HA VPN gateway. You must specify either IPv4 or IPv6. If
      you do not specify this field, every HA VPN gateway interface will be
      configured with an IPv4 address.
      rQ   rS   r   r   r   GetGatewayIpVersionrY      s7     
	 %%

 r   N)TF)F)r   
__future__r   r   r   googlecloudsdk.callioper   r   "googlecloudsdk.command_lib.computer   compute_completersr	   r+   $googlecloudsdk.command_lib.util.apisr
   DEFAULT_LIST_FORMATListCommandCompleterr   r.   r7   r9   r=   rE   rL   rU   rY   r   r   r   <module>ra      sg    ? &  ' / ( O E :		 -BB 	D$,D&	.r   