ó
    €Ïþ  ã                   óž   • 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SK
Jr  SS	KJr  SS
KJr  SSKJr   SS\S\\   4S jjrg)z$Utilities for enabling service APIs.é    )Úabsolute_import)Údivision)Úunicode_literals)ÚOptional)Ú
enable_api)Ú
exceptions)Úapi_enablement)Úlog)Ú
properties)Ú
console_ioÚservice_nameÚenable_by_defaultc                 óÊ  • [         R                  R                  R                  R	                  5       n [
        R                  " X 5      (       a  g[        R                  " 5       (       a  [        R                  " X US9  g[        R                  " SR                  U 5      5        g! [        R                   a(    [        R                   " SR                  U 5      5         gf = f)z¨Prompts to enable the API if it's not enabled.

Args:
  service_name: The name of the service to enable.
  enable_by_default: default choice for the enablement prompt.
N)r   z:Service {} is not enabled. This operation may not succeed.zZCould not verify if service {} is enabled: missing permission 'serviceusage.services.get'.)r   ÚVALUESÚcoreÚprojectÚ	GetOrFailr   ÚIsServiceEnabledr   Ú	CanPromptr	   ÚPromptToEnableApir
   ÚwarningÚformatr   Ú#GetServicePermissionDeniedExceptionÚinfo)r   r   Ú
project_ids      Ú6lib/googlecloudsdk/api_lib/functions/api_enablement.pyÚPromptToEnableApiIfDisabledr      s±   € ô × Ñ ×%Ñ%×-Ñ-×7Ñ7Ó9€*ðÜ×"Ò" :×<Ñ<Øä×Ò×ÑÜ×&Ò&Ø
Ð6Góô 
‡k‚kØ
F×
MÑ
MØóõøô
 
×	7Ñ	7ó Ü‡H‚Hð	(ß(.©¨|Ó(<öðús   ´B& Á/B& Â %B& Â&9C"Ã!C"N)F)Ú__doc__Ú
__future__r   r   r   Útypingr   Úgooglecloudsdk.api_lib.servicesr   r   Úgooglecloudsdk.api_lib.utilr	   Úgooglecloudsdk.corer
   r   Úgooglecloudsdk.core.consoler   ÚstrÚboolr   © ó    r   Ú<module>r)      sG   ðñ +å &Ý Ý 'å å 6Ý 6Ý 6Ý #Ý *Ý 2ð <AñØðØ*2°4©.ör(   