
    (ph                         S r SSKrSSKJr  SrSrSrSrSrS	r	S
r
SrSrSrSrSrS rS rS rS rS rS rS rS rS rS rS rS rS rg)zWe 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)versionzx-goog-api-clientzgoogle-byoid-sdkzauth-request-type/atzauth-request-type/itzauth-request-type/mdszauth-request-type/re-startzauth-request-type/re-contzcred-type/uzcred-type/sazcred-type/jwtzcred-type/mdszcred-type/impc                  h    SR                  [        R                  " 5       [        R                  5      $ )Nzgl-python/{} auth/{})formatplatformpython_versionr   __version__     F/var/www/html/venv/lib/python3.13/site-packages/google/auth/metrics.pypython_and_auth_lib_versionr   -   s$    !(()@)@)BGDWDWXXr
   c                  H    SR                  [        5       [        [        5      $ Nz{} {} {})r   r   REQUEST_TYPE_ACCESS_TOKENCRED_TYPE_SA_MDSr	   r
   r   token_request_access_token_mdsr   5   s!    #%'@BR r
   c                  H    SR                  [        5       [        [        5      $ r   )r   r   REQUEST_TYPE_ID_TOKENr   r	   r
   r   token_request_id_token_mdsr   =   s!    #%'<>N r
   c                  H    SR                  [        5       [        [        5      $ r   )r   r   r   CRED_TYPE_SA_IMPERSONATEr	   r
   r   &token_request_access_token_impersonater   E   s!    #%!  r
   c                  H    SR                  [        5       [        [        5      $ r   )r   r   r   r   r	   r
   r   "token_request_id_token_impersonater   O   s!    #%'<>V r
   c                  H    SR                  [        5       [        [        5      $ r   )r   r   r   CRED_TYPE_SA_ASSERTIONr	   r
   r   'token_request_access_token_sa_assertionr   X   s!    #%'@BX r
   c                  H    SR                  [        5       [        [        5      $ r   )r   r   r   r   r	   r
   r   #token_request_id_token_sa_assertionr   a   s!    #%'<>T r
   c                  >    SR                  [        5       [        5      $ N{} {})r   r   CRED_TYPE_USERr	   r
   r   token_request_userr#   i   s    >>57HHr
   c                  >    SR                  [        5       [        5      $ r    )r   r   REQUEST_TYPE_MDS_PINGr	   r
   r   mds_pingr&   q   s    >>579NOOr
   c                  >    SR                  [        5       [        5      $ r    )r   r   REQUEST_TYPE_REAUTH_STARTr	   r
   r   reauth_startr)   w   s    >>579RSSr
   c                  >    SR                  [        5       [        5      $ r    )r   r   REQUEST_TYPE_REAUTH_CONTINUEr	   r
   r   reauth_continuer,   }   s    >>579UVVr
   c                     SR                  [        5       [        5      nU R                  5        H  u  p#SR                  XU5      nM     U$ )Nr!   z{} {}/{})r   r   BYOID_HEADER_SECTIONitems)metrics_optionsheaderkeyvalues       r   byoid_metrics_headerr4      sC    ^^79;OPF%++-
""66 .Mr
   c                 b    U(       d  g[         U ;  a	  X[         '   gU [         ==   SU-   -  ss'   g)a  Add 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)headersmetric_header_values     r   add_metric_headerr:      s2     '%8!"!"c,?&??"r
   )__doc__r   google.authr   r7   r.   r   r   r%   r(   r+   r"   r   CRED_TYPE_SA_JWTr   r   r   r   r   r   r   r   r   r#   r&   r)   r,   r4   r:   r	   r
   r   <module>r>      s      (  *  3 . / 8 :  ' " " * YIPTW@r
   