
    l                     j   S 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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\R.                  5      r " S S\R.                  5      r\	R4                  " S5      r\" / SQ5      r\\" / SQ5      -  r\" / SQ5      r\" / SQ5      r \" / SQ5      r!SSSSSS.SSS S!S"S#S$S%S&S'S(.
S)S*S+S,S-S.S/S0.S1S2S3S4S5.S6.r"\" S7S8/5      r#SGS9 jr$S: r%S; r& " S< S=\'5      r( " S> S?\'5      r)S@ r*SA r+SB r,SC r-SD r. " SE SF\'5      r/g)HzCHelper for shim used to translate gsutil command to gcloud storage.    )absolute_import)print_function)division)unicode_literalsN)config)	exception)ApiSelector)CommandException)	boto_util)	constants)system_utilc                        \ rS rSrSrSrSrSrg)HIDDEN_SHIM_MODE%   no_fallbackdry_runnone N)__name__
__module____qualname____firstlineno__NO_FALLBACKDRY_RUNNONE__static_attributes__r       (platform/gsutil/gslib/utils/shim_util.pyr   r   %   s    +'	$r   r   c                       \ rS rSrSrSrSrg)RepeatFlagType+   r      r   N)r   r   r   r   LISTDICTr   r   r   r   r    r    +   s    	
$	
$r   r    z(^decryption_key([1-9]$|[1-9][0-9]$|100$))cpmvrsyncsetmeta)lsrewritestatcatcompose)r-   r*   rm	retention)zcache-controlzcontent-dispositionzcontent-encodingcontent-md5zcontent-languagezcontent-typezcustom-time)zx-goog-generation-matchzx-goog-if-generation-matchzx-goog-metageneration-matchzx-goog-if-metageneration-matchAWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEY%CLOUDSDK_STORAGE_GS_XML_ACCESS_KEY_ID)CLOUDSDK_STORAGE_GS_XML_SECRET_ACCESS_KEY-CLOUDSDK_CONTEXT_AWARE_USE_CLIENT_CERTIFICATE)aws_access_key_idaws_secret_access_keygs_access_key_idgs_secret_access_keyuse_client_certificateCLOUDSDK_PROXY_ADDRESSCLOUDSDK_PROXY_TYPECLOUDSDK_PROXY_PORTCLOUDSDK_PROXY_USERNAMECLOUDSDK_PROXY_PASSWORDCLOUDSDK_PROXY_RDNSCLOUDSDK_CORE_HTTP_TIMEOUT"CLOUDSDK_CORE_CUSTOM_CA_CERTS_FILE!CLOUDSDK_STORAGE_BASE_RETRY_DELAYCLOUDSDK_STORAGE_MAX_RETRIES)
proxy
proxy_type
proxy_port
proxy_user
proxy_pass
proxy_rdnshttp_socket_timeoutca_certificates_filemax_retry_delaynum_retriesCLOUDSDK_STORAGE_CHECK_HASHESCLOUDSDK_CORE_PROJECT%CLOUDSDK_CORE_DISABLE_USAGE_REPORTINGCLOUDSDK_STORAGE_USE_MAGICFILE4CLOUDSDK_STORAGE_PARALLEL_COMPOSITE_UPLOAD_THRESHOLD$CLOUDSDK_STORAGE_RESUMABLE_THRESHOLD&CLOUDSDK_STORAGE_RSYNC_LIST_CHUNK_SIZE)check_hashesdefault_project_iddisable_analytics_promptuse_magicfile#parallel_composite_upload_thresholdresumable_thresholdrsync_buffer_linesCLOUDSDK_AUTH_CLIENT_IDCLOUDSDK_AUTH_CLIENT_SECRETCLOUDSDK_AUTH_AUTH_HOSTCLOUDSDK_AUTH_TOKEN_HOST)	client_idclient_secretprovider_authorization_uriprovider_token_uri)CredentialsBotoGSUtilOAuth2stet_binary_pathstet_config_pathc                    U R                  5       nU[        ;   a-  U [        S5      S nUR                  S5      (       d  SU-   nOUnOU[        ;   a  UnOSnUb.  U(       a  U[        ;   d  US:X  a  gSU-   $ SR                  XQ5      $ S HI  nUR                  U5      (       d  M  U [        U5      S nU(       a  SU-   s  $ S	R                  UU5      s  $    g)
a  Returns the gcloud storage flag for the given gsutil header.

