ó
    €Ï	  ã                   óŒ   • 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
 rS rS rS rS rS rg)z1A library that is used to support trace commands.é    )Úabsolute_import)Údivision)Úunicode_literals)Úprojects_api)Úapis)Úutil)Ú
properties)Ú	resourcesc                  ó0   • [         R                  " SS5      $ )z%Returns the client for the trace API.Ú
cloudtraceÚv2beta1)Ú	core_apisÚGetClientInstance© ó    Ú(lib/googlecloudsdk/api_lib/trace/util.pyÚ	GetClientr      ó   € ä	×	$Ò	$ \°9Ó	=Ð=r   c                  ó0   • [         R                  " SS5      $ )z'Returns the messages for the trace API.r   r   )r   ÚGetMessagesModuler   r   r   ÚGetMessagesr   !   r   r   c                 óÞ   • U =(       d1    [         R                  R                  R                  R	                  SS9n[
        R                  " [        R                  " U5      5      R                  $ )NT©Úrequired)	r	   ÚVALUESÚcoreÚprojectÚGetr   Úprojects_utilÚParseProjectÚprojectNumber)r   Ú
project_ids     r   ÚGetProjectNumberr#   &   sN   € Ø×Kœ*×+Ñ+×0Ñ0×8Ñ8×<Ñ<ÀdÐ<ÐK€*Ü	×	Ò	œ-×4Ò4°ZÓ@Ó	A×	OÑ	OÐOr   c                 óV   • [         R                  R                  U S[        U5      0SS9$ )z4Returns the appropriate sink resource based on args.Ú
projectsIdzcloudtrace.projects.traceSinks)ÚparamsÚ
collection)r
   ÚREGISTRYÚParser#   )Ú	sink_namer   s     r   ÚGetTraceSinkResourcer+   +   s4   € ä	×	Ñ	×	!Ñ	!ØØÔ,¨WÓ5Ð6Ø1ð 
"ð 
3ð 3r   c                 ó®   • [         R                  R                  U =(       d1    [        R                  R
                  R                  R                  SS9SS9$ )z-Returns the resource for the current project.Tr   zcloudresourcemanager.projects)r'   )r
   r(   r)   r	   r   r   r   r   )r   s    r   ÚGetProjectResourcer-   3   sK   € ä	×	Ñ	×	!Ñ	!Ø×B”×"Ñ"×'Ñ'×/Ñ/×3Ñ3¸TÐ3ÐBØ0ð 
"ð 
2ð 2r   c                 ó¬   • U R                   R                  S5      nSn[        U5      S:”  a  US   nUU R                  R                  U R
                  S.$ )NÚ/Ú é   )ÚnameÚdestinationÚwriter_identity)r2   ÚsplitÚlenÚoutputConfigr3   ÚwriterIdentity)ÚsinkÚsink_name_tokensr*   s      r   ÚFormatTraceSinkr;   :   sY   € Ø—Y‘Y—_‘_ SÓ)ÐØ€)ÜÐ	Ó˜QÓØ  Ñ#€Ið Ø×&Ñ&×2Ñ2Ø×,Ñ,ñ
ð r   N)Ú__doc__Ú
__future__r   r   r   Ú+googlecloudsdk.api_lib.cloudresourcemanagerr   Úgooglecloudsdk.api_lib.utilr   r   Ú#googlecloudsdk.command_lib.projectsr   r   Úgooglecloudsdk.corer	   r
   r   r   r#   r+   r-   r;   r   r   r   Ú<module>rB      sA   ðñ 8å &Ý Ý 'å DÝ 9Ý EÝ *Ý )ò>ò
>ò
Pò
3ò2ó
r   