
    f                         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 dZ G d d	ej                        Z G d
 dej                        Z G d dej                        Zd ZddZy)z?Flags and helpers for the compute target-http-proxies commands.    )absolute_import)division)unicode_literals)
completers)flagsz4    table(
      name,
      urlMap.basename()
    )c                        e Zd Z fdZ xZS ) GlobalTargetHttpProxiesCompleterc                 2    t        t        | 
  dddd| y )Ncompute.targetHttpProxiesz/compute target-http-proxies list --global --uri
collectionlist_command )superr	   __init__selfkwargs	__class__s     Clib/googlecloudsdk/command_lib/compute/target_http_proxies/flags.pyr   z)GlobalTargetHttpProxiesCompleter.__init__"   s(    	
*D: .F     __name__
__module____qualname__r   __classcell__r   s   @r   r	   r	            r   r	   c                        e Zd Z fdZ xZS ) RegionTargetHttpProxiesCompleterc                 2    t        t        | 
  dddd| y )Ncompute.regionTargetHttpProxiesz8compute target-http-proxies list --filter=region:* --urir   r   )r   r    r   r   s     r   r   z)RegionTargetHttpProxiesCompleter.__init__+   s(    	
*D: 4O r   r   r   s   @r   r    r    )   r   r   r    c                        e Zd Z fdZ xZS )TargetHttpProxiesCompleterc                 D    t        t        | 
  ddt        t        gi| y )Nr   r   )r   r$   r   r	   r    r   s     r   r   z#TargetHttpProxiesCompleter.__init__4   s-    	
$d4 ,.N
 	r   r   r   s   @r   r$   r$   2   s     r   r$   c                 .    | j                  dd|d       y)zAdds the proxy bind argument.z--proxy-bind
store_truez      This flag applies when the load_balancing_scheme of the associated
      backend service is INTERNAL_SELF_MANAGED. When specified, the envoy binds
      to the forwarding rule's IP address and port. By default,
      this flag is off.
      )actiondefaulthelpN)add_argument)parserr)   s     r   AddProxyBindr-   <   s#    
	  	r   c           
      `    t        j                  dt        |d| ddt         j                        S )Nztarget HTTP proxyztarget HTTP proxiesr   r"   )resource_name	completerpluralcustom_pluralrequiredglobal_collectionregional_collectionregion_explanation)compute_flagsResourceArgumentr$   REGION_PROPERTY_EXPLANATION)r3   r1   s     r   TargetHttpProxyArgumentr:   J   s5    		'	''*)3;&BB
D Dr   N)TF)__doc__
__future__r   r   r   "googlecloudsdk.command_lib.computer   compute_completersr   r7   googlecloudsdk.command_lib.utilDEFAULT_LIST_FORMATListCommandCompleterr	   r    MultiResourceCompleterr$   r-   r:   r   r   r   <module>rC      sh    F &  ' O E 6	 '9'N'N '9'N'N !B!B 	Dr   