
    k                        d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 dd	lmZ d
ZddiZddddddddddddddZdddddd d!d"d#d$d%d&d'd(Z G d) d*e      Z G d+ d,e      Z G d- d.e      Z G d/ d0e      Z G d1 d2e      Z G d3 d4e      Z G d5 d6e      Z G d7 d8e      Z G d9 d:e      Z G d; d<e      Zd= Zd> Z	 	 	 	 	 	 	 dBd@Z	 	 	 	 	 	 	 dBdAZy?)CaG  Utils for generating API-specific RequestConfig objects.

RequestConfig is provider neutral and should be subclassed into a
provider-specific class (e.g. GcsRequestConfig) by the factory method.

RequestConfig can hold a BucketConfig or ObjectConfig. These classes also
have provider-specific subclasses (e.g. S3ObjectConfig).
    )absolute_import)division)unicode_literals)encryption_util)errors)storage_url)log)debug_outputzapplication/octet-streamgzip_settingszGzip Transformsz(Setting Autoclass Terminal Storage ClasszSetting Default Object ACLzEnabling AutoclasszEnabling Hierarchical NamespacezSetting IP FilterzSetting Predefined Default ACLzPublic Access Preventionz Setting Recovery Point ObjectivezSetting Retention PeriodzLocking Retention PeriodzSetting Custom ContextszRemoving Custom ContextszUpdating Custom Contexts) autoclass_terminal_storage_classdefault_object_acl_fileenable_autoclassenable_hierarchical_namespaceip_filter_file_pathpredefined_default_object_aclpublic_access_preventionrecovery_point_objectiveretention_periodretention_period_to_be_lockedcustom_contexts_to_setcustom_contexts_to_removecustom_contexts_to_updatezSetting Custom TimezSetting Default Encryption Keyz Setting Default Event Based HoldzSetting Default Storage ClasszEnabling Object RetentionzSetting Event-Based Holdsz Setting Dual-Region for a BucketzPreserving ACLszSetting Time to Retain UntilzSetting Retention ModezSetting Soft Delete PolicieszSetting Temporary Holdsz#Setting Uniform Bucket Level Access)custom_timedefault_encryption_keydefault_event_based_holddefault_storage_classenable_per_object_retentionevent_based_hold	placementpreserve_aclretain_untilretention_modesoft_delete_durationtemporary_holduniform_bucket_level_accessc                   *    e Zd ZdZ	 	 	 ddZd Zd Zy)_ResourceConfiga  Holder for generic resource fields.

  Attributes:
    acl_file_path (None|str): Path to file with ACL settings.
    acl_grants_to_add (None|list[dict]): Contains API representations of ACL.
      For GCS, this looks like `{ 'entity': ENTITY, 'role': GRANT }`.
    acl_grants_to_remove: (None|list[str]): Identifier of entity to remove
      access for. Can be user, group, project, or keyword like "All".
  Nc                 .    || _         || _        || _        y)z-Initializes class, binding flag values to it.N)acl_file_pathacl_grants_to_addacl_grants_to_remove)selfr)   r*   r+   s       <lib/googlecloudsdk/api_lib/storage/request_config_factory.py__init__z_ResourceConfig.__init__W   s    
 'D.D 4D    c                     t        |t        |             st        S | j                  |j                  k(  xr4 | j                  |j                  k(  xr | j
                  |j
                  k(  S N)
