
    d                        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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KJr  SSKrSrSrSrSrS r " S S\R@                  5      r! " S S\!5      r" " S S\!5      r# " S S\!5      r$ " S S\!5      r% " S  S!\!5      r& " S" S#\!5      r' " S$ S%\!5      r(S& r)S' r*S;S( jr+S;S) jr,S;S* jr-S<S+ jr.S, r/   S=S- jr0  S>S. jr1S/ r2S?S0 jr3  S>S1 jr4S2 r5S;S3 jr6S;S4 jr7   S@S5 jr8S6 r9 " S7 S8\Rt                  " \Rv                  \<5      5      r= " S9 S:\Rt                  " \Rv                  \=5      5      r>g)Az.Library for defining Binary backed operations.    )absolute_import)division)unicode_literalsN)structured_messages)config)
exceptions)execution_utils)log)yaml)
console_io)local_state)update_manager)files)	platformszdError executing command [{command}] (with context [{context}]). Process exited with code {exit_code}zExecutable [{}] not found.z3Expected structured message, logging as raw text:{}zThis command requires the `{binary}` component to be installed. Would you like to install the `{binary}` component to continue command execution?c                     [         R                  " [        R                  U R                  U R
                  U R                  S95        g )N)commandcontext	exit_code)r
   error_DEFAULT_FAILURE_ERROR_MESSAGEformatexecuted_commandr   r   )result_objects    ?lib/googlecloudsdk/command_lib/util/anthos/binary_operations.py_LogDefaultOperationFailurer   6   s<    ))$++00''!++ , -.    c                       \ rS rSrSrSrg)BinaryOperationError>   z'Base class for binary operation errors. N__name__
__module____qualname____firstlineno____doc____static_attributes__r    r   r   r   r   >   s    /r   r   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )BinaryExecutionErrorB   5Raised if there is an error executing the executable.c                 J   > [         [        U ]  SR                  X!5      5        g )Nz$Error executing binary on [{}]: [{}])superr)   __init__r   )selforiginal_errorr   	__class__s      r   r.   BinaryExecutionError.__init__E   s'    	

?FF' (r   r    r"   r#   r$   r%   r&   r.   r'   __classcell__r1   s   @r   r)   r)   B   s    =( (r   r)   c                       \ rS rSrSrSrg)InvalidOperationForBinaryK   z8Raised when an invalid Operation is invoked on a binary.r    Nr!   r    r   r   r7   r7   K   s    @r   r7   c                       \ rS rSrSrSrg)StructuredOutputErrorO   z@Raised when there is a problem processing as sturctured message.r    Nr!   r    r   r   r:   r:   O   s    Hr   r:   c                   0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )MissingExecutableExceptionS   z5Raised if an executable can not be found on the path.c                 j   > U(       a  UnO[         R                  U5      n[        [        U ]  U5        g N)_DEFAULT_MISSING_EXEC_MESSAGEr   r-   r=   r.   )r/   	exec_namecustom_message	error_msgr1   s       r   r.   #MissingExecutableException.__init__V   s+     i/66yAi	
$d4Y?r   r    r@   r3   r5   s   @r   r=   r=   S   s    =@ @r   r=   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )ExecutionError`   r+   c                 J   > [         [        U ]  SR                  X5      5        g )Nz%Error executing command on [{}]: [{}])r-   rG   r.   r   )r/   r   r   r1   s      r   r.   ExecutionError.__init__c   s&    	.
@GG r   r    r3   r5   s   @r   rG   rG   `   s    = r   rG   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )InvalidWorkingDirectoryErrori   zCRaised when an invalid path is passed for binary working directory.c                 J   > [         [        U ]  SR                  X5      5        g )Nz2Error executing command on [{}]. Invalid Path [{}])r-   rL   r.   r   )r/   r   pathr1   s      r   r.   %InvalidWorkingDirectoryError.__init__l   s$    	
&6<CC	r   r    r3   r5   s   @r   rL   rL   i   s    K r   rL   c                       \ rS rSrSrSrg)ArgumentErrorr   z:Raised if there is an error parsing argument to a command.r    Nr!   r    r   r   rR   rR   r   s    Br   rR   c                    ^  U 4S jnU$ )z.Default processing for stdout from subprocess.c                 D   > U R                  5       n U (       a  U Tl        g g r@   )rstripstdout)rW   result_holders    r   HandleStdOut*DefaultStdOutHandler.<locals>.HandleStdOuty       ]]_F#m r   r    )rX   rY   s   ` r   DefaultStdOutHandlerr\   v       $
 
