
                         P    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 r	S r
g	)
z7Tunnel TCP traffic over Cloud IAP WebSocket connection.    )absolute_import)division)unicode_literals)
iap_tunnel)logc                 &    U R                  SSSS9  g )Nz--tunnel-through-iap
store_truez      Tunnel the ssh connection through Identity-Aware Proxy for TCP forwarding.

      To learn more, see the
      [IAP for TCP forwarding documentation](https://cloud.google.com/iap/docs/tcp-forwarding-overview).
      )actionhelp)add_argument)parsers    0lib/googlecloudsdk/command_lib/app/iap_tunnel.pyAddSshTunnelArgsr      s     
  	    c                 Z   [        U S5      (       d  gUR                  R                  R                  nU R	                  S5      (       aQ  U R
                  (       d   [        R                  R                  S5        g[        R                  R                  S5        OCUR                  R                  UR                  La   [        R                  R                  S5        g[        R                  " 5       nUR                  Ul        X7l        UR"                  Ul        UR&                  Ul        U$ )a  Construct an SshTunnelArgs from command line args and values.

Args:
  args: The parsed commandline arguments. May or may not have had
    AddSshTunnelArgs called.
  api_client: An appengine_api_client.AppEngineApiClient.
  track: ReleaseTrack, The currently running release track.
  project: str, the project id (string with dashes).
  version: The target version reference object.
  instance: The target instance reference object.

Returns:
  SshTunnelArgs or None if IAP Tunnel is disabled.
tunnel_through_iapNzPIAP tunnel is disabled; ssh/scp operations that require IAP tunneling will fail.zRIAP tunnel is enabled; ssh/scp operations that require IAP tunneling will succeed.z@External IP address was found while IAP tunneling not specified;)hasattrmessagesNetworkInstanceIpModeValueValuesEnumIsSpecifiedr   r   statusPrintnetworkinstanceIpModeINTERNALr   SshTunnelArgsprefixtrackproject
vmZoneNamezoneidinstance)args
api_clientr   r    versionr$   instance_ip_mode_enumress           r   CreateSshTunnelArgsr*   &   s      
+	,	, !!?? 
 
*++""	jj&  
jj) %%-B-K-KK	jj
L   "#ll#)+  #(#,	*r   N)__doc__
__future__r   r   r   "googlecloudsdk.command_lib.computer   googlecloudsdk.corer   r   r*    r   r   <module>r0      s#    > &  ' 9 #
5r   