
                             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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.    )absolute_import)division)unicode_literals)
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$ )UrlMapsCompleter2   c                 F   > [         [        U ]
  " SS[        [        /0UD6  g )Nr   r   )r   r*   r   r	   r$   r   s     r   r   UrlMapsCompleter.__init__4   s,    	
D* Q*,DEQIOQr   r   r   r!   s   @r   r*   r*   2   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)r5   r4   s     r   UrlMapArgumentr<   9   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/   r0   r   zE(Default) The URL map is global. Regional URL maps are not supported.r'   T)r1   r2   r3   r6   global_help_textr7   region_hidden)r9   r:   r	   r   r   r   GlobalUrlMapArgumentr@   E   s0     
	'	'&) 2
 r   c                 `    [         R                  " SS[        SU SSSSR                  U5      S9	$ )	Nz	--url-mapr0   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.
        )	r1   r2   r3   r4   r5   r6   r7   
short_helpdetailed_help)r9   r:   r*   format)r5   
proxy_types     r   UrlMapArgumentForTargetProxyrF   \   s@    		'	' )1&
 F:!
   r   N)TF)THTTP)__doc__
__future__r   r   r   "googlecloudsdk.command_lib.computer   compute_completersr   r9   googlecloudsdk.command_lib.utilDEFAULT_LIST_FORMATListCommandCompleterr	   r$   MultiResourceCompleterr*   r<   r@   rF   r   r   r   <module>rP      sn    ; &  ' O E 6	 /DD 1FF Qz88 Q	D. r   