
                         D    S 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)	z#Utilities for handling region flag.    )	constants)log)
properties)
console_ioc                      [         R                  " 5       (       d  g[        R                  n [         R                  " U SSS9nX   n[
        R                  R                  SR                  U5      5        U$ )zdPrompt for region from list of available regions.

Returns:
  The region specified by the user, str
NzaPlease specify a region:
(For the global endpoint the region needs to be specified as 'global'.)
T)messagecancel_optionzPTo make this the default region, run `gcloud config set ai_platform/region {}`.
)	r   	CanPromptr   SUPPORTED_REGIONS_WITH_GLOBALPromptChoicer   statusPrintformat)all_regionsidxregions      7lib/googlecloudsdk/command_lib/ml_engine/region_util.py_PromptForRegionr      sp     
				77+ : 		#
 &**55;VF^E 
-    c                 B   U R                  S5      (       a  U R                  $ [        R                  R                  R                  R                  5       (       a2  [        R                  R                  R                  R                  5       $ [        5       nU=(       d    S$ )aG  Gets the region and prompt for region if not provided.

Note: region can be either `global` or one of supported regions.

  Region is decided in the following order:
- region argument;
- ai_platform/region gcloud config;
- prompt user input.

Args:
  args: Namespace, The args namespace.

Returns:
  A str representing region.
r   zus-central1)IsSpecifiedr   r   VALUESai_platformIsExplicitlySetGetr   )argsr   s     r   	GetRegionr   .   sv      
h;;""))99;;((//3355& 
	 = r   N)
__doc__$googlecloudsdk.command_lib.ml_enginer   googlecloudsdk.corer   r   googlecloudsdk.core.consoler   r   r    r   r   <module>r#      s"    * ; # * 2,!r   