
    b                       S r SSKJr  SSKrSSKJrJrJrJr  SSK	r	SSK
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JrJrJ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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5      r-\R\                   " S S5      5       r/ " S S\R`                  5      r1 " S  S!\15      r2 " S" S#\
Rf                  5      r4 " S$ S%\
Rj                  5      r6 " S& S'\
Rf                  5      r7 " S( S)5      r8 " S* S+\15      r9 " S, S-\15      r:S3S. jr;      S4S/ jr<    S5S0 jr=    S6S1 jr>\	R~                      S7S2 j5       r@g)8z*Utilities for fetching system information.    )annotationsN)IteratorMappingMutableSequenceSequence)wintypes)CallableTupleTypeVar)metrics_util)
diagnostic)execution_utils)log)files)	platforms)scaled_integerz	CPU Countz$Number of logical CPUs in the systemzCPU Load Avgz%Average CPU load during last 1-minutezFree MemoryzFree memory in the systemzTotal MemoryzTotal memory in the systemzSystem InfozDisk IO Stats DeltazDisk Transfer CountzDisk Transfer SizezDisk Average Transfer Size_Tc                  B    \ rS rSr% SrS\S'   S\S'   S\S'   S\S'   S	rg
)DiskIOStats8   a  I/O statistics for a disk.

Attributes:
  name: The name of the disk.
  average_transfer_size: The average size of each transfer in bytes.
  transfer_count: The total number of transfers since boot.
  total_transfer_size: The total size of the transfers in bytes since boot.
strnamezfloat | Noneaverage_transfer_sizetransfer_counttotal_transfer_size N)__name__
__module____qualname____firstlineno____doc____annotations____static_attributes__r       >lib/googlecloudsdk/command_lib/storage/diagnose/system_info.pyr   r   8   s      	)%%##r$   r   c                      \ rS rSrSrS	S jr\R                  S
S j5       r\R                  SS j5       r	\R                  SS j5       r
Srg)SystemInfoProviderI   zBase system information provider.

This class contains OS agnostic implemenations. Child classes may implement
methods which are OS dependent.
c                ,    [         R                  " 5       $ )zReturns the number of logical CPUs in the system.

Logical CPU is the number of threads that the OS can schedule work on.
Includes physical cores and hyper-threaded cores.
)os	cpu_countselfs    r%   get_cpu_count SystemInfoProvider.get_cpu_countP   s     <<>r$   c                    [        5       e)2Returns the average CPU load during last 1-minute.NotImplementedErrorr,   s    r%   get_cpu_load_avg#SystemInfoProvider.get_cpu_load_avgX        
r$   c                    [        5       eFetches the physical memory stats for the system in bytes.

Returns:
  A tuple containing total memory and free memory in the system
  respectively.
r2   r,   s    r%   get_memory_stats#SystemInfoProvider.get_memory_stats]   s     
r$   c                    [        5       e)>Retrieves disk I/O statistics for all the disks in the system.r2   r,   s    r%   get_disk_io_stats$SystemInfoProvider.get_disk_io_statsg   r6   r$   r   NreturnintrA   floatrA   zTuple[int, int]rA   zSequence[DiskIOStats])r   r   r   r    r!   r.   abcabstractmethodr4   r:   r>   r#   r   r$   r%   r'   r'   I   sZ                r$   r'   c                  6    \ rS rSrSrSS jrS	S jrS
S jrSrg)UnixSystemInfoProviderm   z3System information provider for *nix based systems.c                2    [         R                  " 5       S   $ r1   r   r*   
getloadavgr,   s    r%   r4   'UnixSystemInfoProvider.get_cpu_load_avgp       ==?1r$   c                   SnSnSnSn[         R                  " S5      n[         R                  " S5      n[         R                  " S5      n[         R                  " S5      n[        R                  " S5       n	U	 H  n
UR	                  U
5      =n(       a  [        UR                  S5      5      S-  nM:  UR	                  U
5      =n(       a  [        UR                  S5      5      S-  nMq  UR	                  U
5      =n(       a  [        UR                  S5      5      S-  nM  UR	                  U
5      =n(       d  M  [        UR                  S5      5      S-  nM     SSS5        XU-   U-   4$ ! , (       d  f       N= f)	r9   Nz^MemTotal:\s*(\d*)\s*kBz^MemFree:\s*(\d*)\s*kBz^Buffers:\s*(\d*)\s*kBz^Cached:\s*(\d*)\s*kBz/proc/meminfo     )recompiler   
FileReadermatchrB   group)r-   	mem_totalmem_freemem_buffers
mem_cachedmem_total_regexmem_free_regexmem_buffers_regexmem_cached_regexflinems               r%   r:   'UnixSystemInfoProvider.get_memory_statst   sC    IHKJjj!;<OZZ 9:N

#<=zz":;			/	*a$%%d++1+!''!*o,) &&t,,Q,_t+(#))$//Q/AGGAJ$.+"((..Q.1771:-*  
+ +-
:;; 
+	*s   7CE.<!E..
E<c           
         [         R                  " 5       n/ nU(       d  / $ UR                  5        H<  u  p4Uu  pVpx  n	XV-   n
Xx-   nU
S:X  a  SnOX-  nUR                  [	        UUU
US95        M>     U$ )r=   r   Nr   r   r   r   )r   get_disk_countersitemsappendr   )r-   raw_metricsdisk_io_stats	disk_namecountersreadswritesrbyteswbytes_r   r   r   s                r%   r>   (UnixSystemInfoProvider.get_disk_io_stats   s    002KMi*002	,4)eVQ~n"O	1	 $ 3 D
$9+"5	  3$ r$   r   NrC   rE   rF   )	r   r   r   r    r!   r4   r:   r>   r#   r   r$   r%   rJ   rJ   m   s    ;<Br$   rJ   c            
        ^  \ rS rSrSrS\R                  4S\R                  4S\R                  4S\R                  4S\R                  4S\R                  4S	\R                  4S
\R                  4S\R                  4/	rU 4S jr	Sr
U =r$ )MemoryStatusEX   zWindows MemoryStatusEX structure.

https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex
dwLengthdwMemoryLoadullTotalPhysullAvailPhysullTotalPageFileullAvailPageFileullTotalVirtualullAvailVirtualsullAvailExtendedVirtualc                X   > [         R                  " U 5      U l        [        TU ]  5         g N)ctypessizeofrx   super__init__)r-   	__class__s    r%   r   MemoryStatusEX.__init__   s    MM$'DM	Gr$   )rx   )r   r   r   r    r!   r   c_ulongc_ulonglong_fields_r   r#   __classcell__)r   s   @r%   rv   rv      s     6>>"v~~&v))*v))*6--.6--.&,,-&,,-!6#5#56
( r$   rv   c                      \ rS rSrSrS\R                  4S\R                  4S\R                  4S\R                  4S\R                  4/rSrg	)
PDHCounterUnion   zStructure for the union of the windows perfmon counter values.

https://learn.microsoft.com/en-us/windows/win32/api/pdh/ns-pdh-pdh_counter_union
	longValuedoubleValue
largeValueAnsiStringValueWideStringValuer   N)r   r   r   r    r!   r   LONGr   c_double
c_longlongLPCSTRLPCWSTRr   r#   r   r$   r%   r   r      sP     HMM"foo&V&&'(//*(**+(r$   r   c                  <    \ rS rSrSrS\R                  4S\4/rSr	g)PDHFormattedCounterValue   zStructure for the windows perfmon formatted counter value.

https://learn.microsoft.com/en-us/windows/win32/api/pdh/ns-pdh-pdh_fmt_countervalue
CStatusunionr   N)
r   r   r   r    r!   r   DWORDr   r   r#   r   r$   r%   r   r      s$     (..! (r$   r   c                      \ rS rSrSrSr\R                  " SSSSSS	S
SSSSSSSS.5      rSS jrSS jr	SS jr
SS jrSS jrS S jrSS jrSrg)!WindowsPerfmonCounterProvider   a2  Provider for interacting with windows perfmon counters.

This class wraps the windows perfmon low level API.
https://learn.microsoft.com/en-us/windows/win32/perfctrs/using-the-perflib-functions-to-consume-counter-data

Attributes:
  counters: The string counter identifiers whose values are to be fetched.
i   PDH_CSTATUS_VALID_DATAPDH_CSTATUS_NO_MACHINEPDH_MORE_DATAPDH_NO_DATAPDH_CSTATUS_NO_OBJECTPDH_CSTATUS_NO_COUNTERPDH_MEMORY_ALLOCATION_FAILUREPDH_INVALID_HANDLEPDH_INVALID_ARGUMENTPDH_CSTATUS_BAD_COUNTERNAMEPDH_INSUFFICIENT_BUFFERPDH_INVALID_DATAPDH_NOT_IMPLEMENTEDPDH_STRING_NOT_FOUND)r   l      l      l      l      l      l      l      l      l      l      l      l      l      c                    Xl         [        R                  R                  U l        SU l        / U l        U R                  5         U R                  5         g)a  Initializes the provider.

Some of the perfmom counters are intantaneous and some are cumulative. This
provider will fetch the counters during instantiation so that the data for
cummulative counters is availble on successive calls to the
get_perfmon_counter_values method. The data for cumulative counters is
updated from the start of the initialization to the time of the call to
get_perfmon_counter_values. The instance of this class encapsulates the
counter state which is updated during the initialization and the subsequent
calls to get_perfmon_counter_values. The counter state is reset when the
close method is called.

Example usage:
  provider = WindowsPerfmonCounterProvider(counters)
  counter_values = provider.get_perfmon_counter_values()
  ...
  # Fetch the counter values again.
  counter_values = provider.get_perfmon_counter_values()
  ...
  # Close the perfmon query.
  provider.close()

  Can be used with closing context manager as well.
  with contextlib.closing(WindowsPerfmonCounterProvider(counters)) as
  provider:
    counter_values = provider.get_perfmon_counter_values()

Args:
  counters: The language neutral perfmon counter identifiers.

Raises:
  DiagnosticIgnorableError: If failed to initialize the perfmon query.
N)	rn   r   windllpdh_pdh_query_handle_counter_handles_initialize_perfmon_query _populate_perfmon_counter_values)r-   rn   s     r%   r   &WindowsPerfmonCounterProvider.__init__  sE    D M!!DIDD""$ 	))+r$   c                B    US-  nU R                   R                  X5      $ )z4Convert a PDH error code to a human readable string.l    )_PDH_ERRORCODES_TO_MESSAGESget)r-   codes     r%   _get_pdh_error,WindowsPerfmonCounterProvider._get_pdh_error/  s#    KD++//;;r$   c                R    [         R                  " SU R                  U5       35      e)zCTranslates the error code to a human readable string and raises it.zFailed to fetch perfmon data. )r   DiagnosticIgnorableErrorr   )r-   
error_codes     r%   _translate_and_raise_error8WindowsPerfmonCounterProvider._translate_and_raise_error4  s+    

-
-
()<)<Z)H(IJ r$   c           	        [         R                  " 5       U l        / U l        U R                  R                  SS[        R                  " U R                  5      5      nU(       a  U R                  U5        U R                   H  n[         R                  " 5       nU R                  R                  U R                  US[        R                  " U5      5      nU(       a  U R                  U5        U R                  R                  U5        M     g)zInitializes the perfmon query.Nr   )r   HANDLEr   r   r   PdhOpenQueryWr   byrefr   rn   PdhAddEnglishCounterWrj   )r-   errorcountercounter_handles       r%   r   7WindowsPerfmonCounterProvider._initialize_perfmon_query:  s     "*DD II##D!V\\$:L:L-MNE
%%e,==(nii--


gq&,,~*Fe 
''.
"">2 !r$   c                    U R                   R                  U R                  5      nU(       a  U R                  U5        gg)z,Fetches the values for the perfmon counters.N)r   PdhCollectQueryDatar   r   r-   r   s     r%   r   >WindowsPerfmonCounterProvider._populate_perfmon_counter_valuesP  s2    II))$*<*<=E
%%e, r$   c           	   #  >  #    U R                  5         U R                   Hy  n[        5       nU R                  R	                  XR
                  S[        R                  " U5      5      nU(       a  U R                  U5        [        UR                  SS5      v   M{     g7f)af  Fetches the values for the perfmon counters.

For the cumulative counters, the values are updated from the start of the
initialization to the time of the call to this method.

Yields:
  The value for the perfmon counter as Float or None if counter value is not
  available.

Raises:
  DiagnosticIgnorableError: If failed to fetch the perfmon counter values.
Nr   )r   r   r   r   PdhGetFormattedCounterValue_PDH_FORMAT_DOUBLEr   r   r   getattrr   )r-   r   valuer   s       r%   get_perfmon_counter_values8WindowsPerfmonCounterProvider.get_perfmon_counter_valuesV  s{      	))+//&(eii33
114e9Le 
''.EKK55 0s   BBc                    U R                   (       d  gU R                  R                  U R                   5      nSU l         U(       a'  [        R                  " SU R                  U5      5        gg)zCloses the perfmon query.Nz%Failed to close the perfmon query. %s)r   r   PdhCloseQueryr   r   r   r   s     r%   close#WindowsPerfmonCounterProvider.closeo  sT    II##D$6$67ED	ii
143F3Fu3M r$   )r   r   r   rn   N)rn   Sequence[str])rA   r   )r   rB   rA   None)rA   r   )rA   zIterator[float | None])r   r   r   r    r!   r   
frozendictr   r   r   r   r   r   r   r   r#   r   r$   r%   r   r      su     
 !+ 5 5**!)*1&(/+$'(7 !"),V<
3,-62	r$   r   c                  <    \ rS rSrSrS rS	S jrS
S jrSS jrSr	g)WindowsSystemInfoProvideri{  z.System info provider for windows based sytems.c                B    [         R                  R                  U l        g r   )r   r   kernel32r,   s    r%   r   "WindowsSystemInfoProvider.__init__~  s    MM**DMr$   c                    g)r1   Nr   r,   s    r%   r4   *WindowsSystemInfoProvider.get_cpu_load_avg  s    r$   c                    [        5       nU R                  R                  [        R                  " U5      5        UR
                  UR                  4$ )zFetches the physical memory stats for the system.

Returns:
  A tuple containing total memory and free memory in the system
  respectively.
)rv   r   GlobalMemoryStatusExr   r   rz   r{   )r-   meminfos     r%   r:   *WindowsSystemInfoProvider.get_memory_stats  s>     GMM&&v||G'<=  '"6"677r$   c                    [        S5      e)NzNot implemented for Windows.r2   r,   s    r%   r>   +WindowsSystemInfoProvider.get_disk_io_stats  s    
<
==r$   )r   NrC   rE   rF   )
r   r   r   r    r!   r   r4   r:   r>   r#   r   r$   r%   r   r   {  s    6+	
8>r$   r   c                      \ rS rSrSrSS jrSS jrSS jrSS jr          SS jr	        SS jr
SS	 jrS
rg)OsxSystemInfoProvideri  z+System info provider for OSX based systems.c                2    [         R                  " 5       S   $ rM   rN   r,   s    r%   r4   &OsxSystemInfoProvider.get_cpu_load_avg  rQ   r$   c                |   [         R                  " 5       n[         R                  " 5       n[        R                  " [        R                  " SSS5      UR
                  UR
                  SS9nUS:w  a3  [        R                  " SR                  UR                  5       5      5      e[        UR                  5       5      $ )z0Fetches the total memory in the system in bytes.sysctlz-nz
hw.memsizeTout_funcerr_funcno_exitr    Failed to fetch memory stats. {})ioStringIOr   ExecArgsForExecutableToolwriter   r   formatgetvaluerB   )r-   outerrreturn_codes       r%   _get_total_memory'OsxSystemInfoProvider._get_total_memory  s    
++-C
++-C!&&--hlK	K a//
,
3
3CLLN
C  s||~r$   c                2   Sn[         R                  " 5       n[         R                  " 5       n[        R                  " [        R                  " S5      UR
                  UR
                  SS9nUS:w  a3  [        R                  " SR                  UR                  5       5      5      e[        R                  " S5      nUR                  5       R                  S5       H:  nUR                  U5      =n(       d  M  [        UR                  S	5      5      U-  s  $    g
)z/Fetches the free memory in the system in bytes.i   vm_statTr   r   r   z^Pages free:\s*(\d*).
rS   N)r   r   r   r   r   r   r   r   r   r   rU   rV   splitrX   rB   rY   )r-   	page_sizer   r   r  memory_pages_free_regexlinesrd   s           r%   _get_free_memory&OsxSystemInfoProvider._get_free_memory  s    I
++-C
++-C!&&--i8	K a//
,
3
3CLLN
C  !jj)AB%%d+%++E2	2	21771:** , r$   c                B    U R                  5       U R                  5       4$ r8   )r  r  r,   s    r%   r:   &OsxSystemInfoProvider.get_memory_stats  s!     ""$d&;&;&=>>r$   c                n    [        U5      [        U5      U-  :w  a  g[        U5      [        U5      :w  a  gg)a  Validates the output of the iostat command.

The iostat command output can be missing from the system due to missing
installation or the command may not report the disk metrics if there is no
disk activity.

Args:
  disks: List of disks in the system.
  header: Header of the iostat output.
  stats: Stats of the iostat output.
  metric_count_per_disk: Number of metrics per disk.

Returns:
  Whether the output is valid.
FT)len)r-   disksheaderstatsmetric_count_per_disks        r%   _is_valid_iostat_output-OsxSystemInfoProvider._is_valid_iostat_output  s3    , 6{c%j#888
5zS[ r$   c                   [         R                  " S5      n[         R                  " S5      n[         R                  " S5      nSnSnSn	[        U5       Hz  u  pUR                  U5      (       a  [	        X:   5      S-  n	M-  UR                  U5      (       a  [	        X:   5      nMR  UR                  U5      (       d  Mj  [	        X:   5      S-  nM|     [        UU	UUS9$ )z=Returns the disk I/O stats for a disk from the iostat output.z^KB/tz^xfrsz^MBNrT   i@B rg   )rU   rV   	enumeraterX   rD   r   )r-   rm   headersr  kilobytes_per_transfer_regextransfers_regexmegabytes_transferred_regexr   r   r   indexr  s               r%   %_get_disk_io_stats_from_iostat_output;OsxSystemInfoProvider._get_disk_io_stats_from_iostat_output  s     $&::h#7 jj*O"$**V"4N "7+	%	+	+F	3	3 %el 3d :  ((u|,&,,V44#EL1G; , 3%/	 r$   c                   [         R                  " 5       n[         R                  " 5       n[        R                  " [        R                  " SSS5      UR
                  UR
                  SS9nUS:w  a'  [        R                  " SUR                  5        35      eUR                  5       R                  S5      tpEpgUR                  5       nUR                  5       n	UR                  5       n
S	nU R                  XX5      (       d  [        R                  " S
5      e/ nSnU H1  nUR                  U R                  UXX-    XX-    5      5        X-  nM3     U$ )zRetrieves disk I/O statistics for all the disks in the system.

Returns:
  A list of DiskIOStats objects containing the disk I/O statistics.

Raises:
  DiagnosticIgnorableError: If failed to fetch disk I/O stats.
iostatz-dz-ITr   r   z Failed to fetch disk I/O stats. r     zAFailed to fetch disk I/O stats. Invalid output of iostat command.)r   r   r   r   r   r   r   r   r   r  r  rj   r  )r-   r   r   r  
disks_lineheader_line
stats_liners   r  r  r  r  rl   r   disks                  r%   r>   'OsxSystemInfoProvider.get_disk_io_stats	  sW    ++-C
++-C!&&--hdC	K a//,S\\^,<
=  /2lln.B.B4.H+JZ E!GE''  //
M  MG

4
4 ?@g=> &g  r$   r   NrC   r@   rE   )
r  r   r  r   r  r   r  rB   rA   bool)rm   r   r  r   r  r   rA   r   rF   )r   r   r   r    r!   r4   r  r  r:   r  r  r>   r#   r   r$   r%   r   r     sx    3&4?  	
 ! 8%2;H6:r$   r   c                 &   [         R                  R                  5       [         R                  R                  :X  a
  [	        5       $ [         R                  R                  5       [         R                  R
                  :X  a
  [        5       $ [        5       $ )z:Factory for fetching system info provider based on the OS.)r   OperatingSystemCurrentWINDOWSr   MACOSXr   rJ   r   r$   r%   get_system_info_providerr.  F  sc    &&(I,E,E,M,MM$&&&&(I,E,E,L,LL ""		!!r$   c                     U" 5       $ ! [          a0  n[        R                  " SX5         S nA[        R                  $ S nAff = f)NzFailed to fetch metric: %s. %s)	Exceptionr   	exceptionr   PLACEHOLDER_METRIC_VALUE)metric_namemetric_functiones      r%   _get_metric_or_placeholderr6  O  sA    D	 DMM2KCC		,	,,Ds   	 
A>Ac                V   [        [        U R                  5      n[        [        U R                  5      n[        SU R
                  5      nU[        R                  La/  Uu  pE[        R                  " USS9n[        R                  " USS9nO[        R                  =pE[        R                  " [        [        R                  " [        U[        S9[        R                  " [        U[        S9[        R                  " [        U[         S9[        R                  " ["        U[$        S9/S9$ )z-Returns the system info as diagnostic result.zMemory StatsrS   decimal_places)r   resultpayload_descriptionr   operation_results)r6  _CPU_COUNT_METRIC_NAMEr.   _CPU_LOAD_AVG_METRIC_NAMEr4   r:   r   r2  r   FormatBinaryNumberDiagnosticResult_SYSTEM_DIAGNOSTIC_NAMEDiagnosticOperationResult_CPU_COUNT_METRIC_DESCRIPTION _CPU_LOAD_AVG_METRIC_DESCRIPTION_TOTAL_MEMORY_METRIC_NAME _TOTAL_MEMORY_METRIC_DESCRIPTION_FREE_MEMORY_METRIC_NAME_FREE_MEMORY_METRIC_DESCRIPTION)providerr+   cpu_load_avgmemory_statstotal_memoryfree_memorys         r%   !get_system_info_diagnostic_resultrO  [  s   
 )h44) ,!:!:, ,h//, <<< ,L!44QL !33AK ",!D!DDL		$	$"

.
.)"?
 
.
.,!"B
 
.
.,!"B
 
.
.+ "A!
 r$   c                   U R                   S nSnU R                  (       a  [        R                  " U R                  SS9nSnU R                  (       a  [        R                  " U R                  SS9n[
        U[        U[        U0$ )zFormats the disk I/O stat metrics to a human readable format.

Args:
  disk_stat: The disk I/O stats object.

Returns:
  A mapping of metric name to the formatted metric value.
z.1fNrS   r8  )r   r   r   r@  r    _DISK_TRANSFER_COUNT_METRIC_NAME_DISK_TRANSFER_SIZE_METRIC_NAME'_DISK_AVERAGE_TRANSFER_SIZE_METRIC_NAME)	disk_statformatted_transfer_countformatted_total_transfer_sizeformatted_average_transfer_sizes       r%   _format_disk_io_statsrX    s     !* 8 8="&""$2$E$E%%a%! %)!$$&4&G&G'''#
 '(@%'D-/N
 r$   c           	   #    #    Sn[        X R                  5      nSv   U[        R                  L a  g[        X R                  5      nU[        R                  L a  g/ nU H  nU Vs/ s H   owR                  UR                  :X  d  M  UPM"     nn[        U5      S:w  a    gUS   n	UR                  n
UR                  U	R                  -
  nUR                  U	R                  -
  n[        UR                  U
UUS9nUR                  [        R                  " UR                  [        U5      S95        M     UR                  [        R                  " [        US95        gs  snf 7f)a  A context manager to get the disk I/O stats delta as diagnostic result.

The context manager will fetch the disk I/O stats at the beginning and end of
the context and calculate the delta for each disk metric. Adds the delta
stats as a diagnostic result to the test_result list.

Args:
  provider: System info provider.
  test_result: List to append the diagnostic result.

Yields:
  None
zDisk IO StatsNrS   r   rg   )r   r:  r<  )r6  r>   r   r2  r   r  r   r   r   r   rj   rC  rX  rA  _DISK_IO_DIAGNOSTIC_NAME)rJ  test_resultdisk_io_metric_nameinitial_disk_statsfinal_disk_statsdiagnostic_operation_resultsrT  statmatching_initial_disk_statsinitial_disk_statr   transfer_count_deltatotal_transfer_size_deltadisk_stat_deltas                 r%   )get_disk_io_stats_delta_diagnostic_resultrf    sp    $ (155 :>>>
/55 <<<
!##i+#+yyINN/J+   # &'1,3A6 &;; 	  #4#C#CC  	%%(9(M(MM  "^^3+5	O !'',,(=o(N	
7 $B !!'8A#s   A$E"&EECE")rA   r'   )r3  r   r4  zCallable[[], _T]rA   z_T | str)rJ  r'   rA   zdiagnostic.DiagnosticResult)rT  r   rA   zMapping[str, str])rJ  r'   r[  z,MutableSequence[diagnostic.DiagnosticResult])Ar!   
__future__r   rG   collections.abcr   r   r   r   
contextlibr   r   dataclassesr   r*   rU   typingr	   r
   r   r   "googlecloudsdk.command_lib.storager   +googlecloudsdk.command_lib.storage.diagnoser   googlecloudsdk.corer   r   googlecloudsdk.core.utilr   r   r   r>  rD  r?  rE  rH  rI  rF  rG  rB  rZ  rQ  rR  rS  r   	dataclassr   ABCr'   rJ   	Structurerv   Unionr   r   r   r   r   r.  r6  rO  rX  contextmanagerrf  r   r$   r%   <module>ru     s   1 " 
 H H     	 	 	 + +  ; B / # * . 3 %  F * #J  ( "= * #?  ' 0 #8  "6 *F 'T] $ $ $ !  ! H@/ @FV%% 0fll 	v// 	U Up> 2 >4n. nb"	-	-%	- 	-2 2 2j@ I I=I Ir$   