
                             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	 ddlm
Z  G d d	e	j                        Z G d
 de	j                        Z G d de	j                        ZddZd Zy)z>Flags and helpers for the compute target-tcp-proxies commands.    )absolute_import)division)unicode_literals)arg_parsers)
completers)flagsc                        e Zd Z fdZ xZS )GlobalTargetTcpProxiesCompleterc                 2    t        t        | 
  dddd| y )Ncompute.targetTcpProxiesz.compute target-tcp-proxies list --global --uri
collectionlist_command )superr
   __init__selfkwargs	__class__s     Blib/googlecloudsdk/command_lib/compute/target_tcp_proxies/flags.pyr   z(GlobalTargetTcpProxiesCompleter.__init__   s(    	
)49 -E     __name__
__module____qualname__r   __classcell__r   s   @r   r
   r
      s     r   r
   c                        e Zd Z fdZ xZS )!RegionalTargetTcpProxiesCompleterc                 2    t        t        | 
  dddd| y )Ncompute.regionTargetTcpProxiesz7compute target-tcp-proxies list --filter=region:* --urir   r   )r   r    r   r   s     r   r   z*RegionalTargetTcpProxiesCompleter.__init__&   s(    	
+T; 3N r   r   r   s   @r   r    r    #   s     r   r    c                        e Zd Z fdZ xZS )TargetTcpProxiesCompleterc                 D    t        t        | 
  ddt        t        gi| y )Nr   r   )r   r$   r   r
   r    r   s     r   r   z"TargetTcpProxiesCompleter.__init__/   s-    	
#T3 +-N
 	r   r   r   s   @r   r$   r$   -   s     r   r$   c           
      h    t        j                  dt        |d| d|rdnd t         j                        S )Nztarget TCP proxyztarget TCP proxiesr   r"   )resource_name	completerpluralcustom_pluralrequiredglobal_collectionregional_collectionregion_explanation)compute_flagsResourceArgumentr$   REGION_PROPERTY_EXPLANATION)r+   r)   allow_regionals      r   TargetTcpProxyArgumentr3   7   s=    		'	'&)(2	 ;!&BB	
D 	Dr   c                 H    | j                  dt        j                  d       y)zAdds the --proxy-bind argument.z--proxy-bindaI        This field only applies when the forwarding rule that references this
      target proxy has a `--load-balancing-scheme` set to `INTERNAL_SELF_MANAGED`.

      When this field is set to `true`, Envoy proxies set up inbound traffic
      interception and bind to the IP address and port specified in the
      forwarding rule. This is generally useful when using Traffic Director to
      configure Envoy as a gateway or middle proxy (in other words, not a
      sidecar proxy). The Envoy proxy listens for inbound requests and handles
      requests when it receives them.
      )actionhelpN)add_argumentr   StoreTrueFalseAction)parsers    r   AddProxyBindr:   D   s&    --

  r   N)TFF)__doc__
__future__r   r   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer   compute_completersr   r/   ListCommandCompleterr
   r    r$   r3   r:   r   r   r   <module>rA      sa    E &  ' / O E&8&M&M (:(O(O  2 G G 
Dr   