ó
    €Ï 
  ã                   óh   • S r SSKrSSKJr  SSKJr  \R                  " S5      rS1rS r	S r
S
S	 jrg)zUtilities for API enablement.é    N)Ú
enable_api)Ú
console_iozê.*Enable it by visiting https://console.(?:cloud|developers).google.com/apis/api/([^/]+)/overview\?project=(\S+) then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.\w*zgoogle.com:cloudsdktoolc                 ó   • U [         ;  $ )N)Ú_PROJECTS_NOT_TO_ENABLE)Úprojects    Ú1lib/googlecloudsdk/api_lib/util/api_enablement.pyÚShouldAttemptProjectEnabler	   #   s   € Ø	Ô/Ñ	/Ð/ó    c                 ó°   • [         R                  U 5      nU(       a:  UR                  S5      UR                  S5      p2Ub  [        U5      (       a  Ub  X#4$ g)zÍParses error message for API enablement messages.

Args:
  status_message: str, error message to parse.

Returns:
  tuple[str]: The project, service token to be used for prompting to enable
      the API.
é   é   N)ÚAPI_ENABLEMENT_REGEXÚmatchÚgroupr	   )Ústatus_messager   r   Úservice_tokens       r   ÚGetApiEnablementInfor   '   sQ   € ô ×
$Ñ
$ ^Ó
4€%Þ
Ø %§¡¨A£°·±¸A³ˆmØÑÔ :¸7× CÑ CØÑ%ØÐ%Ð%Ø	r
   c                 óˆ   • [         R                  " USR                  X5      S9nU(       a  [        R                  " X5        U$ )a1  Prompts to enable the API.

Args:
  project (str): The project that the API is not enabled on.
  service_token (str): The service token of the API to prompt for.
  enable_by_default (bool): The default choice for the enablement prompt.

Returns:
  bool, whether or not the API was attempted to be enabled
zhAPI [{}] not enabled on project [{}]. Would you like to enable and retry (this will take a few minutes)?)ÚdefaultÚprompt_string)r   ÚPromptContinueÚformatr   ÚEnableService)r   r   Úenable_by_defaultÚapi_enable_attempteds       r   ÚPromptToEnableApir   :   sA   € ô $×2Ò2Øð%ç&,¡f¨]Ó&Dñ	FÐö
 Ü×Ò˜WÔ4Ø	Ðr
   )F)Ú__doc__ÚreÚgooglecloudsdk.api_lib.servicesr   Úgooglecloudsdk.core.consoler   Úcompiler   r   r	   r   r   © r
   r   Ú<module>r#      sE   ðñ  $ó 
å 6Ý 2ð —z’zð%ó&Ð ð 5Ð5Ð ò0òõ&r
   