Args:
  raw_header_key: The header key.
  header_value: The header value
  unset: If True, the equivalent clear/remove flag is returned instead of the
    setter flag. This only applies to setmeta.

Returns:
  A string representing the equivalent gcloud storage flag and value, if
    translation is possible, else returns None.

Examples:
  >> get_flag_from_header('Cache-Control', 'val')
  --cache-control=val

  >> get_flag_from_header('x-goog-meta-foo', 'val')
  --update-custom-metadata=foo=val

  >> get_flag_from_header('x-goog-meta-foo', 'val', unset=True)
  --remove-custom-metadata=foo

zx-goog-Nzif-r0   z--clear-z--{}={})zx-goog-meta-zx-amz-meta-z--remove-custom-metadata=z--update-custom-metadata={}={})lowerPRECONDITIONS_HEADERSlen
startswithDATA_TRANSFER_HEADERSformat)raw_header_keyheader_valueunsetlowercase_header_keyproviderless_flag	flag_nameheader_prefixmetadata_keys           r   get_flag_from_headerrz      s    0 (--/22&s9~7''..++i#i44$II	!6	6:NR_:_I%%I446m&&}55#C$6$78l	*\99/66|7CE 	E 7 
r   c                  0    [         R                  (       a  gg)Nz^^^^^r   
IS_WINDOWSr   r   r   get_format_flag_caretr      s    	r   c                  0    [         R                  (       a  gg)Nz^\^n
r}   r   r   r   get_format_flag_newliner      s    	r   c                   "    \ rS rSr  SS jrSrg)GcloudStorageFlag   Nc                 (    Xl         X l        X0l        g)a  Initializes GcloudStorageFlag.

Args:
  gcloud_flag (str|dict): The name of the gcloud flag or a dictionary for
    when the gcloud flag depends on a gsutil value.
    gsutil "--pap off" -> gcloud "--no-public-access-prevention"
  repeat_type (RepeatFlagType|None): Gsutil sometimes handles list
    and dictionary inputs by accepting a flag multiple times.
  support_output_translation (bool): If True, this flag in gcloud storage
    supports printing gsutil formatted output.
Ngcloud_flagrepeat_typesupports_output_translation)selfr   r   r   s       r   __init__GcloudStorageFlag.__init__   s     #"'B$r   r   NF)r   r   r   r   r   r   r   r   r   r   r      s      +0Cr   r   c                   $    \ rS rSrSr SS jrSrg)GcloudStorageMap   zEMapping to translate gsutil command to its gcloud storage equivalent.c                 (    Xl         X l        X0l        g)a	  Intalizes GcloudStorageMap.

Args:
  gcloud_command (dict|str): The corresponding name of the command to be
    called in gcloud. If this command supports sub-commands, then this
    field must be a dict of sub-command-name:GcloudStorageMap pairs.
  flag_map (dict): A dict of str to GcloudStorageFlag. Mapping of gsutil
    flags to their equivalent gcloud storage flag names.
  supports_output_translation (bool): Indicates if the corresponding
    gcloud storage command supports the printing gsutil formatted output.
N)gcloud_commandflag_mapr   )r   r   r   r   s       r   r   GcloudStorageMap.__init__   s     )M'B$r   )r   r   r   NF)r   r   r   r   __doc__r   r   r   r   r   r   r      s    M
 ,1Cr   r   c                 z    [         R                  R                  U S[        R                  (       a  S5      $ S5      $ )Nbinz
gcloud.cmdgcloud)ospathjoinr   r~   )cloudsdk_roots    r   _get_gcloud_binary_pathr      s7    	mU&1&<&<l
L LBJ
L Lr   c                      [         R                  R                  S5      n U (       a  U $ [         R                  R                  S5      nUc  [        R                  " S5      e[        U5      $ )NGCLOUD_BINARY_PATHCLOUDSDK_ROOT_DIRa  Requested to use "gcloud storage" but the gcloud binary path cannot be found. This might happen if you attempt to use gsutil that was not installed via Cloud SDK. You can manually set the `CLOUDSDK_ROOT_DIR` environment variable to point to the google-cloud-sdk installation directory to resolve the issue. Alternatively, you can set `use_gcloud_storage=False` to disable running the command using gcloud storage.)r   environgetr   GcloudStorageTranslationErrorr   )gcloud_binary_pathr   s     r   !_get_validated_gcloud_binary_pathr      s_     zz~~&:;**..!45-

1
1	56 6 
!	//r   c                     U R                   " SS5      nU(       aG  U R                   " SS5      nU(       a  SU-   OSnU R                   " SSS5      nSR                  XU5      $ g )	Nre   gs_json_hostgs_json_port: json_api_versionv1zhttps://{}{}/storage/{}r   rq   )r   r   r   portr   s        r   '_get_gcs_json_endpoint_from_boto_configr     sb    M>:,::m^<L!-32Dzz-1CTJ$++L,<> >	r   c                     U R                   " SS5      nU(       a2  U R                   " SS5      nU(       a  SU-   OSnSR                  X5      $ g )Nre   s3_hosts3_portr   r   zhttps://{}{}r   )r   r   r   r   s       r   !_get_s3_endpoint_from_boto_configr     sF    JJ}i0'jj	2G#3=D  //	r   c                    / n[         R                  " [        5      nSnU[        U 5      :  Ga3  X   UR                  ;  a  UR                  X   5        US-  nM<  UR                  X      nU(       d  US-  nOUR                  (       a  X5   R                  XS-      5        US-  nO[        UR                  [        5      (       a!  UR                  UR                  5        US-  nOhXS-      UR                  ;  a"  [        SR                  X   XS-      5      5      eUR                  XS-         nU(       a  UR                  U5        US-  nU[        U 5      :  a  GM3  UR                  5        H  u  pWUR                  [        R                  L a  SR                  U5      nOUR                  [        R                   L a@  SR                  U V	s/ s H"  n	SR                  " U	R#                  SS5      6 PM$     sn	5      nO$[        SR                  UR                  5      5      eUR                  SR                  UR                  U5      5        M     U$ s  sn	f )	Nr   r"      z.Flag value not in translation map for "{}": {},{}={}r   z'Shim cannot handle repeat flag type: {})collectionsdefaultdictlistrn   r   appendr   
isinstancer   str
ValueErrorrq   itemsr    r#   r   r$   split)
argsgcloud_storage_mapgcloud_argsrepeat_flag_dataigcloud_flag_objecttranslated_flag_and_valuevaluescondensed_flag_valuesss
             r   _convert_args_to_gcloud_valuesr   $  s.   + ,,T2!	CIw(111!1fa+44TW=1fa		'	'*11$1u+>1fa	&22C	8	8 +7781fa 
!e.::	:<CC!e&' 	' #5"@"@!e"M	"451fa= 	
CI@ %5$:$:$< %%)<)<<!hhv.		'	'>+>+>	>!hh5;
<V7>>1773?+V
<> @GG

&
&( ) )w~~&8&D&D&;= > %= 
 =s   )I
c                   r    \ rS rSrSrSrS rS rS rS r	SS jr
S	 rSS
 jr SS jrS rS rS rS rSrg)GcloudStorageCommandMixiniY  zProvides gcloud storage translation functionality.

