
    ^                        S r SSKJr  SSKJr  SSKJr  SSKrSSKrSSKrSSKrSSK	r	SSK
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rSrSrSrSr Sr!Sr"Sr#Sr$S r%S r& " S S\'5      r( " S S\	RR                  5      r* " S S\*5      r+ " S S\RX                  5      r-S!S  jr.g)"z9A module that converts API exceptions to core exceptions.    )absolute_import)division)unicode_literalsN)
exceptions)resource)log)
properties)resource_lex)resource_printer)resource_property)encoding~CELRzgoogle.rpc.ErrorInfozgoogle.rpc.LocalizedMessagezgoogle.rpc.Helpc                 :   / nSnU  GH   nU[         :X  a%  UR                  [         [        -   [         -   5        M3  US:X  a%  UR                  [         [        -   [         -   5        M^  US:X  aB  US:  a$  UR                  [         [        -   [         -   5        OUR                  S5        US-  nM  US:X  aC  US-  nUS:  a%  UR                  [         [
        -   [         -   5        M  UR                  S5        M  UR                  U5        GM     SR                  U5      $ )z0Return s with format special characters escaped.r   :{   } )_ESCAPEappend_ESCAPED_ESCAPE_ESCAPED_COLON_ESCAPED_LEFT_CURLY_ESCAPED_RIGHT_CURLYjoin)srncs       -lib/googlecloudsdk/api_lib/util/exceptions.py_Escaper%   7   s    !!aG|hhw(723	
chhw''12	
c	
Q	..89	1fa	
c1fa	
Q	//'9:	hhqk% & 
    c                    / nSnSnU[        U 5      :  GaB  X   nUS-  nU[        :X  Ga  US-   [        U 5      :  a  XS-      [        :X  a  X   nUS-  nU[        :X  a:  US:  a  UR                  [        [        -   5        OUR                  S5        US-  nOU[        :X  a:  US-  nUS:  a  UR                  [        [        -   5        O|UR                  S5        OjUS:  a  UR                  XS-
  U 5        OMU[
        :X  a  UR                  S5        O1U[        :X  a  UR                  [        5        OUR                  U5        U[        U 5      :  a  GMB  SR                  U5      $ )	z9Return s with escaped format special characters expanded.r   r      r   r      r   r   )lenr   r   r   r   r   r   r   )r    r!   r"   ir#   s        r$   _Expandr,   Q   s5   !!!	CF
	AFAG|AA1U8w+>
$a1fa	
!	!q5
((700
1
((3-	Q$$	Qq5
((711
2
((3-q5	q5		hhqk3 	
CF
4 
r&   c                       \ rS rSrSrS rSrg)_JsonSortedDicts   z0A dict with a sorted JSON string representation.c                 ,    [         R                  " U SS9$ )NT)	sort_keys)jsondumpsselfs    r$   __str___JsonSortedDict.__str__v   s    ::dd++r&    N)__name__
__module____qualname____firstlineno____doc__r6   __static_attributes__r8   r&   r$   r.   r.   s   s
    8,r&   r.   c                   D   ^  \ rS rSrSrU 4S jrS rS rS rS r	Sr
U =r$ )	FormattableErrorPayloadz   a0  Generic payload for an HTTP error that supports format strings.

Attributes:
  content: The dumped JSON content.
  message: The human readable error message.
  status_code: The HTTP status code number.
  status_description: The status_code description.
  status_message: Context specific status message.
c                    > [         [        U ]  5         SU l        0 U l        SU l        SU l        SU l        [        U[        R                  5      (       a  Xl        gU R                  5       U l        g)zInitialize a FormattableErrorPayload instance.

Args:
  http_error: An Exception that subclasses can use to populate class
    attributes, or a string to use as the error message.
z{?}r   r   N)superr@   __init___valuecontentstatus_codestatus_descriptionstatus_message
isinstancesixstring_typesmessage_MakeGenericMessager5   
http_error	__class__s     r$   rD    FormattableErrorPayload.__init__   sa     

!413DKDLD DD*c..//l--/dlr&   c                    [        U5      nUS:X  a  U R                  U4$ UR                  SS5      nUR                  S5      R                  SS5      nUR                  S5      nUR	                  S5      (       a  [        U5      S:  d  US:X  a  USS nU(       a  UR                  S5      OSnU(       a  UR                  S5      OSnU R                  U5      u  piU	(       d  [        U	[        [        45      (       d  SU4$ U(       dE  [        U	[        R                  [        R                  [        4[        R                  -   5      (       dR  [        R                  " 5       n
[         R"                  " X=(       d    SU
S	S
9  U
R%                  5       R'                  5       n	U(       a   Xl        U R)                  [        U5      5      n	X4$ )a  Returns the value of field_name for string.Formatter.format().

Args:
  field_name: The format string field name to get in the form
    name - the value of name in the payload, '' if undefined
    name?FORMAT - if name is non-empty then re-formats with FORMAT, where
      {?} is the value of name. For example, if name=NAME then
      {name?\nname is "{?}".} expands to '\nname is "NAME".'.
    .a.b.c - the value of a.b.c in the JSON decoded payload contents.
      For example, '{.errors.reason?[{?}]}' expands to [REASON] if
      .errors.reason is defined.
  unused_args: Ignored.
  unused_kwargs: Ignored.

Returns:
  The value of field_name for string.Formatter.format().
?r   r   r   z0.Nr   defaultT)outsingle)r,   rE   splitpop
startswithr*   	_GetFieldrJ   intfloatrK   	text_typebinary_typeinteger_typesioStringIOr   Printgetvaluestripformat)r5   
field_nameunused_argsunused_kwargspartssubpartsnameprinter_formatrecursive_formatvaluebufs              r$   	get_field!FormattableErrorPayload.get_field   sg   $ $JS[[*$$S!$Eyy|!!#q)H<<?D 	#d)a-DDL!"Xd(0X\\!_dN',uyy|$..&KDEC<88XoZs69J9JJL LKKMc
,9#dDlln""$ekkk'"234e;r&   c                    SU;   a  UR                  S5      (       a  SnUSS nOSn[        R                  " U5      R                  5       nU R                  nU(       a4  U(       a-  U R
                  R                  US   S5      nU(       a  US   U0n[        R                  " XCS5      nX4$ U(       a  U R
                  R                  US5      nX4$ SnX4$ )a  Gets the value corresponding to name in self.content or class attributes.

If `name` starts with a period, treat it as a key in self.content and get
the corresponding value. Otherwise get the value of the class attribute
named `name` first and fall back to checking keys in self.content.

Args:
  name (str): The name of the attribute to return the value of.

Returns:
  A tuple where the first value is `name` with any leading periods dropped,
  and the second value is the value of a class attribute or key in
  self.content.
.Fr   NTr   )	rZ   r
   LexerKeyrF   __dict__getr   Get)r5   rl   check_payload_attributeskeyrF   ro   s         r$   r[   !FormattableErrorPayload._GetField   s     d{			#( ABx $( t$((*cg	!c!!#a&$/VUO'##G$7e ; 
mmd+e ; e;r&   c                 ~    U R                  5       nU R                  (       a  SR                  XR                  5      $ U$ )z:Makes a generic human readable message from the HttpError.z{0}: {1})_MakeDescriptionrI   rf   r5   descriptions     r$   rN   +FormattableErrorPayload._MakeGenericMessage   s6    '')K{,?,?@@r&   c                     U R                   nU(       a  UR                  S5      (       a  USS nU$ SR                  U R                  5      $ )CMakes description for error by checking which fields are filled in.rt   NzHTTPError {0})rH   endswithrf   rG   r   s     r$   r~   (FormattableErrorPayload._MakeDescription   sJ    ))K			c	"	"!#2&!!$"2"233r&   )rE   rF   rM   rG   rH   rI   )r9   r:   r;   r<   r=   rD   rq   r[   rN   r~   r>   __classcell__rQ   s   @r$   r@   r@   z   s(    0$*X#J4 4r&   r@   c                      ^  \ rS rSrSrU 4S jrU 4S jrS rS rS r	S r
S	 rS
 rS rS rU 4S jrS rS rSrU =r$ )HttpErrorPayload   ah  Converts apitools HttpError payload to an object.

Attributes:
  api_name: The url api name.
  api_version: The url version.
  content: The dumped JSON content.
  details: A list of {'@type': TYPE, 'detail': STRING} typed details.
  domain_details: ErrorInfo metadata Indexed by domain.
  violations: map of subject to error message for that subject.
  field_violations: map of field name to error message for that field.
  error_info: content['error'].
  instance_name: The url instance name.
  message: The human readable error message.
  resource_item: The resource type.
  resource_name: The url resource name.
  resource_version: The resource version.
  status_code: The HTTP status code number.
  status_description: The status_code description.
  status_message: Context specific status message.
  unparsed_details: The unparsed details.
  type_details: ErrorDetails Indexed by type.
  url: The HTTP url. .<a>.<b>...: The <a>.<b>... attribute in the JSON content
    (synthesized in get_field()).

Grammar:
  Format strings inherit from python's string.formatter. where we pass tokens
  obtained by the resource projection framework format strings.

Examples:
  error_format values and resulting output:

  'Error: [{status_code}] {status_message}{url?\n{?}}{.debugInfo?\n{?}}'

    Error: [404] Not found
    http://dotcom/foo/bar
    <content.debugInfo in yaml print format>

  'Error: {status_code} {details?\n\ndetails:\n{?}}'

    Error: 404

    details:
    - foo
    - bar

   'Error [{status_code}] {status_message}\n'
   '{.:value(details.detail.list(separator="\n"))}'

     Error [400] Invalid request.
     foo
     bar
c                   > [         [        U ]  U5        SU l        SU l        / U l        0 U l        0 U l        S U l        SU l	        SU l
        SU l        SU l        SU l        S U l        [        U[         R"                  5      (       d8  U R%                  U5        U R'                  U5        U R)                  5       U l        g g Nr   )rC   r   rD   api_nameapi_versiondetails
violationsfield_violations
error_infoinstance_nameresource_itemresource_nameresource_versionurl
_cred_inforJ   rK   rL   _ExtractResponseAndJsonContent#_ExtractUrlResourceAndInstanceNamesrN   rM   rO   s     r$   rD   HttpErrorPayload.__init__0  s    	
D*:6DMDDLDODDODDDDDHDOj#"2"233
))*5
..z:--/dl 4r&   c                 T  > UR                  S5      (       a2  UR                  SS5      u  p#U R                  R                  U5      nX4$ UR                  S5      (       a2  UR                  SS5      u  p%U R                  R                  U5      nX4$ [
        [        U ]  U5      u  pX4$ )Nzfield_violations.rt   r   zviolations.)rZ   rX   r   rx   r   rC   r   r[   )r5   rl   _fieldro   subjectrQ   s         r$   r[   HttpErrorPayload._GetFieldC  s    *++C#ha##''.e ; 
	'	'::c1%jaoo!!'*e ; *D;DAkd;r&   c                 d    SU;   a  UR                  SS5      $ SU;   a  UR                  SS5      $ g)zGenerates mTLS endpoint override for a given endpoint override.

Args:
  endpoint_override: The endpoint to generate the mTLS endpoint override
    for.

Returns:
  The mTLS endpoint override, if one exists. Otherwise, None.
zsandbox.googleapis.comzmtls.sandbox.googleapis.comzgoogleapis.comzmtls.googleapis.comN)replace)r5   endpoint_overrides     r$   _GetMTLSEndpointOverride)HttpErrorPayload._GetMTLSEndpointOverrideN  sI      #44&&
"$A  
.	.&&'79NOOr&   c                     [         R                  R                  R                  5       =(       aN    [         R                  R                  R
                  R                  5       =(       a    [         R                  " 5       $ )zfReturns whether mTLS is enabled and an endpoint override is present for the current gcloud invocation.)r	   VALUESapi_endpoint_overrides	AllValuescontext_awareuse_client_certificateGetBoolIsInternalUserCheckr4   s    r$   ,_IsMTLSEnabledAndApiEndpointOverridesPresent=HttpErrorPayload._IsMTLSEnabledAndApiEndpointOverridesPresenta  sU     	00::< 	-++BBJJL	-**,r&   c                     [         R                  R                  U5      nUR                  nU(       d  gUR	                  S5      S   nUR                  S5      $ )zEReturns whether the existing endpoint override is using mTLS already.Nrt   r   mtls)urllibparseurlparsenetlocrX   rZ   )r5   r   	urlparseddomain_partsdomains        r$   _IsExistingOverrideMTLS(HttpErrorPayload._IsExistingOverrideMTLSi  sN    %%&78I##L$Q'FV$$r&   c                    [        USS5      nU(       aK  [        UR                  SS5      5      U l        [        R
                  " UR                  SS5      5      U l        [        R
                  " UR                  5      n [        [        R                  " U5      5      U l        [        U R                  S   5      U l        U R                  (       d*  [        U R                  R                  SS5      5      U l        U R                  S	;   a  U R                  R                  S
S5      (       a  SSKJn  UR                  R                  5       U l        U R                   (       a  U R                   R#                  5       nU R                  S   S
   nUS   S:w  a  US-   USS -   U R                  S   S
'   OUS-   U-   U R                  S   S
'   U R                  S   S
   U R                  S
'   U R                  (       d!  U R                  R                  SS5      U l        U R%                  5       (       a  [&        R(                  R*                  R-                  5       nUR/                  5        H  u  pU R1                  U	5      n
U R3                  U	5      (       a  M.  UR4                  R7                  U	5      (       d  MP  U
(       d  MY  SR9                  X/U
5      U R                  S
'   SSU	U
S.S./U R                  S'     O   U R                  R                  S
S5      U l        U R                  R                  S/ 5      U l        U R?                  U R<                  5      U l         U RC                  U R<                  5      U l"        U RG                  U R<                  5      U l$        U RK                  U R<                  5      U l&        [&        R(                  RN                  RP                  RS                  5       (       a!  U RU                  U R<                  5      U l+        gg! [X        [Z        [\        4 a	    X0l         g[^         a     gf = f)z:Extracts the response and JSON content from the HttpError.responseNstatusr   reasonr   errorcode)i      rM   )storer   rt   z.  zCertificate-based access is enabled, but the endpoint override for the following API is not using mTLS: {}. Please update the endpoint override to use mTLS endpoint: {} z(type.googleapis.com/google.rpc.ErrorInfoACCESS_DENIED)r   mtls_endpoint_override)@typer   metadatar   )0getattrr\   rx   rG   r   DecoderH   rF   r.   r2   loadsr   googlecloudsdk.core.credentialsr   CredentialInfoGetCredentialInfor   GetInfoStringr   r	   r   r   r   itemsr   r   r   rZ   rf   rI   r   _ExtractViolationsr   _ExtractFieldViolationsr   _IndexErrorDetailsByTypetype_details_IndexErrorInfoByDomaindomain_detailscoreparse_error_detailsr   RedactParsedTypesunparsed_detailsKeyError	TypeError
ValueErrorAttributeError)r5   rP   r   rF   c_storecred_info_messageexisting_messageendpoint_overridesr   r   mtls_endpoints              r$   r   /HttpErrorPayload._ExtractResponseAndJsonContentr  s   z:t4HX\\(A67d (Xr0J Kdooj001GI$TZZ%89dl'W(=>dot2261=>			_	,1D1D
R2 2 	E "00BBD??"oo;;=
!\\'29=

 b!S( !4'*;CR*@@ LL!),
 !3&):: LL!), (,||G'<Y'G$//)
$$$"&//"5"5h"C		:	:	<	<44>>@ 	 ,>+C+C+E'H778IJ-../@AA..++,=>>-CCI61=D OOI& D)):.;+ *DOOI& - ,F. !OO//	2>d__((B7dl//=do"::4<<Hd77Ed 88Fd						3	3	;	;	=	= $ 6 6t|| D 
>i, $# 
s,   HP P ;P EP Q7	QQc                     / nU HL  nUR                  SS5      nUR                  S5      S   nU[        [        4;  d  M;  UR	                  U5        MN     U$ )z/Redacts the parsed types from the details list.r   N/r   )rx   rX   LOCALIZED_MESSAGE_SUFFIXHELP_SUFFIXr   )r5   r   r   item
error_typeerror_suffixs         r$   r   "HttpErrorPayload.RedactParsedTypes  s[    88GT*j%%c*2.l	6D	D%	 
 r&   c                     [         R                  " [        5      nU HE  nUR                  SS5      nU(       d  M  UR	                  S5      S   nX%   R                  U5        MG     U$ )z>Extracts and indexes error details list by the type attribute.r   Nrt   r   )collectionsdefaultdictlistrx   rX   r   )r5   r   type_mapr   r   error_type_suffixs         r$   r   )HttpErrorPayload._IndexErrorDetailsByType  s_    &&t,H88GT*j	&,,S1"5#**40	 
 Or&   c                    [         R                  " [        5      nU H_  nUR                  SS5      nUR	                  [
        5      (       d  M1  UR                  SS5      nU(       d  ML  X%   R                  U5        Ma     U$ )z=Extracts and indexes error info list by the domain attribute.r   Nr   )r   r   r   rx   r   ERROR_INFO_SUFFIXr   )r5   r   
domain_mapr   r   r   s         r$   r   (HttpErrorPayload._IndexErrorInfoByDomain  sl    ((.J88GT*j			.	/	/(D)6


#
#D
)  r&   c                    UR                   U l         U R                   (       d  g [        R                  " U R                   5      u  p#nU(       a  X l        U(       a  X0l        UR                  S5      nS[        U5      s=:  a  S:  d   g  gUS   U l        US   nUR                  S5      S   U l	        SR                  U R                  5      U l        g! [        R                   a     gf = f)zEExtracts the url resource type and instance names from the HttpError.Nr   r      r   rT   z{} instance)r   resource_utilSplitEndpointUrlInvalidEndpointExceptionr   r   rX   r*   r   r   rf   r   )r5   rP   rl   versionresource_pathresource_partsr   s          r$   r   4HttpErrorPayload._ExtractUrlResourceAndInstanceNames  s    ~~DH88%2%C%C
((&"d]
 m  #((-Ns>"&Q& ''*D"1%M&,,S1!4D&--d.@.@AD# 11 s   #C C-,C-c                 T  > U R                   (       Ga  U R                  (       Gar  U R                  (       Ga`  U R                   S:X  a  U R                  (       a4  U R                  R                  =(       d    U R                  R
                  nO2[        R                  R                  R
                  R                  5       nSR                  XR                  U R                  5      $ U R                   S:X  a4  SR                  U R                  R                  5       U R                  5      $ U R                   S:X  a_  U R                  S:X  a  SR                  U R                  5      $ SR                  U R                  R                  5       U R                  5      $ [        [        U ]?  5       $ )	r   r   zH[{0}] does not have permission to access {1} [{2}] (or it may not exist)r   z{0} [{1}] not foundi  projectsz7Resource in projects [{0}] is the subject of a conflictz&{0} [{1}] is the subject of a conflict)rG   r   r   r   impersonated_accountaccountr	   r   r   ry   rf   
capitalizer   rC   r   r~   )r5   r  rQ   s     r$   r~   !HttpErrorPayload._MakeDescription  sZ   D...43E3E3E			S	 ??oo22Mdoo6M6M  %%**22668' 
&,,d.@.@
A	B 
		S	 $++))+T-?-?A 	A			S	 +128&9K9K2LM :@@  ++-t/A/AC C !49;;r&   c                 x   [         R                  " 5       nU H  nSU;  a  M  US   n[        U[        5      (       d  M'  UR	                  S5      nU HI  n UR	                  S5      nU=(       d    UnU(       a"  X;   a  X(==   SUS   -   -  ss'   M@  US   X('   MI  MK     M     U$ ! [
        [        4 a     Mf  f = f)a  Extracts a map of violations from the given error's details.

Args:
  details: JSON-parsed details field from parsed json of error.

Returns:
  Map[str, str] sub -> error description. The iterator of it is ordered by
  the order the subjects first appear in the errror.
r   r   
r   r   OrderedDictrJ   r   rx   r   r   )	r5   r   resultsdetailr   sub	violation	local_subr   s	            r$   r   #HttpErrorPayload._ExtractViolations  s     %%'G	V	#,'j
D))JJy!c!)
	mmI.)$9'!$=)A"AA!*=!9g	 	 " & N )$ 	
	   :B%B%%B98B9c                 x   [         R                  " 5       nU H  nSU;  a  M  US   n[        U[        5      (       d  M'  UR	                  S5      nU HI  n UR	                  S5      nU=(       d    UnU(       a"  X;   a  X(==   SUS   -   -  ss'   M@  US   X('   MI  MK     M     U$ ! [
        [        4 a     Mf  f = f)a(  Extracts a map of field violations from the given error's details.

Args:
  details: JSON-parsed details field from parsed json of error.

Returns:
  Map[str, str] field (in dotted format) -> error description.
  The iterator of it is ordered by the order the fields first
  appear in the error.
fieldViolationsr   r	  r   r
  )	r5   r   r  deetr   fviollocal_fr   s	            r$   r   (HttpErrorPayload._ExtractFieldViolations:  s     %%'G	$	&)*j
D))
((7
a$
	HHW%',w%ntM': ::n#M2gn	 	  & N )$ 	
	r  )r   r   r   rF   r   r   r   r   r   rM   r   r   r   rG   rH   rI   r   r   r   r   )r9   r:   r;   r<   r=   rD   r[   r   r   r   r   r   r   r   r   r~   r   r   r>   r   r   s   @r$   r   r      sS    3j0&	&%Pd	B8<6@ r&   r   c                   V   ^  \ rS rSrSrS\4U 4S jjrS r\S 5       r	S r
S rS	rU =r$ )
HttpExceptioni\  zTransforms apitools HttpError to api_lib HttpException.

Attributes:
  error: The original HttpError.
  error_format: An HttpErrorPayload format string.
  payload: The HttpErrorPayload object.
Nc                 ^   > [         [        U ]  S5        Xl        X l        U" U5      U l        g r   )rC   r  rD   r   error_formatpayload)r5   r   r  payload_classrQ   s       r$   rD   HttpException.__init__e  s)    	-'+J$ 'DLr&   c                 r   U R                   nUc|  Sn[        R                  R                  R                  R                  5       (       a  SnSnSnUU-   U-   U-   nOUS-   n[        R                  " 5       [        R                  ::  a  US-  n[        U R                  R                  [        U5      5      5      $ )Nz
{message?}zG{type_details.LocalizedMessage:value(message.list(separator="
"))?
{?}}zJ{type_details.Help:value(links.flatten(show="values",separator="
"))?
{?}}z{unparsed_details?
{?}}z{details?
{?}}z{.debugInfo?
{?}})r  r	   r   r   r   r   r   GetVerbosityloggingDEBUGr,   r  rf   r%   )r5   r  error_prefixparsed_localized_messagesparsed_help_messagesr   s         r$   r6   HttpException.__str__k  s    $$L!l						3	3	;	;	=	=: 	"
I 	 6'("#  	 $&77				w}}	,,,4<<&&w|'<=>>r&   c                 .    [         R                  " U 5      $ N)rK   r^   r4   s    r$   rM   HttpException.message  s    ==r&   c                 ,    [        U R                  5      $ r*  )hashrM   r4   s    r$   __hash__HttpException.__hash__  s    r&   c                 `    [        U[        5      (       a  U R                  UR                  :H  $ g)NF)rJ   r  rM   )r5   others     r$   __eq__HttpException.__eq__  s%    %''\\U]]**r&   )r   r  r  )r9   r:   r;   r<   r=   r   rD   r6   propertyrM   r.  r2  r>   r   r   s   @r$   r  r  \  s=     *.=M (?4   r&   r  c                    ^  U 4S jnU$ )a  Decorator that catches an HttpError and returns a custom error message.

It catches the raw Http Error and runs it through the given format string to
get the desired message.

Args:
  format_str: An HttpErrorPayload format string. Note that any properties that
  are accessed here are on the HTTPErrorPayload object, and not the raw
  object returned from the server.

Returns:
  A custom error message.

Example:
  @CatchHTTPErrorRaiseHTTPException('Error [{status_code}]')
  def some_func_that_might_throw_an_error():
    ...
c                    >^  UU 4S jnU$ )Nc                     >  T" U 0 UD6$ ! [         R                   a,  n[        UT5      n[        R                  " U5         S nAg S nAff = fr*  )apitools_exceptions	HttpErrorr  core_exceptionsreraise)argskwargsr   exc
format_strrun_funcs       r$   WrapperdCatchHTTPErrorRaiseHTTPException.<locals>.CatchHTTPErrorRaiseHTTPExceptionDecorator.<locals>.Wrapper  sK    %((( ** %E:.$$%s    A"AAr8   )r@  rA  r?  s   ` r$   )CatchHTTPErrorRaiseHTTPExceptionDecoratorSCatchHTTPErrorRaiseHTTPException.<locals>.CatchHTTPErrorRaiseHTTPExceptionDecorator  s    % Nr&   r8   )r?  rC  s   ` r$    CatchHTTPErrorRaiseHTTPExceptionrE    s    (	 
32r&   r*  )/r=   
__future__r   r   r   r   ra   r2   r#  stringurllib.parser   apitools.base.pyr   r8  googlecloudsdk.api_lib.utilr   r   googlecloudsdk.corer:  r   r	   googlecloudsdk.core.resourcer
   r   r   googlecloudsdk.core.utilr   rK   r   r   r   r   r   r   r   r   r%   r,   dictr.   	Formatterr@   r   Errorr  rE  r8   r&   r$   <module>rQ     s     @ &  '  	     > A = # * 5 9 : - 

    + 8 4D,d ,}4f.. }4@_. _D3O)) 3l3r&   