isinstancetypeNotImplementedr)   r*   r+   r,   others     r-   __eq__z_ResourceConfig.__eq__`   sd    eT$Z(%"5"55 D""e&=&==D%%)C)CCEr/   c                 ,    t        j                  |       S r1   r
   generic_reprr,   s    r-   __repr__z_ResourceConfig.__repr__g       $$T**r/   )NNN__name__
__module____qualname____doc__r.   r7   r<    r/   r-   r'   r'   L   s"     "!%$(5E+r/   r'   c                   L     e Zd ZdZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d fd	Z fdZ xZS )_BucketConfiga	  Holder for generic bucket fields.

  More attributes may exist on parent class.

  Attributes:
    cors_file_path (None|str): Path to file with CORS settings.
    labels_file_path (None|str): Path to file with labels settings.
    labels_to_append (None|Dict): Labels to add to a bucket.
    labels_to_remove (None|List[str]): Labels to remove from a bucket.
    lifecycle_file_path (None|str): Path to file with lifecycle settings.
    location (str|None): Location of bucket.
    log_bucket (str|None): Destination bucket for current bucket's logs.
    log_object_prefix (str|None): Prefix for objects containing logs.
    requester_pays (bool|None): If set requester pays all costs related to
      accessing the bucket and its objects.
    versioning (None|bool): Whether to turn on object versioning in a bucket.
    web_error_page (None|str): Error page address if bucket is being used
      to host a website.
    web_main_page_suffix (None|str): Suffix of main page address if bucket is
      being used to host a website.
  c                     t         t        |   |||       |	| _        || _        || _        || _        || _        || _        |
| _	        || _
        || _        || _        || _        || _        y r1   )superrE   r.   locationcors_file_pathlabels_file_pathlabels_to_appendlabels_to_removelifecycle_file_path
log_bucketlog_object_prefixrequester_pays
versioningweb_error_pageweb_main_page_suffix)r,   r)   r*   r+   rI   rJ   rK   rL   rM   rH   rN   rO   rP   rQ   rR   rS   	__class__s                   r-   r.   z_BucketConfig.__init__   sy      
-'7H(<>DM(D,D,D,D2D DO.D(D DO(D 4Dr/   c                    t        |t        |             st        S t        t        |   |      xrD | j                  |j                  k(  xr( | j                  |j                  k(  xr | j                  |j                  k(  xr | j                  |j                  k(  xr | j                  |j                  k(  xr | j                  |j                  k(  xr | j                  |j                  k(  xr | j                  |j                  k(  xrj | j                  |j                  k(  xrO | j                  |j                  k(  xr4 | j                   |j                   k(  xr | j"                  |j"                  k(  S r1   )r2   r3   r4   rG   rE   r7   rI   rJ   rK   rL   rM   rH   rN   rO   rP   rQ   rR   rS   r,   r6   rT   s     r-   r7   z_BucketConfig.__eq__   sp   eT$Z(--e4 D5#7#77D!!U%;%;;D !!U%;%;;D !!U%;%;;	D
 $$(A(AAD MMU^^+D OOu///D ""e&=&==D 5#7#77D OOu///D 5#7#77D %%)C)CCEr/   )NNNNNNNNNNNNNNNr?   r@   rA   rB   r.   r7   __classcell__rT   s   @r-   rE   rE   k   sH    . "!%$(" $ $ $#'!%""$(5>E Er/   rE   c                   p     e Zd ZdZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d fd	Z fdZ xZS )_GcsBucketConfiga1  Holder for GCS-specific bucket fields.

  See superclass for remaining attributes.

  Subclass Attributes:
    autoclass_terminal_storage_class (str|None): The storage class that
      objects in the bucket eventually transition to if they are not '
      read for a certain length of time.
    default_encryption_key (str|None): A key used to encrypt objects
      added to the bucket.
    default_event_based_hold (bool|None): Determines if event-based holds will
      automatically be applied to new objects in bucket.
    default_object_acl_file_path (str|None): File path to default object ACL
      file.
    default_object_acl_grants_to_add (list[dict]|None): Add default object ACL
      grants to an entity for objects in the bucket.
    default_object_acl_grants_to_remove (list[str]|None): Remove default object
      ACL grants.
    default_storage_class (str|None): Storage class assigned to objects in the
      bucket by default.
    enable_autoclass (bool|None): Enable, disable, or don't do anything to the
      autoclass feature. Autoclass automatically changes object storage class
      based on usage.
    enable_per_object_retention (bool|None): Enable the object retention for the
      bucket.
    enable_hierarchical_namespace (bool|None): Enable heirarchical namespace
    during bucket creation.
    placement (list|None): Dual-region of bucket.
    public_access_prevention (bool|None): Blocks public access to bucket.
      See docs for specifics:
      https://cloud.google.com/storage/docs/public-access-prevention
    recovery_point_objective (str|None): Specifies the replication setting for
      dual-region and multi-region buckets.
    retention_period (int|None): Minimum retention period in seconds for objects
      in a bucket. Attempts to delete an object earlier will be denied.
    soft_delete_duration (int|None): Number of seconds objects are preserved and
      restorable after deletion in a bucket with soft delete enabled.
    uniform_bucket_level_access (bool|None):
      Determines if the IAM policies will apply to every object in bucket.
  c"                 R   t         t        |   |||||||||||||| |!       || _        || _        || _        || _        |	| _        |
| _        || _	        || _
        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        y r1   )rG   r[   r.   r   r   r   default_object_acl_file_path default_object_acl_grants_to_add#default_object_acl_grants_to_remover   r   r   r   r   r   r   r   rP   r   r   r#   r%   )#r,   r)   r*   r+   r   rI   r   r   r]   r^   r_   r   r   r   r   r   rJ   rK   rL   rM   rH   rN   rO   r   r   r   rP   r   r   r#   r%   rQ   rR   rS   rT   s#                                     r-   r.   z_GcsBucketConfig.__init__   s    H 

D*" -MD)"8D$<D!(DD%,LD)+ 	, "7D,D'BD$)FD&2DDN$<D!$<D!(D,D)FD& 4D'BD$r/   c                 >   t        |t        |             st        S t        t        |   |      xr | j                  |j                  k(  xr | j                  |j                  k(  xr | j                  |j                  k(  xr | j                  |j                  k(  xr| | j                  |j                  k(  xr` | j                  |j                  k(  xrD | j                  |j                  k(  xr( | j                  |j                  k(  xr | j                  |j                  k(  xr | j                  |j                  k(  xr | j                   |j                   k(  xr | j"                  |j"                  k(  xr | j$                  |j$                  k(  xr | j&                  |j&                  k(  xrj | j(                  |j(                  k(  xrO | j*                  |j*                  k(  xr4 | j,                  |j,                  k(  xr | j.                  |j.                  k(  S r1   )r2   r3   r4   rG   r[   r7   r   r   r   r^   r_   r   r   r   r   r   r   r   r   rP   r   r   r#   r%   rV   s     r-   r7   z_GcsBucketConfig.__eq__(  s!   eT$Z(,U3 	-11112	- ''5+G+GG	- ))U-K-KK		-
 11112	- 44445	- &&%*E*EE	- !!U%;%;;	- ,,,,-	- ..../	- $$(A(AA	-  NNeoo-!	-" ))U-K-KK#	-$ ))U-K-KK%	-& 5#7#77'	-( !!U%;%;;)	-* ..../+	-. %%)C)CC/	-0 ,,,,-3r/   )!NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNrW   rY   s   @r-   r[   r[      s    'V '+!##''+*. "&$(##$("&EICV r/   r[   c                       e Zd ZdZy)_S3BucketConfigzHolder for S3-specific bucket fields.

  See superclass for attributes.
  We currently don't support any S3-only fields. This class exists to maintain
  the provider-specific subclass pattern used by the request config factory.
  Nr?   r@   rA   rB   rC   r/   r-   rb   rb   I  s    r/   rb   c                   V     e Zd ZdZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d fd	Z fdZ xZS )_ObjectConfiga  Holder for storage object settings shared between cloud providers.

  Superclass and provider-specific subclasses may add more attributes.

  Attributes:
    cache_control (str|None): Influences how backend caches requests and
      responses.
    content_disposition (str|None): Information on how content should be
      displayed.
    content_encoding (str|None): How content is encoded (e.g. "gzip").
    content_language (str|None): Content's language (e.g. "en" = "English).
    content_type (str|None): Type of data contained in content (e.g.
      "text/html").
    custom_contexts_to_set (dict|None): Custom contexts fields set by user.
    custom_contexts_to_remove (dict|None): Custom contexts fields to be removed
      by user.
    custom_contexts_to_update (dict|None): Custom contexts field to be added or
      changed by user.
    custom_fields_to_set (dict|None): Custom metadata fields set by user.
    custom_fields_to_remove (dict|None): Custom metadata fields to be removed.
    custom_fields_to_update (dict|None): Custom metadata fields to be added or
      changed.
    decryption_key (encryption_util.EncryptionKey): The key that should be used
      to decrypt information in GCS.
    encryption_key (encryption_util.EncryptionKey|None|CLEAR): The key that
      should be used to encrypt information in GCS or clear encryptions (the
      string user_request_args_factory.CLEAR).
    md5_hash (str|None): MD5 digest to use for validation.
    preserve_acl (bool): Whether or not to preserve existing ACLs on an object
      during a copy or other operation.
    size (int|None): Object size in bytes.
    storage_class (str|None): Storage class for cloud object. If None, will use
      bucket's default.
  c                    t         t        |   |||       || _        || _        || _        || _        || _        |	| _        |
| _	        || _
        || _        || _        || _        || _        || _        || _        || _        || _        || _        y r1   )rG   re   r.   cache_controlcontent_dispositioncontent_encodingcontent_languagecontent_typer   r   r   custom_fields_to_setcustom_fields_to_removecustom_fields_to_updatedecryption_keyencryption_keymd5_hashr    sizestorage_class)r,   r)   r*   r+   rg   rh   ri   rj   rk   r   r   r   rl   rm   rn   ro   rp   rq   r    rr   rs   rT   s                        r-   r.   z_ObjectConfig.__init__v  s    . 
-'(*> 'D2D,D,D$D"8D%>D"%>D" 4D#:D #:D (D(DDM$DDI&Dr/   c                    t        |t        |             st        S t        t        |   |      xr | j                  |j                  k(  xr | j                  |j                  k(  xr | j                  |j                  k(  xr| | j                  |j                  k(  xr` | j                  |j                  k(  xrD | j                  |j                  k(  xr( | j                  |j                  k(  xr | j                  |j                  k(  xr | j                  |j                  k(  xr | j                  |j                  k(  xr | j                   |j                   k(  xr | j"                  |j"                  k(  xr | j$                  |j$                  k(  xrj | j&                  |j&                  k(  xrO | j(                  |j(                  k(  xr4 | j*                  |j*                  k(  xr | j,                  |j,                  k(  S r1   )r2   r3   r4   rG   re   r7   rg   rh   ri   rj   rk   r   r   r   rl   rm   rn   ro   rp   rq   rr   r    rs   rV   s     r-   r7   z_ObjectConfig.__eq__  s   eT$Z(mT)%0 	6%"5"55	6$$(A(AA	6 !!U%;%;;	6 !!U%;%;;		6
 !3!33	6 ''5+G+GG	6 **e.M.MM	6 **e.M.MM	6 %%)C)CC	6 ((E,I,II	6 ((E,I,II	6 5#7#77	6 5#7#77	6 MMU^^+	6 II#	6  !3!33!	6" %"5"55%r/   )NNNNNNNNNNNNNNNNNNNNrW   rY   s   @r-   re   re   R  sW    !J ! $ $""+*'X r/   re   c                   \     e Zd ZdZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d fd	Z fdZ xZS )_GcsObjectConfigag  Arguments object for requests with custom GCS parameters.

  See superclass for additional attributes.

  Attributes:
    event_based_hold (bool|None): An event-based hold should be placed on an
      object.
    custom_time (datetime|None): Custom time user can set.
    retain_until (datetime|None): Time to retain the object until.
    retention_mode (flags.RetentionMode|None|CLEAR): The key that should
      be used to set the retention mode policy in GCS or clear retention (the
      string user_request_args_factory.CLEAR).
    temporary_hold (bool|None): A temporary hold should be placed on an object.
  c                     t         t        |   |||||||||	|
||||||||       || _        || _        || _        || _        || _        y )N)r)   r*   r+   rg   rh   ri   rj   rk   r   r   r   rl   rm   rn   ro   rp   rq   rr   )rG   rv   r.   r   r   r!   r"   r$   )r,   r)   r*   r+   rg   rh   ri   rj   rk   r   r   r   rl   rm   rn   r   ro   rp   r   rq   r!   r"   rr   r$   rT   s                           r-   r.   z_GcsObjectConfig.__init__  sz    4 

D*#+1#/))!5";";1 7 7%%% + & #D,D$D(D(Dr/   c                 n   t        |t        |             st        S t        t        |   |      xr | j                  |j                  k(  xrj | j                  |j                  k(  xrO | j                  |j                  k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S r1   )r2   r3   r4   rG   rv   r7   r   r   r!   r"   r$   rV   s     r-   r7   z_GcsObjectConfig.__eq__  s    eT$Z("D07 8 1 118!!U%;%;;8 !3!338 5#7#77	8
 5#7#779r/   )NNNNNNNNNNNNNNNNNNNNNNNrW   rY   s   @r-   rv   rv     s_    $ ! $ $""11)f9 9r/   rv   c                       e Zd ZdZy)_S3ObjectConfigzBWe currently do not support any S3-specific object configurations.Nrc   rC   r/   r-   rz   rz   
  s    Jr/   rz   c                   .    e Zd ZdZ	 	 	 	 	 ddZd Zd Zy)_RequestConfiga<  Holder for parameters shared between cloud providers.

  Provider-specific subclasses may add more attributes.

  Attributes:
    predefined_acl_string (str|None): ACL to set on resource.
    predefined_default_object_acl_string (str|None): Default ACL to set on
      resources.
    preserve_posix (bool|None): Whether to apply source POSIX metadata to
      destination.
    preserve_symlinks (bool|None): Whether symlinks should be preserved rather
      than followed.
    resource_args (_BucketConfig|_ObjectConfig|None): Holds settings for a cloud
      resource.
  Nc                 J    || _         || _        || _        || _        || _        y r1   )predefined_acl_string$predefined_default_object_acl_stringpreserve_posixpreserve_symlinksresource_args)r,   r~   r   r   r   r   s         r-   r.   z_RequestConfig.__init__  s1     "7D, 	- )D.D&Dr/   c                 B   t        |t        |             st        S | j                  |j                  k(  xrj | j                  |j                  k(  xrO | j
                  |j
                  k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S r1   )r2   r3   r4   r~   r   r   r   r   r5   s     r-   r7   z_RequestConfig.__eq__/  s    eT$Z(""e&A&AA 	655556	6 5#7#77	6 ""e&=&==		6
 %"5"55r/   c                 ,    t        j                  |       S r1   r9   r;   s    r-   r<   z_RequestConfig.__repr__;  r=   r/   )NNNNNr>   rC   r/   r-   r|   r|     s'    $ !+/' 
+r/   r|   c                   >     e Zd ZdZ	 	 	 	 	 	 	 	 d fd	Z fdZ xZS )_GcsRequestConfiga  Holder for GCS-specific API request parameters.

  See superclass for additional attributes.

  Attributes:
    gzip_settings (user_request_args_factory.GzipSettings): Contains settings
      for gzipping uploaded files.
    no_clobber (bool): Do not copy if destination resource already exists.
    override_unlocked_retention (bool|None): Needed as confirmation for some
      changes to object retention policies.
    precondition_generation_match (int|None): Perform request only if generation
      of target object matches the given integer. Ignored for bucket requests.
    precondition_metageneration_match (int|None): Perform request only if
      metageneration of target object/bucket matches the given integer.
  c	                 x    t         t        |   |||       || _        || _        || _        || _        || _        y )N)r~   r   r   )rG   r   r.   r   
no_clobberoverride_unlocked_retentionprecondition_generation_match!precondition_metageneration_match)
r,   r   r   r   r   r   r~   r   r   rT   s
            r-   r.   z_GcsRequestConfig.__init__R  sL     

T+30#	 , %
 'D DO'BD$)FD&-ND*r/   c                 n   t        |t        |             st        S t        t        |   |      xr | j                  |j                  k(  xrj | j                  |j                  k(  xrO | j                  |j                  k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S r1   )r2   r3   r4   rG   r   r7   r   r   r   r   r   rV   s     r-   r7   z_GcsRequestConfig.__eq__h  s    eT$Z(-e4 	3%"5"55	3OOu///	3 ,,,,-	3
 ..../	3 22223
r/   )NNNNNNNNrW   rY   s   @r-   r   r   @  s2    & "&$((, +/O, r/   r   c                       e Zd ZdZy)_S3RequestConfigzHolder for S3-specific API request parameters.

  Currently just meant for use with S3ObjectConfig and S3BucketConfig in
  the parent class "resource_args" field.
  Nrc   rC   r/   r-   r   r   x  s    r/   r   c                 n    g }|D ]$  }t        | |d      |j                  ||          & t        |      S )z@Takes user_args and unsupported_fields and returns feature list.N)getattrappendsorted)	user_argsunsupported_fieldsresultfields       r-   ,_extract_unsupported_features_from_user_argsr     s>    &!ey%&2mm&u-. " 
