
                             S 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\R                  5      r
 " S	 S
\R                  5      rSS jrS rSS jrg)z4Flags and helpers for the compute url-maps commands.    )
completers)flagsz?    table(
      name,
      defaultService.type_suffix()
    )c                   (   ^  \ rS rSrU 4S jrSrU =r$ )GlobalUrlMapsCompleter   c                 4   > [         [        U ]
  " SSSS.UD6  g )Ncompute.urlMapsz$compute url-maps list --global --uri
collectionlist_command )superr   __init__selfkwargs	__class__s     8lib/googlecloudsdk/command_lib/compute/url_maps/flags.pyr   GlobalUrlMapsCompleter.__init__   s(    	
 $0 $<     r   __name__
__module____qualname____firstlineno__r   __static_attributes____classcell__r   s   @r   r   r           r   r   c                   (   ^  \ rS rSrU 4S jrSrU =r$ )RegionalUrlMapsCompleter&   c                 4   > [         [        U ]
  " SSSS.UD6  g )Ncompute.regionUrlMapsz-compute url-maps list --filter=region:* --urir
   r   )r   r!   r   r   s     r   r   !RegionalUrlMapsCompleter.__init__(   s(    	
"D2 *D r   r   r   r   s   @r   r!   r!   &   r   r   r!   c                   (   ^  \ rS rSrU 4S jrSrU =r$ )UrlMapsCompleter/   c                 F   > [         [        U ]
  " SS[        [        /0UD6  g )Nr   r   )r   r'   r   r   r!   r   s     r   r   UrlMapsCompleter.__init__1   s,    	
D* Q*,DEQIOQr   r   r   r   s   @r   r'   r'   /   s    Q Qr   r'   c                 \    [         R                  " SS[        UU SS[         R                  S9$ )Nurl_mapURL mapr	   r$   )nameresource_name	completerpluralrequiredglobal_collectionregional_collectionregion_explanation)compute_flagsResourceArgumentr'   REGION_PROPERTY_EXPLANATION)r2   r1   s     r   UrlMapArgumentr9   6   s5    		'	' )1&BB
D Dr   c            
      >    [         R                  " SS[        SSSSS9$ )a,  Flag for commands that only support global URL maps.

Returns:
  compute_flags.ResourceArgument with `--region` hidden from documentation
  and completion. Generates `--global` and `--region` flags for consistency;
  commands should check if the URL map is regional and raise an appropriate
  error.
r,   r-   r	   zE(Default) The URL map is global. Regional URL maps are not supported.r$   T)r.   r/   r0   r3   global_help_textr4   region_hidden)r6   r7   r   r   r   r   GlobalUrlMapArgumentr=   B   s0     
	'	'&) 2
 r   c                 `    [         R                  " SS[        SU SSSSR                  U5      S9	$ )	Nz	--url-mapr-   Fr	   r$   zWA reference to a URL map resource that defines the mapping of URLs to backend services.a+          A reference to a URL map resource. A URL map defines the mapping of URLs
        to backend services. Before you can refer to a URL map, you must
        create the URL map. To delete a URL map that a target proxy is referring
        to, you must first delete the target {0} proxy.
        )	r.   r/   r0   r1   r2   r3   r4   
short_helpdetailed_help)r6   r7   r'   format)r2   
proxy_types     r   UrlMapArgumentForTargetProxyrC   Y   s@    		'	' )1&
 F:!
   r   N)TF)THTTP)__doc__"googlecloudsdk.command_lib.computer   compute_completersr   r6   googlecloudsdk.command_lib.utilDEFAULT_LIST_FORMATListCommandCompleterr   r!   MultiResourceCompleterr'   r9   r=   rC   r   r   r   <module>rL      sh    ; P E 6	 /DD 1FF Qz88 Q	D. r   