r   c                    ^  U 4S jnU$ )z.Default processing for stderr from subprocess.c                 D   > U R                  5       n U (       a  U Tl        g g r@   )rV   stderr)r`   rX   s    r   HandleStdErr*DefaultStdErrHandler.<locals>.HandleStdErr   r[   r   r    )rX   ra   s   ` r   DefaultStdErrHandlerrc      r]   r   c                 |    U R                   S:w  a  SU l        U(       a  U R                  (       a  [        U 5        ggg)z1Default processing for subprocess failure status.r   TN)r   failedr   rX   show_exec_errors     r   DefaultFailureHandlerrh      s2    !M--. ._r   c                    ^ ^ UU 4S jnU$ )z8Default processing for streaming stdout from subprocess.c                    > U (       a&  U R                  5         [        R                  " U 5        T(       a4  TR                  (       d  / Tl        TR                  R	                  U 5        g g r@   )rV   r
   PrintrW   appendlinecapture_outputrX   s    r   rY   -DefaultStreamOutHandler.<locals>.HandleStdOut   sG    
kkm	iio!!!!!$' r   r    )rX   ro   rY   s   `` r   DefaultStreamOutHandlerrq      s    ( 
r   c                    ^ ^ UU 4S jnU$ )z8Default processing for streaming stderr from subprocess.c                    > U (       a  [         R                  R                  U 5        T(       a4  TR                  (       d  / Tl        TR                  R	                  U 5        g g r@   )r
   statusrk   r`   rl   rm   s    r   ra   -DefaultStreamErrHandler.<locals>.HandleStdErr   sE    	jjt!!!!!$' r   r    )rX   ro   ra   s   `` r   DefaultStreamErrHandlerrv      s    ( 
r   c                      [         R                  R                  U R                  5       US9$ ! [         R                  [         R
                  4 a  n[        SR                  XS95      eSnAff = f)a  Process a line of structured output into an OutputMessgage.

Args:
  msg_string: string, line JSON/YAML formatted raw output text.
  as_json: boolean, if True set default string representation for parsed
    message to JSON. If False (default) use YAML.

Returns:
  OutputMessage, parsed Message

Raises: StructuredOutputError is msg_string can not be parsed as an
  OutputMessage.

)as_jsonz=Error processing message [{msg}] as an OutputMessage: {error})msgr   N)smOutputMessage
FromStringstripMessageParsingErrorInvalidMessageErrorr:   r   )
msg_stringrx   es      r   ReadStructuredOutputr      sp    K&&z'7'7'97&KK

 
 ""8"8	9 K
 !**0&Z&*IK KKs   +. $A/A**A/c                 `   SnSnU (       a  U R                  5       n[        U5      nUR                  (       aJ  [        R                  R                  UR                  5        [        R
                  " UR                  5        O [        R
                  " UR                  5        UR                  U4$ )a  Parse and log stdout text as an OutputMessage.

Attempts to parse line into an OutputMessage and log any resource output or
status messages accordingly. If message can not be parsed, raises a
StructuredOutputError.

Args:
  line: string, line of output read from stdout.

Returns:
  Tuple: (str, object): Tuple of parsed OutputMessage body and
     processed resources or None.

Raises: StructuredOutputError, if line can not be parsed.
N)r}   r   resource_bodyr
   rt   rk   body)rn   ry   	resourcesmsg_recs       r   _LogStructuredStdOutr      sx      	#)	jjlG
w
'C 	jjsxx 	ii!!"	ii
((I	r   c                    U R                   (       d  / U l         U(       a  U R                   R                  U5        U(       a  U R                   R                  U5        U(       a  U R                   R                  U5        gg)z8Update OperationResult from OutputMessage or plain text.N)rW   rl   )rX   output_messageresource_output
raw_outputs       r   _CaptureStdOutr      s_    
 
		M/0
+ r   c                    ^ ^^ UU U4S jnU$ )zBDefault processing for structured stdout from threaded subprocess.c                 V  > U (       a1  U R                  5       n [        U5      u  p#T(       a  [        TX#S9  ggg! [         ac  nT(       a)  [        R
                  " [        R                  U5      5        [        R                  R                  U5        [        TUS9   SnAgSnAff = f)zProcess structured stdout.)r   r   r   N)
r}   r   r   r:   r
   warning_STRUCTURED_TEXT_EXPECTED_ERRORr   outrk   )rn   r   ry   r   smero   rX   warn_if_not_stuctureds        r   rY   7DefaultStreamStructuredOutHandler.<locals>.HandleStdOut   s    

g	:-g6
CL 	  # : 
++5<<SA
Bg}9	:s   ; 
B(AB##B(r    )rX   ro   r   rY   s   ``` r   !DefaultStreamStructuredOutHandlerr      s    
: 
r   c                    U R                   (       a  [        R                  " U R                   5      (       a  U R                   O(U R                   R                  5       R	                  S5      n/ n/ nU HW  n[        U5      nUR                  UR                  5        UR                  (       d  M<  UR                  UR                  5        MY     X#4$ g)a  Default processing for structured stdout from a non-threaded subprocess.

Attempts to parse result_holder.stdstdout into an OutputMessage and return
a tuple of output messages and resource content.

Args:
  result_holder:  OperationResult

Returns:
  ([str], [JSON]), Tuple of output messages and resource content.
Raises:
  StructuredOutputError if result_holder can not be processed.

NN)	rW   r   	list_liker}   splitr   rl   r   r   )rX   all_msgmsgsr   r   ry   s         r   ProcessStructuredOutr     s      $}/C/C D D""$**40  DI )c
kk#((				**+	  ?	r   c                    U R                   (       d  / U l         U(       a  UR                  (       a%  U R                   R                  UR                  5        UR                  5       (       a4  U R                   R                  UR                  R                  5       5        ggU(       a  U R                   R                  U5        gg)z?Update OperationResult either from OutputMessage or plain text.N)r`   r   rl   IsErrorerror_detailsFormat)rX   r   r   s      r   _CaptureStdErrr   .  s    			M!!."5"56!!.">">"E"E"GH  
+ r   c                    ^ ^^ UU U4S jnU$ )zBDefault processing for structured stderr from threaded subprocess.c                   > U (       Gai  U R                  5       n [        U 5      nUR                  5       (       a  UR                  S:X  a/  [        R
                  " UR                  R                  5       5        OUR                  S:X  a/  [        R                  " UR                  R                  5       5        OUR                  S:X  a/  [        R                  " UR                  R                  5       5        OhUR                  S:X  a.  [        R                  " UR                  R                  5       5        O)[        R                  R                  UR                  5        T(       a  [        TUS9  ggg! [         ao  nT(       a)  [        R                  " [         R#                  U5      5        [        R                  R                  U5        T(       a  [        TUS9   SnAg SnAgSnAff = f)aO  Handle line as a structured message.

Attempts to parse line into an OutputMessage and log any errors or warnings
accordingly. If line cannot be parsed as an OutputMessage, logs it as plain
text to stderr. If capture_output is True will capture any logged text to
result_holder.

Args:
  line: string, line of output read from stderr.
infor   r   debug)r   r   N)r}   r   r   levelr
   r   r   r   r   r   r   rt   rk   r   r   r:   r   r   )rn   r   ry   r   ro   rX   r   s       r   ra   7DefaultStreamStructuredErrHandler.<locals>.HandleStdErr@  sH    

g<"4(;;==YY& HHS&&--/0yyG#IIc''..01yyI%KK))0023yyG#IIc''..01
**

388
$
s
;  " # < 
++5<<SA
B

!
7
; 	<s   EE4 4
G->A G((G-r    )rX   ro   r   ra   s   ``` r   !DefaultStreamStructuredErrHandlerr   ;  s    
!<F 
r   c                    U R                   (       a  [        R                  " U R                   5      (       a  U R                   O(U R                   R                  5       R	                  S5      n/ n/ nU Hi  n[        U5      nUR                  5       (       a+  UR                  UR                  R                  5       5        MN  UR                  UR                  5        Mk     X#4$ g)av  Default processing for structured stderr from non-threaded subprocess.

Attempts to parse result_holder.stderr into an OutputMessage and return any
status messages or raised errors.

Args:
  result_holder:  OperationResult

Returns:
  ([status messages], [errors]), Tuple of status messages and errors.
Raises:
  StructuredOutputError if result_holder can not be processed.
r   r   )r`   r   r   r}   r   r   r   rl   r   r   r   )rX   r   messageserrorsr   ry   s         r   ProcessStructuredErrr   f  s      $}/C/C D D""$**40  HF )c	c''..01!  	r   c                     U R                   S:w  a  U R                  (       d  SU l        U(       a  U R                  (       a  [        U 5        ggg)a  Processing for subprocess where non-zero exit status is not always failure.

Uses rule of thumb that defines success as:
- a process with zero exit status OR
- a process with non-zero exit status AND some stdout output.

All others are considered failed.

Args:
  result_holder: OperationResult, result of command execution
  show_exec_error: bool, if true log the process command and exit status the
    terminal for failed executions.

Returns:
  None. Sets the failed attribute of the result_holder.
r   TN)r   rW   re   r   rf   s     r   NonZeroSuccessFailureHandlerr     s<    " !-*>*>M--. ._r   c                 8   [         R                  " 5       R                  (       a  [        R                  R                  5       OS n [        R                  " USS9nXR                  US9;   $ ! [        R                   a    [        R                  " S5         g f = f)NF)platform_filterwarn)include_hiddenz:Component check failed. Could not verify SDK install path.)r   Pathssdk_rootr   PlatformCurrentr   UpdateManagerGetCurrentVersionsInformationr   Errorr
   r   )component_namecheck_hiddenplatformmanagers       r   CheckBinaryComponentInstalledr     s    -3\\^-D-DY'')$(**8%PGBB# C % % %			 KKLMs   %A, ,*BBc                    [        X5      nU(       a=  [        R                  R                  [        R
                  " 5       R                  U 5      $ [        R                  " U 5      nU(       a  [        R                  " SU5        U$ U(       a4  [        R                  " SU 5        [        U [        R                  U S95      $ [        X5      e)al  Check if binary is installed and return path or raise error.

Prefer the installed component over any version found on path.

Args:
  binary_name: str, name of binary to search for.
  check_hidden: bool, whether to check hidden components for the binary.
  custom_message: str, custom message to used by MissingExecutableException if
    thrown.
  install_if_missing: bool, if true will prompt user to install binary if not
    found.

Returns:
  Path to executable if found on path or installed component.

Raises:
  MissingExecutableException: if executable can not be found or can not be
   installed as a component.
zFound executable on path: %szInstalling %s...)binary)r   osrO   joinr   r   sdk_bin_pathr   FindExecutableOnPathr
   r   InstallBinaryNoOverrides_INSTALL_MISSING_EXEC_PROMPTr   r=   )binary_namer   rC   install_if_missingis_componentpath_executables         r   CheckForInstalledBinaryr     s    . /{I,77<<33[AA..{;/II,o>II +.#1888LN N 	#;??r   c                 J   [         R                  " SUSSR                  U 5      S9  [        R                  R                  5       n[        R                  " US9nUR                  U /5        [        R                  " U 5      nU(       a  U$ [        U SR                  U 5      5      e)zFHelper method for installing binary dependencies within command execs.zPausing command execution:Tz8Aborting component install for {} and command execution.)messageprompt_stringcancel_on_nocancel_string)r   z{} binary not installed)r   PromptContinuer   r   r   r   r   r   Installr   r   r=   )r   promptr   update_manager_clientr   s        r   r   r     s    *Nvk '')((66xP...{;/",33K@	B Br   c                       \ rS rSrSr " S S\5      r        SS jr\S 5       r	\S 5       r
\S	 5       rSS
 jr\R                  S 5       rS rSrg)BinaryBackedOperationi  zBClass for declarative operations implemented as external binaries.c                   >    \ rS rSrSr     S	S jrS rS rS rSr	g)
%BinaryBackedOperation.OperationResulti  z6Generic Holder for Operation return values and errors.Nc                 L    Xl         X l        X0l        X@l        X`l        XPl        g r@   )r   rW   r`   r   r   re   )r/   command_stroutputr   rt   re   execution_contexts          r   r.   .BinaryBackedOperation.OperationResult.__init__  s#     *kkn&lkr   c                    [         R                  " 5       nU R                  US'   U R                  US'   U R                  US'   U R
                  US'   U R                  US'   U R                  US'   [        R                  " U5      $ )Nr   rW   r`   r   re   r   )
collectionsOrderedDictr   rW   r`   r   re   r   r   dump)r/   r   s     r   __str__-BinaryBackedOperation.OperationResult.__str__  sw    &&(f#'#8#8f fXfX NNf[fX$(LLf !YYvr   c                    [        U[        R                  5      (       a  U R                  UR                  :H  =(       a    U R                  UR                  :H  =(       ay    U R
                  UR
                  :H  =(       aY    U R                  UR                  :H  =(       a9    U R                  UR                  :H  =(       a    U R                  UR                  :H  $ g)NF)	
isinstancer   OperationResultr   rW   r`   r   re   r   )r/   others     r   __eq__,BinaryBackedOperation.OperationResult.__eq__  s    	E0@@	A	A%%)?)?? Nu||+N04u||0KN%//1N u||+N 150M	O r   c                 "    U R                  5       $ r@   )r   r/   s    r   __repr__.BinaryBackedOperation.OperationResult.__repr__  s    \\^r   )r   r   r   re   r`   rW   )NNr   FN)
r"   r#   r$   r%   r&   r.   r   r   r   r'   r    r   r   r   r     s*    @ #'r   r   Nc
                     [        UUU	U(       a  US   OSS9U l        Xl        X l        Xpl        U=(       d    [
        U l        U=(       d    [        U l        U=(       d    [        U l
        g)aV  Creates the Binary Operation.

Args:
  binary: executable, the name of binary containing the underlying
    operations that this class will invoke.
  binary_version: string, version of the wrapped binary.
  check_hidden: bool, whether to look for the binary in hidden components.
  std_out_func: callable(OperationResult, **kwargs), returns a function to
    call to process stdout from executable and build OperationResult
  std_err_func: callable(OperationResult, **kwargs), returns a function to
    call to process stderr from executable and build OperationResult
  failure_func: callable(OperationResult), function to call to determine if
    the operation result is a failure. Useful for cases where underlying
    binary can exit with non-zero error code yet still succeed.
  default_args: dict{str:str}, mapping of parameter names to values
    containing default/static values that should always be passed to the
    command.
  custom_errors: dict(str:str}, map of custom exception messages to be used
    for known errors.
  install_if_missing: bool, if True prompt for install on missing component.
MISSING_EXECN)r   r   r   rC   )r   _executable_binary_version_default_argsr\   std_out_handlerrc   std_err_handlerrh   set_failure_status)
r/   r   binary_versionr   std_out_funcstd_err_funcfailure_funcdefault_argscustom_errorsr   s
             r   r.   BinaryBackedOperation.__init__  sc    > /!-8E}^44	QD
 L"M%'?+?D'?+?D*C.CDr   c                     U R                   $ r@   )r   r   s    r   r   !BinaryBackedOperation.binary_name9  s    <<r   c                     U R                   $ r@   )r   r   s    r   
executable BinaryBackedOperation.executable=  s    r   c                     U R                   $ r@   )r   r   s    r   defaultsBinaryBackedOperation.defaultsA  s    r   c           
      V   UUUR                  S5      S.nU R                  XS9nU R                  U5      nU R                  U5      n[        R
                  R                  US   5      n	 UR                  S5      n
U
(       a/  [        R
                  R                  U
5      (       d  [        X5      e[        R                  " USUUUU
US9nXl        U R                  XdR                  SS	5      5        U$ ! [        R                  [        R                  4 a  n[        X5      eSnAff = f)
  Execute binary and return operation result.

 Will parse args from kwargs into a list of args to pass to underlying
 binary and then attempt to execute it. Will use configured stdout, stderr
 and failure handlers for this operation if configured or module defaults.

Args:
  cmd: [str], command to be executed with args
  stdin: str, data to send to binary on stdin
  env: {str, str}, environment vars to send to binary.
  **kwargs: mapping of additional arguments to pass to the underlying
    executor.

Returns:
  OperationResult: execution result for this invocation of the binary.

Raises:
  ArgumentError, if there is an error parsing the supplied arguments.
  BinaryOperationError, if there is an error executing the binary.
execution_direnvstdinexec_dirr   r   r   Targsno_exitout_funcerr_funcin_strcwdr  Nrg   F)getr   r   r   r   rO   basenameisdirrL   r	   ExecPermissionErrorInvalidCommandErrorrG   r   r   r/   cmdr  r  kwargs
op_contextrX   r   r   short_cmd_nameworking_dirr   r   s                r   _ExecuteBinaryBackedOperation._ExecuteE  s"   , JJ/J
 (( ) 7M **=9O**=9OWW%%c!f-N.JJ/k	RWW]];77*>GG!&&""i (M::6G+OP ++//1 .>--.s   *A!C4 4$D(D##D(c                     g)a:  Parse and validate kwargs into command argument list.

Will process any default_args first before processing kwargs, overriding as
needed. Will also perform any validation on passed arguments. If calling a
named sub-command on the underlying binary (vs. just executing the root
binary), the sub-command should be the 1st argument returned in the list.

Args:
  **kwargs: keyword arguments for the underlying command.

Returns:
 list of arguments to pass to execution of underlying command.

Raises:
  ArgumentError: if there is an error parsing or validating arguments.
Nr    )r/   r   s     r   _ParseArgsForCommand*BinaryBackedOperation._ParseArgsForCommandz  s    $ 	r   c                     U R                   /nUR                  U R                  " S0 UD65        U R                  " U40 UD6$ )Nr    )r  extendr'  r$  )r/   r   r  s      r   __call__BinaryBackedOperation.__call__  s<    ??
CJJt((2623=='''r   )r   r   r   r   r   r   r   )NFNNNNNFr   )r"   r#   r$   r%   r&   objectr   r.   propertyr   r  r  r$  abcabstractmethodr'  r+  r'   r    r   r   r   r     s    J$ $P #!    !"')DV      3j 	 	&(r   r   c                   N   ^  \ rS rSrSr          SU 4S jjrSS jrSrU =r$ )StreamingBinaryBackedOperationi  zEExtend Binary Operations for binaries which require streaming output.c                    > [         [        U ]  XX4XVUX5	        Xl        U
(       a  [        n[
        nO[        n[        nU=(       d    UU l        U=(       d    UU l	        Xl
        g r@   )r-   r2  r.   ro   r   r   rq   rv   r   r   structured_output)r/   r   r   r   r   r   r   r   r   ro   r4  r   default_out_handlerdefault_err_handlerr1   s                 r   r.   'StreamingBinaryBackedOperation.__init__  sj     

(
%\&< )==33'>+>D'>+>D.r   c           
      v   UUUR                  S5      S.nU R                  XS9nU R                  X`R                  S9nU R	                  X`R                  S9n[
        R                  R                  US   5      n	 UR                  S5      n
U
(       a/  [
        R                  R                  U
5      (       d  [        X5      e[        R                  " USUUUU
US9nXl        U R!                  XdR                  S	S
5      5        U$ ! [        R                  [        R                  4 a  n[        X5      eSnAff = f)r
  r  r  r  )rX   ro   r   Tr  Nrg   F)r  r   r   ro   r   r   rO   r  r  rL   r	   ExecWithStreamingOutputr  r  rG   r   r   r  s                r   r$  'StreamingBinaryBackedOperation._Execute  s@   , JJ/J
 (( ) 7M **#4G4G + IO**#4G4G + IOWW%%c!f-N.JJ/k	RWW]];77*>GG!99""i (M::6G+OP ++//1 .>--.s   :A!D $D8(D33D8)ro   r   r   r4  )
NFNNNNNFFFr   )	r"   r#   r$   r%   r&   r.   r$  r'   r4   r5   s   @r   r2  r2    s5    M #!    !#!&"'/64 4r   r2  )F)T)NNN)FTr   )FNF)?r&   
__future__r   r   r   r/  r   r   &googlecloudsdk.command_lib.util.anthosr   rz   googlecloudsdk.corer   r   core_exceptionsr	   r
   r   googlecloudsdk.core.consoler   googlecloudsdk.core.updaterr   r   googlecloudsdk.core.utilr   r   sixr   rA   r   r   r   r   r   r)   r7   r:   r=   rG   rL   rR   r\   rc   rh   rq   rv   r   r   r   r   r   r   r   r   r   r   r   r   with_metaclassABCMetar-  r   r2  r    r   r   <module>rE     s   5 &  ' 
  	 L & = / # $ 2 3 6 * . 
+  != $<  .0?00 0(/ (A 4 AI0 I
@!5 
@) #7 C( C/K.D #'#'"," 6;<@.<
, 6;<@(V@/. */+//4&@RB(l(C..s{{FC l(^Ss{{$9:Sr   