The command.Command class must inherit this class in order to support
converting the gsutil command to it's gcloud storage equivalent.
Nc                 .    S U l         S U l        S U l        g N)"_translated_gcloud_storage_command_translated_env_variables_gcloud_has_active_account)r   s    r   r   "GcloudStorageCommandMixin.__init__b  s    .2D+%)D"&*D#r   c                    [        5       nU R                  c  [        R                  " USSS/[        R                  [        R                  SS9nUR
                  (       a/  [        R                  " SR                  UR                  5      5      eUR                  R                  5       S:g  U l        U R                  R                  SR                  UR                  UR                  5      5        U R                  $ )	z8Returns True if gcloud has an active account configured.r   r   accountzutf-8)stdoutstderrencodingzJError occurred while trying to retrieve gcloud's active account. Error: {}r   zHResult for "gcloud config get account" command:
 STDOUT: {}.
 STDERR: {})r   r   
subprocessrunPIPE
returncoder   r   rq   r   r   striploggerdebug)r   gcloud_pathprocesss      r   gcloud_has_active_account3GcloudStorageCommandMixin.gcloud_has_active_accountg  s    35K&&.XuiH&0oo&0oo(/1g 
		55/1 	1
 )0(<(<(>"(Dd%
kk 44:F#NNGNN5<= ***r   c                 V   Uc/  [         R                  " SR                  U R                  5      5      e/ n[	        UR
                  [        5      (       a  UR                  UR
                  5        O[	        UR
                  [        5      (       az  UR                  (       a$  [        SR                  U R                  5      5      eUS   nU R                  USS  SS9u  pU R                  XUR
                  R                  U5      5      $ [        SR                  U R                  5      5      eU(       ai  U Hc  u  pxXsR                  ;  a%  [         R                  " SR                  U5      5      eUR                  U5        US	:w  d  MR  UR                  U5        Me     [        XB-   U5      $ )
Nz_Command "{}" cannot be translated to gcloud storage because the translation mapping is missing.zcFlags mapping should not be present at the top-level command if a sub-command is used. Command: {}.r   r"   F)r   should_update_sub_opts_and_argsz(Incorrect mapping found for "{}" commandz:Command option "{}" cannot be translated to gcloud storager   )r   r   rq   command_namer   r   r   extenddictr   r   ParseSubOpts_get_gcloud_storage_argsr   r   r   )	r   sub_optsgsutil_argsr   r   sub_commandparsed_argsoptionvalues	            r   r   2GcloudStorageCommandMixin._get_gcloud_storage_args{  s   !33--3VD4E4E-FH H D$33T::
kk$334	&55t	<	<
 
	$	$228&9J9J2KM 	M  Nk"//12 0 Gh**


+
+
/
/
<> > AHH


   #-&44477  &v0 0 ++f
b[ KK $ *$*<*<> >r   c                    / nSSS.nU R                   S:  a  UR                  SS/5        U R                   S:X  a  UR                  S5        U R                  (       a  UR                  S	5        U R                  (       a  UR                  S
U R                  -   5        U R
                  (       a  UR                  SU R
                  -   5        [        R                  (       a"  UR                  S[        R                  -   5        U R                  S:H  =(       a@    [        R                  " SS5      S:H  =(       a    [        R                  " SS5      S:H  (       + nU R                  (       d  U(       d
  SUS'   SUS'   X4$ )a  Translates gsutil's top level flags.

Gsutil specifies the headers (-h) and boto config (-o) as top level flags
as well, but we handle those separately.

Returns:
  A tuple. The first item is a list of top level flags that can be appended
    to the gcloud storage command. The second item is a dict of environment
    variables that can be set for the gcloud storage command execution.
gsutil_shimTrue)CLOUDSDK_METRICS_ENVIRONMENT#CLOUDSDK_STORAGE_RUN_BY_GSUTIL_SHIM   z--verbosityr      z
--log-httpz--no-user-output-enabledz--billing-project=z--trace-token=z--impersonate-service-account=r'   rg   parallel_process_count1thread_process_countCLOUDSDK_STORAGE_THREAD_COUNTCLOUDSDK_STORAGE_PROCESS_COUNT)r   r   r   
quiet_modeuser_projecttrace_tokenr   IMPERSONATE_SERVICE_ACCOUNTr   r   r   parallel_operations)r   top_level_flagsenv_variablesshould_use_rsync_overrides       r   _translate_top_level_flags4GcloudStorageCommandMixin._translate_top_level_flags  sM    O(5/5M zzQmW56zzQ\*781D4E4EEF-0@0@@A,,=&BBC D !% 1 1W < !=

856#= 	<

834;B= $$(A7:m348;m45))r   c                 Z   / nUb  UOU R                   n/ nUR                  5        H  u  pgUR                  5       nUS:X  a  M  [        XgUS9n	U R                  [
        ;   a  U	(       a  UR                  U	5        O/U R                  [        ;   a  U[        ;   a  UR                  U	5        U	(       a  M  U R                  R                  SR                  UU5      5        UR                  SR                  Xg5      5        M     U(       a#  UR                  SSR                  U5      -   5        U$ )aK  Translates gsutil headers to equivalent gcloud storage flags.

Args:
  headers (dict|None): If absent, extracts headers from command instance.
  unset (bool): Yield metadata clear flags instead of setter flags.

Returns:
  List[str]: Translated flags for gcloud.

Raises:
  GcloudStorageTranslationError: Could not translate flag.
zx-goog-api-version)rt   zzHeader {}:{} cannot be translated to a gcloud storage equivalent flag. It is being treated as an arbitrary request header.r   z--additional-headers=r   )headersr   rl   rz   r   COMMANDS_SUPPORTING_ALL_HEADERSr   $PRECONDITONS_ONLY_SUPPORTED_COMMANDSrm   r   warnrq   r   )
r   r  rt   flagsheaders_to_translateadditional_headersrr   rs   ru   flags
             r   _translate_headers,GcloudStorageCommandMixin._translate_headers  s    E&-&97t||(<(B(B(D$+113	!5	5!.eLd			=	=
,,t
!EE $99TT ,,2F>3?-A	B 	!!'.."NO# )E$ ll*SXX6H-IIJLr   c                    / n0 n[        [        5      nU(       a  X2S'   [        [        5      nU(       a  XBS'   / n[        R                  " 5        GH  u  pgUR                  5        GHn  u  pUS:X  a*  U R                  [
        ;   a  UR                  SU	-   5        M6  [        R                  U5      (       a'  U R                  [
        ;   a  UR                  U	5        Mw  US:X  a*  U R                  [        ;   a  UR                  SU	-   5        M  U[        ;   a,  U R                  R                  SR                  Xh5      5        M  US:X  a  U	(       d  S	US
'   M  US;   aG  [        R                  " 5       (       d-  U R                  R!                  SR                  Xh5      5        GM>  ["        R%                  U0 5      R%                  US5      n
U
c  GMj  XU
'   GMq     GM     U(       a#  UR                  SSR'                  U5      -   5        X4$ )zTranslates boto config options to gcloud storage properties.

Returns:
  A tuple where first element is a list of flags and the second element is
  a dict representing the env variables that can be set to set the
  gcloud storage properties.
'CLOUDSDK_API_ENDPOINT_OVERRIDES_STORAGE CLOUDSDK_STORAGE_S3_ENDPOINT_URLencryption_keyz--encryption-key=content_languagez--content-language=zNThe boto config field {}:{} cannot be translated to gcloud storage equivalent.https_validate_certificatesT$CLOUDSDK_AUTH_DISABLE_SSL_VALIDATION)r8   r9   zxThe boto config field {}:{} skipped translation to the gcloud storage equivalent as it would have been unused in gsutil.Nz--decryption-keys=r   )r   r   r   r   r   ENCRYPTION_SUPPORTED_COMMANDSr   DECRYPTION_KEY_REGEXmatchr  '_REQUIRED_BOTO_CONFIG_NOT_YET_SUPPORTEDr   errorrq   r   UsingGsHmacr   _BOTO_CONFIG_MAPr   r   )r   r  env_varsgcs_json_endpoints3_endpointdecryption_keyssection_namesectionkeyr   env_vars              r   _translate_boto_config0GcloudStorageCommandMixin._translate_boto_config  s    EH?G<M893F;K5@12O!'*###!>>
,,*U2
3 #((--#@@

 
 
'''#BB
,,,u4
5;;
++

 ==CV ,>34 11%=A(9
:AA''))
++

 ;;A6 ,<34
 %((r:>>sDI'  %W9 ( "0< ll'#((?*CCD?r   c                 v    U R                  U R                  U R                  U=(       d    U R                  5      $ )a  Translates the gsutil command flags to gcloud storage flags.

It uses the command_spec.gcloud_storage_map field that provides the
translation mapping for all the flags.

Args:
  gcloud_storage_map (GcloudStorageMap|None): Command surface may pass a
    custom translation map instead of using the default class constant.
    Useful for when translations change based on conditional logic.


Returns:
  A list of all the options and arguments that can be used with the
    equivalent gcloud storage command.
Raises:
  GcloudStorageTranslationError: If a flag or command cannot be translated.
  ValueError: If there is any issue with the mapping provided by
    GcloudStorageMap.
)r   r   r   r   )r   r   s     r   get_gcloud_storage_args1GcloudStorageCommandMixin.get_gcloud_storage_args*  s4    ( ((tyy"4"O8O8OQ Qr   c                    U(       a  U R                   R                  OU R                   R                  nU" SR                  SR	                  U5      5      5        U(       a+  U" S5        UR                  5        H  u  pVU" SXV5        M     g g )NzGcloud Storage Command: {} z)Environment variables for Gcloud Storage:z%s=%s)r   infor   rq   r   r   )r   r   r  r   logger_funckvs          r   "_print_gcloud_storage_command_info<GcloudStorageCommandMixin._print_gcloud_storage_command_infoA  sn     '.$++""4;;3D3DK,33CHH^4LMN=>%%'$!GQ" ( r   c                     U R                  5       u  p#U R                  5       nU R                  5       u  pVUR                  U5        [	        5       nU/U-   U-   U-   U-   nX84$ r   )r  r  r+  updater   )	r   r   r  r  header_flagsflags_from_botoenv_vars_from_botor   gcloud_storage_commands	            r   ._get_full_gcloud_storage_execution_informationHGcloudStorageCommandMixin._get_full_gcloud_storage_execution_informationL  sv    %)%D%D%F"O**,L*.*E*E*G'O+,:<12T9OK*+-<=00r   c                    U R                   S:X  d  U R                   S:X  a  g[        R                  " SSS5      n [        [        R                  " SSS5      5      nU(       Ga8   U R                  U R                  5       5      u  pEU R                  5       (       d  S
US'   U[        R                  :X  a  U R                  UUSS9  g[         R"                  R	                  S5      (       d-  [        R$                  " SR                  ['        5       5      5      e[(        R*                  " 5       (       aL  [,        R.                  U R0                  R2                  ;  a$  [        SR                  U R                   5      5      eU R                  UU5        XPl        X@l        gg! [
         aY    [        R                  " SR                  S	R                  [         Vs/ s H  o3R                  PM     Os  snf sn5      5      5      ef = f! [        R$                   aP  nU[        R8                  :X  a  [        R                  " U5      eU R:                  R=                  SU5         SnAgSnAff = f)a@  Translates the gsutil command to gcloud storage equivalent.

The translated commands get stored at
self._translated_gcloud_storage_command.
This command also translate the boto config, which gets stored as a dict
at self._translated_env_variables

Returns:
  True if the command was successfully translated, else False.
versiontestFrg   use_gcloud_storagehidden_shim_moder   zYInvalid option specified for GSUtil:hidden_shim_mode config setting. Should be one of: {}z | r   !CLOUDSDK_AUTH_DISABLE_CREDENTIALST)r   (CLOUDSDK_CORE_PASS_CREDENTIALS_TO_GSUTILzRequested to use "gcloud storage" but gsutil is not using the same credentials as gcloud. You can make gsutil use the same credentials by running:
{} config set pass_credentials_to_gsutil TruezRequested to use "gcloud storage" with Cloud Storage XML API HMAC credentials but the "{}" command can only be used with the Cloud Storage JSON API.zYCannot translate gsutil command to gcloud storage. Going to run gsutil command. Error: %sN)r   r   getboolr   r   r   r   r
   rq   r   r   r>  r.  r   r   r6  r   r   r   r   r   r!  r	   XMLcommand_specgs_api_supportr   r   r   r   r   )r   rC  rD  xr  r=  es          r   (translate_to_gcloud_storage_if_requestedBGcloudStorageCommandMixin.translate_to_gcloud_storage_if_requestedY  s;    I%):):f)D 2FNC)
**X16
:< %:040c0c((*1,---//?E-;
</777

1
12H2?:> 2 @> 9  JKK77> ?Ef35?7	8 8 ##%%ooT%6%6%E%EE 228&9J9J2KM M
 
1
12H2?A4J
1+8
( Y  C&&J
&.>?.>WW.>?@
AC CCF 44 : /;;;**1-
-678	: 	: :s8   !F %A H CH 8H G+*H I'AI""I'c                 x    [         R                  R                  5       nUR                  U R                  5        U$ r   )r   r   copyr9  r   )r   subprocess_envss     r   '_get_shim_command_environment_variablesAGcloudStorageCommandMixin._get_shim_command_environment_variables  s,    jjoo'O499:r   c                 t    [         R                  " U R                  U R                  5       S9nUR                  $ )N)env)r   r   r   rR  r   )r   r   s     r   run_gcloud_storage,GcloudStorageCommandMixin.run_gcloud_storage  s1    nnTDD!%!M!M!OQGr   )r   r   r   r   r   r   )r   r   r   r   r   r   r   r   r   r  r  r+  r.  r6  r>  rM  rR  rV  r   r   r   r   r   r   Y  sW     +
+()>V%*N%N4lQ4 27	#1BH
r   r   r   )0r   
__future__r   r   r   r   r   enumr   rer   botor   gslibr   gslib.cs_api_mapr	   gslib.exceptionr
   gslib.utilsr   r   r   Enumr   r    compiler  	frozensetr  r  r  rp   rm   r"  r  rz   r   r   objectr   r   r   r   r   r   r   r   r   r   r   <module>rd     s   J & %  '   	 	    ( , ! ! #tyy TYY 
 zz"MN  #,,L"M  ?)/C1 !1 '0-(/ $! #   " #    #37; *++//+; D>5 ,#3,B24" /6&?8	S/ b +4 +,+. '7tC C,Cv C.L
0*2jL Lr   