r/   c                    t        | dd      }|rt        |dd      sd|_        t        | t              t        |t              z   }|r3t        j                  dj                  dj                  |                  t        |t              }|r4t        j                  dj                  dj                  |                   yy)z=Raises error or logs warning if unsupported S3 field present.r   Nr   zFeatures disallowed for S3: {}z, z(Some features do not have S3 support: {})r   r   r   S3_REQUEST_ERROR_FIELDSS3_RESOURCE_ERROR_FIELDSr   ErrorformatjoinS3_RESOURCE_WARNING_FIELDSr	   warning)user_request_argsuser_resource_argserror_fields_presentwarning_fields_presents       r-    _check_for_unsupported_s3_fieldsr     s    0/4H94!A7;423D3JL23E3KMM 
 
,,(//		:N0OP  H46KK:AA		()+ , r/   Nc                    t        | t        j                        syt        |dd      }d}	| j	                         r| j
                  t        j                  v r| j
                  t        j                  j                  k(  r@t               }	|rz|j                  |	_
        |j                  |	_        |j                  |	_        |j                  |	_        |j                  |	_        |j                  |	_        |j                   |	_        |j"                  |	_        |j$                  |	_        |j&                  |	_        |j(                  |	_        |j*                  |	_        |j,                  |	_        |j.                  |	_        |j0                  |	_        |j2                  |	_        |j4                  |	_        |j6                  |	_        nG| j
                  t        j                  j8                  k(  r t;               }	t=        |       n
t?               }	t        |dd      |	_         t        |dd      |	_!        t        |dd      |	_"        t        |dd      |	_#        t        |dd      |	_$        t        |dd      |	_%        t        |d	d      |	_&        t        |d
d      |	_'        t        |dd      |	_(        t        |dd      |	_)        t        |dd      |	_*        t        |dd      |	_+        no| jY                         r^| j
                  t        j                  j                  k(  rbt[               }	|r|j\                  |	_.        |j^                  |	_/        |j`                  |	_0        |jb                  |	_1        |jd                  |	_2        nG| j
                  t        j                  j8                  k(  rtg               }	t=        |       n
ti               }	||	_5        ||	_6        ||	_7        |xs tq        jr                         |	_:        |rtq        jv                  ||r| nd      |	_<        |r8|jj                  )|jj                  r|jj                  |	_5        ntz        |	_5        |jl                  |jl                  |	_6        |j|                  |	_>        |j~                  |	_?        |j                  |	_@        |j                  |	_A        |j                  |	_B        |j                  |	_C        |j                  |	_D        |j                  |	_E        |j                  |	_F        |j                  |	_G        |j                  |	_H        |j                  r|j                  j                         |	_I        |	r5|r3|j                  |	_K        |j                  |	_L        |j                  |	_M        |	S )z@Generates metadata for API calls to storage buckets and objects.Nr   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   )Nr2   r   CloudUrlr   	is_bucketschemeVALID_CLOUD_SCHEMESProviderPrefixGCSr[   r   r   r   r]   r^   r_   r   r   r   r   r   r   r   r   r   r   r#   r%   S3rb   r   rE   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   	is_objectrv   r   r   r!   r"   r$   rz   re   rk   rq   rr   r   get_encryption_keyrp   get_decryption_keyro   DEFAULT_CONTENT_TYPErg   rh   ri   rj   rl   rm   rn   r   r   r   r    rs   upperr)   r*   r+   )
urlrk   decryption_key_hash_sha256rp   error_on_missing_keyrq   rr   r   r   new_resource_argss
             r-   !_get_request_config_resource_argsr     sn    
C--	.0/4H]]_
zz[444	{1155	5,. AA 
< !77 
2 !99 
4 !== 
8 !AA 
< !DD 
? !66 
1 !11 
, !<< 
7 !>> 
9 !44 
/ );(D(D

% 99 
4 !99 
4 !11 
, !>> 
9 !55 
0 !<< 
7 ::33666+-():; (/!();Z!N'.,d(4$)0.*6&)0.*6&)0.*6&,314-9)#*L$$0 *1/+7''./A/?(G$#*L$$0 '.,d(4$-42D.:* }}
zz[//333*,	(:(F(F%-?-P-P*);)H)H&+=+L+L(+=+L+L(	{1144	4)+&'89 (/%1"!)! 	>/<<> $!)8)K)K
$-Act*M& 		(	(	4**+=+J+J

(+?

(		$	$	0%7%@%@"(:(H(H%

0
0 + ,>+N+N(+=+N+N(

1
1 , 
4
4 / 
4
4 / 
3
3 . 
6
6 1 
6
6 1 (:'F'F$		)	) ,,224 	' -&8&F&F#*<*N*N'// * 
r/   c           
         t        | |||||||      }| j                  t        j                  j                  k(  rt        |      }	|r|j                  |	_        |j                  |	_        |j                  r|j                  |	_        |j                  rt        |j                        |	_	        |j                  r[t        |j                        |	_        n@| j                  t        j                  j                  k(  rt        |      }	nt        |      }	t        |dd      |	_        t        |dd      |	_        t        |dd      |	_        t        |dd      |	_        |r|j(                  |	_        |	S d|	_        |	S )zFGenerates API-specific RequestConfig. See output classes for arg info.)r   r]   Nr~   r   r   )r   r   r   r   r   r   r   r   r   r   intr   r   r   r|   r   r]   r~   r   r   r   )
r   rk   r   rp   r   rq   rr   r   r   request_configs
             r-   get_request_configr   L  sw    4	<3^Hd,=?- 	ZZ;--111&]CN%6%D%Dn"

7
7 0 
	%	%$5$@$@!		8	87:;;8=4		<	<;>??<A8
zz[//222%MBN#-@N0771?.-)01B1H$*P.&8??9G.5"))4#. .?)) " 
 EI " 
r/   )NNNTNNN) rB   
__future__r   r   r   "googlecloudsdk.command_lib.storager   r   r   googlecloudsdk.corer	   googlecloudsdk.core.utilr
   r   r   r   r   objectr'   rE   r[   rb   re   rv   rz   r|   r   r   r   r   r   r   rC   r/   r-   <module>r      sl   '  ' > 5 : # 1 2 
 & 
 	3;,%F.%E : B2%?7!;!; $ )> B<#>33%2.:/#H "+f +>EEO EEPS} Slm fO fRL9} L9^Km K.+V .+d5 5p~ ,2 48AE59;?/3+/8<hZ #	/r/   