;idZddlZddlmZdZdZdZdZdZd Z d Z d Z d Z d Z dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdS)z We use x-goog-api-client header to report metrics. This module provides the constants and helper methods to construct x-goog-api-client header. N)versionzx-goog-api-clientzgoogle-byoid-sdkzauth-request-type/atzauth-request-type/itzauth-request-type/mdszauth-request-type/re-startzauth-request-type/re-contz cred-type/uz cred-type/saz cred-type/jwtz cred-type/mdsz cred-type/impcddtjtjS)Nzgl-python/{} auth/{})formatplatformpython_versionr __version__GC:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\google/auth/metrics.pypython_and_auth_lib_versionr -s$ ! ( ()@)B)BGDW X XXr c\dtttSNz{} {} {})rr REQUEST_TYPE_ACCESS_TOKENCRED_TYPE_SA_MDSr r r token_request_access_token_mdsr5s)   #%%'@BR  r c\dtttSr)rr REQUEST_TYPE_ID_TOKENrr r r token_request_id_token_mdsr=s)   #%%'<>N  r c\dtttSr)rr rCRED_TYPE_SA_IMPERSONATEr r r &token_request_access_token_impersonaterEs)   #%%!   r c\dtttSr)rr rrr r r "token_request_id_token_impersonaterOs)   #%%'<>V  r c\dtttSr)rr rCRED_TYPE_SA_ASSERTIONr r r 'token_request_access_token_sa_assertionrXs)   #%%'@BX  r c\dtttSr)rr rrr r r #token_request_id_token_sa_assertionras)   #%%'<>T  r cPdttSN{} {})rr CRED_TYPE_USERr r r token_request_userr#is >>577 H HHr cPdttSr )rr REQUEST_TYPE_MDS_PINGr r r mds_pingr&qs >>5779N O OOr cPdttSr )rr REQUEST_TYPE_REAUTH_STARTr r r reauth_startr)ws >>5779R S SSr cPdttSr )rr REQUEST_TYPE_REAUTH_CONTINUEr r r reauth_continuer,}s >>5779U V VVr cdtt}|D]\}}d|||}|S)Nr!z{} {}/{})rr BYOID_HEADER_SECTIONitems)metrics_optionsheaderkeyvalues r byoid_metrics_headerr4sZ ^^799;O P PF%++--77 U""6366 Mr ch|sdSt|vr ||t<dS|txxd|zz cc<dS)aAdd x-goog-api-client header with the given value. Args: headers (Mapping[str, str]): The headers to which we will add the metric header. metric_header_value (Optional[str]): If value is None, do nothing; if headers already has a x-goog-api-client header, append the value to the existing header; otherwise add a new x-goog-api-client header with the given value. N )API_CLIENT_HEADER)headersmetric_header_values r add_metric_headerr:sV ''%8!"""!"""c,?&??"""""r )__doc__r google.authrr7r.rrr%r(r+r"rCRED_TYPE_SA_JWTrrr rrrrrrr#r&r)r,r4r:r r r r>s\(*3./8:'""*YYYIIIPPP TTT WWW @@@@@r