
    h|                         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	  G d de
          Z G d	 d
e
          Z G d de          Z G d de          Z G d de          ZdS )z%Manage access to objects and buckets.    ) _add_generation_match_parameters)create_trace_span)_DEFAULT_TIMEOUT)DEFAULT_RETRY))DEFAULT_RETRY_IF_METAGENERATION_SPECIFIEDc                   h    e Zd ZdZdZdZdZddZd Zd Z	d	 Z
d
 Zd Zd Zd Zd Zd Zd Zd ZdS )
_ACLEntitya  Class representing a set of roles for an entity.

    This is a helper class that you likely won't ever construct
    outside of using the factor methods on the :class:`ACL` object.

    :type entity_type: str
    :param entity_type: The type of entity (ie, 'group' or 'user').

    :type identifier: str
    :param identifier: (Optional) The ID or e-mail of the entity. For the special
                       entity types (like 'allUsers').
    READERWRITEROWNERNc                 J    || _         t          g           | _        || _        d S N)
identifiersetrolestype)selfentity_typer   s      \/var/www/html/e360mart/e360mart_env/lib/python3.11/site-packages/google/cloud/storage/acl.py__init__z_ACLEntity.__init__*   s!    $WW
			    c                 d    | j         st          | j                  S d                    |           S )Nz{acl.type}-{acl.identifier})acl)r   strr   formatr   s    r   __str__z_ACLEntity.__str__/   s2     	Bty>>!077D7AAAr   c                 D    d|  dd                     | j                   dS )Nz<ACL Entity: z (z, z)>)joinr   r   s    r   __repr__z_ACLEntity.__repr__5   s)    @t@@tyy'<'<@@@@r   c                     | j         S )zGet the list of roles permitted by this entity.

        :rtype: list of strings
        :returns: The list of roles associated with this entity.
        )r   r   s    r   	get_rolesz_ACLEntity.get_roles8   s     zr   c                 :    | j                             |           dS )zoAdd a role to the entity.

        :type role: str
        :param role: The role to add to the entity.
        N)r   addr   roles     r   grantz_ACLEntity.grant@   s     	
tr   c                 P    || j         v r| j                             |           dS dS )zyRemove a role from the entity.

        :type role: str
        :param role: The role to remove from the entity.
        N)r   remover%   s     r   revokez_ACLEntity.revokeH   s5     4:Jd##### r   c                 D    |                      t          j                   dS )z(Grant read access to the current entity.N)r'   r	   READER_ROLEr   s    r   
grant_readz_ACLEntity.grant_readQ       

:)*****r   c                 D    |                      t          j                   dS )z)Grant write access to the current entity.N)r'   r	   WRITER_ROLEr   s    r   grant_writez_ACLEntity.grant_writeU   r.   r   c                 D    |                      t          j                   dS )z)Grant owner access to the current entity.N)r'   r	   
OWNER_ROLEr   s    r   grant_ownerz_ACLEntity.grant_ownerY   s    

:()))))r   c                 D    |                      t          j                   dS )z+Revoke read access from the current entity.N)r*   r	   r,   r   s    r   revoke_readz_ACLEntity.revoke_read]       J*+++++r   c                 D    |                      t          j                   dS )z,Revoke write access from the current entity.N)r*   r	   r0   r   s    r   revoke_writez_ACLEntity.revoke_writea   r7   r   c                 D    |                      t          j                   dS )z,Revoke owner access from the current entity.N)r*   r	   r3   r   s    r   revoke_ownerz_ACLEntity.revoke_ownere   s    J)*****r   r   )__name__
__module____qualname____doc__r,   r0   r3   r   r   r    r"   r'   r*   r-   r1   r4   r6   r9   r;    r   r   r	   r	      s          KKJ       
B B BA A A    $ $ $+ + ++ + +* * *, , ,, , ,+ + + + +r   r	   c                   R   e Zd ZdZdZdZdddddd	d
Z eg d          Z	 dZ	dZ
dZdZd ZefdZed             Zd Zd Zd Zd Zd%dZd Zd%dZd Zd Zd Zd Zd Zd Zed             Z d Z!dee"fd Z#ddddee$fd!Z%ddddddee$fd"Z&dddddee$fd#Z'dddddee$fd$Z(dS )&ACLz7Container class representing a list of access controls.r   predefinedAclprojectPrivate
publicReadpublicReadWriteauthenticatedReadbucketOwnerReadbucketOwnerFullControl)zproject-privatezpublic-readzpublic-read-writezauthenticated-readzbucket-owner-readzbucket-owner-full-control)privaterD   rE   rF   rG   rH   rI   FNc                     i | _         d S r   )entitiesr   s    r   r   zACL.__init__   s    r   c                 D    | j         s|                     |           dS dS )zLoad if not already loaded.

        :type timeout: float or tuple
        :param timeout:
            (Optional) The amount of time, in seconds, to wait
            for the server response.  See: :ref:`configuring_timeouts`
        )timeoutN)loadedreload)r   rN   s     r   _ensure_loadedzACL._ensure_loaded   s2     { 	)KKK(((((	) 	)r   c                 v    | j                             ||          }|r|| j        vrt          d|           |S )a:  Ensures predefined is in list of predefined json values

        :type predefined: str
        :param predefined: name of a predefined acl

        :type predefined: str
        :param predefined: validated JSON name of predefined acl

        :raises: :exc: `ValueError`: If predefined is not a valid acl
        zInvalid predefined ACL: )PREDEFINED_XML_ACLSgetPREDEFINED_JSON_ACLS
ValueError)cls
predefineds     r   validate_predefinedzACL.validate_predefined   sO     ,00ZHH
 	F*C,DDDD
DDEEEr   c                 F    | j                                          d| _        dS )z@Remove all entities from the ACL, and clear the ``loaded`` flag.FN)rL   clearrO   r   s    r   resetz	ACL.reset   s!    r   c              #      K   |                                   | j                                        D ]/}|                                D ]}|rt	          |          |dV  0d S )N)entityr&   )rQ   rL   valuesr"   r   )r   r^   r&   s      r   __iter__zACL.__iter__   s      m**,, 	@ 	@F((** @ @ @%([[$?????@	@ 	@r   c                 r   |d         }|d         }|dk    r|                                  }nO|dk    r|                                 }n4d|v r0|                    dd          \  }}|                     ||          }t	          |t
                    st          d|           |                    |           |S )	a  Build an _ACLEntity object from a dictionary of data.

        An entity is a mutable object that represents a list of roles
        belonging to either a user or group or the special types for all
        users and all authenticated users.

        :type entity_dict: dict
        :param entity_dict: Dictionary full of data from an ACL lookup.

        :rtype: :class:`_ACLEntity`
        :returns: An Entity constructed from the dictionary.
        r^   r&   allUsersallAuthenticatedUsers-   r   r   zInvalid dictionary: )allall_authenticatedsplitr^   
isinstancer	   rV   r'   )r   entity_dictr^   r&   r   r   s         r   entity_from_dictzACL.entity_from_dict   s     X&6"ZXXZZFF...++--FFF]]&,ll3&:&:#K[[[Z[PPF&*-- 	CAKAABBBTr   c                 V    |                                   t          |          | j        v S )a  Returns whether or not this ACL has any entries for an entity.

        :type entity: :class:`_ACLEntity`
        :param entity: The entity to check for existence in this ACL.

        :rtype: bool
        :returns: True of the entity exists in the ACL.
        )rQ   r   rL   r   r^   s     r   
has_entityzACL.has_entity   s)     	6{{dm++r   c                 z    |                                   | j                            t          |          |          S )a  Gets an entity object from the ACL.

        :type entity: :class:`_ACLEntity` or string
        :param entity: The entity to get lookup in the ACL.

        :type default: anything
        :param default: This value will be returned if the entity
                        doesn't exist.

        :rtype: :class:`_ACLEntity`
        :returns: The corresponding entity or the value provided
                  to ``default``.
        )rQ   rL   rT   r   )r   r^   defaults      r   
get_entityzACL.get_entity   s4     	}  Vg666r   c                 \    |                                   || j        t          |          <   dS )zAdd an entity to the ACL.

        :type entity: :class:`_ACLEntity`
        :param entity: The entity to add to this ACL.
        N)rQ   rL   r   rn   s     r   
add_entityzACL.add_entity   s.     	%+c&kk"""r   c                     t          ||          }|                     |          r|                     |          }n|                     |           |S )a  Factory method for creating an Entity.

        If an entity with the same type and identifier already exists,
        this will return a reference to that entity.  If not, it will
        create a new one and add it to the list of known entities for
        this ACL.

        :type entity_type: str
        :param entity_type: The type of entity to create
                            (ie, ``user``, ``group``, etc)

        :type identifier: str
        :param identifier: The ID of the entity (if applicable).
                           This can be either an ID or an e-mail address.

        :rtype: :class:`_ACLEntity`
        :returns: A new Entity or a reference to an existing identical entity.
        rf   )r	   ro   rr   rt   )r   r   r   r^   s       r   r^   z
ACL.entity  sT    & 
KKK??6"" 	$__V,,FFOOF###r   c                 0    |                      d|          S )zFactory method for a user Entity.

        :type identifier: str
        :param identifier: An id or e-mail for this particular user.

        :rtype: :class:`_ACLEntity`
        :returns: An Entity corresponding to this user.
        userr   r^   r   r   s     r   rw   zACL.user  s     {{6j{999r   c                 0    |                      d|          S )zFactory method for a group Entity.

        :type identifier: str
        :param identifier: An id or e-mail for this particular group.

        :rtype: :class:`_ACLEntity`
        :returns: An Entity corresponding to this group.
        grouprx   ry   rz   s     r   r|   z	ACL.group(  s     {{7z{:::r   c                 0    |                      d|          S )zFactory method for a domain Entity.

        :type domain: str
        :param domain: The domain for this entity.

        :rtype: :class:`_ACLEntity`
        :returns: An entity corresponding to this domain.
        domainrx   ry   )r   r~   s     r   r~   z
ACL.domain3  s     {{8{777r   c                 ,    |                      d          S )zFactory method for an Entity representing all users.

        :rtype: :class:`_ACLEntity`
        :returns: An entity representing all users.
        rb   ry   r   s    r   rg   zACL.all>  s     {{:&&&r   c                 ,    |                      d          S )zFactory method for an Entity representing all authenticated users.

        :rtype: :class:`_ACLEntity`
        :returns: An entity representing all authenticated users.
        rc   ry   r   s    r   rh   zACL.all_authenticatedF  s     {{2333r   c                 v    |                                   t          | j                                                  S )zGet a list of all Entity objects.

        :rtype: list of :class:`_ACLEntity` objects
        :returns: A list of all Entity objects.
        )rQ   listrL   r_   r   s    r   get_entitieszACL.get_entitiesN  s2     	DM((**+++r   c                     t           )z&Abstract getter for the object client.)NotImplementedErrorr   s    r   clientz
ACL.clientW  s
     "!r   c                     || j         }|S )a  Check client or verify over-ride.

        :type client: :class:`~google.cloud.storage.client.Client` or
                      ``NoneType``
        :param client: the client to use.  If not passed, falls back to the
                       ``client`` stored on the current ACL.

        :rtype: :class:`google.cloud.storage.client.Client`
        :returns: The client passed in or the currently bound client.
        )r   )r   r   s     r   _require_clientzACL._require_client\  s     >[Fr   c                    t          d          5  | j        }|                     |          }i }| j        
| j        |d<   | j                                         |                    ||||          }d| _        |                    dd          D ]*}| 	                    | 
                    |                     +	 ddd           dS # 1 swxY w Y   dS )	a  Reload the ACL data from Cloud Storage.

        If :attr:`user_project` is set, bills the API request to that project.

        :type client: :class:`~google.cloud.storage.client.Client` or
                      ``NoneType``
        :param client: (Optional) The client to use.  If not passed, falls back
                       to the ``client`` stored on the ACL's parent.
        :type timeout: float or tuple
        :param timeout:
            (Optional) The amount of time, in seconds, to wait
            for the server response.  See: :ref:`configuring_timeouts`

        :type retry: :class:`~google.api_core.retry.Retry`
        :param retry:
            (Optional) How to retry the RPC. See: :ref:`configuring_retries`
        zStorage.ACL.reloadnameNuserProjectquery_paramsrN   retryTitemsr@   )r   reload_pathr   user_projectrL   r[   _get_resourcerO   rT   rt   rl   )r   r   rN   r   pathr   foundentrys           r   rP   z
ACL.reloadk  s8   $ $8999 	> 	>#D))&11FL ,.2.?]+M!!!(()	 )  E DK7B// > > 5 5e < <====>%	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	>s   B*C		CCc
                    |                      |          }ddi}
|g }||
| j        <   | j        
| j        |
d<   t          |
||||           | j        }|                    || j        t          |          i|
||	          }| j        	                                 |
                    | j        d          D ]*}|                     |                     |                     +d| _        dS )	a  Helper for :meth:`save` and :meth:`save_predefined`.

        :type acl: :class:`google.cloud.storage.acl.ACL`, or a compatible list.
        :param acl: The ACL object to save.  If left blank, this will save
                    current entries.

        :type predefined: str
        :param predefined: An identifier for a predefined ACL.  Must be one of the
            keys in :attr:`PREDEFINED_JSON_ACLS` If passed, `acl` must be None.

        :type client: :class:`~google.cloud.storage.client.Client` or
                      ``NoneType``
        :param client: (Optional) The client to use.  If not passed, falls back
                       to the ``client`` stored on the ACL's parent.

        :type if_generation_match: long
        :param if_generation_match:
            (Optional) See :ref:`using-if-generation-match`

        :type if_generation_not_match: long
        :param if_generation_not_match:
            (Optional) See :ref:`using-if-generation-not-match`

        :type if_metageneration_match: long
        :param if_metageneration_match:
            (Optional) See :ref:`using-if-metageneration-match`

        :type if_metageneration_not_match: long
        :param if_metageneration_not_match:
            (Optional) See :ref:`using-if-metageneration-not-match`

        :type timeout: float or tuple
        :param timeout:
            (Optional) The amount of time, in seconds, to wait
            for the server response.  See: :ref:`configuring_timeouts`

        :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
        :param retry:
            (Optional) How to retry the RPC. See: :ref:`configuring_retries`
        
projectionfullNr   )if_generation_matchif_generation_not_matchif_metageneration_matchif_metageneration_not_matchr   r@   T)r   _PREDEFINED_QUERY_PARAMr   r   	save_path_patch_resource_URL_PATH_ELEMr   rL   r[   rT   rt   rl   rO   )r   r   rX   r   r   r   r   r   rN   r   r   r   resultr   s                 r   _savez	ACL._save  s   h %%f--$f-!C9CL56(*.*;L'( 3$;$;(C	
 	
 	
 	
 ~'' $s)),% ( 
 
 	ZZ 3R88 	: 	:EOOD11%889999r   c	                     t          d          5  |
| }|j        }	nd}	|	r|                     |d|||||||	  	         ddd           dS # 1 swxY w Y   dS )a!  Save this ACL for the current bucket.

        If :attr:`user_project` is set, bills the API request to that project.

        :type acl: :class:`google.cloud.storage.acl.ACL`, or a compatible list.
        :param acl: The ACL object to save.  If left blank, this will save
                    current entries.

        :type client: :class:`~google.cloud.storage.client.Client` or
                      ``NoneType``
        :param client: (Optional) The client to use.  If not passed, falls back
                       to the ``client`` stored on the ACL's parent.

        :type if_generation_match: long
        :param if_generation_match:
            (Optional) See :ref:`using-if-generation-match`

        :type if_generation_not_match: long
        :param if_generation_not_match:
            (Optional) See :ref:`using-if-generation-not-match`

        :type if_metageneration_match: long
        :param if_metageneration_match:
            (Optional) See :ref:`using-if-metageneration-match`

        :type if_metageneration_not_match: long
        :param if_metageneration_not_match:
            (Optional) See :ref:`using-if-metageneration-not-match`

        :type timeout: float or tuple
        :param timeout:
            (Optional) The amount of time, in seconds, to wait
            for the server response.  See: :ref:`configuring_timeouts`

        :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
        :param retry:
            (Optional) How to retry the RPC. See: :ref:`configuring_retries`
        zStorage.ACL.saver   NTr   r   r   r   rN   r   )r   rO   r   )
r   r   r   r   r   r   r   rN   r   save_to_backends
             r   savezACL.save  s    b $6777 	 	{"%*"& 

(;,C,C0K#  
 
 
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   /AAAc	                     t          d          5  |                     |          }|                     d||||||||	  	         ddd           dS # 1 swxY w Y   dS )a  Save this ACL for the current bucket using a predefined ACL.

        If :attr:`user_project` is set, bills the API request to that project.

        :type predefined: str
        :param predefined: An identifier for a predefined ACL.  Must be one
                           of the keys in :attr:`PREDEFINED_JSON_ACLS`
                           or :attr:`PREDEFINED_XML_ACLS` (which will be
                           aliased to the corresponding JSON name).
                           If passed, `acl` must be None.

        :type client: :class:`~google.cloud.storage.client.Client` or
                      ``NoneType``
        :param client: (Optional) The client to use.  If not passed, falls back
                       to the ``client`` stored on the ACL's parent.

        :type if_generation_match: long
        :param if_generation_match:
            (Optional) See :ref:`using-if-generation-match`

        :type if_generation_not_match: long
        :param if_generation_not_match:
            (Optional) See :ref:`using-if-generation-not-match`

        :type if_metageneration_match: long
        :param if_metageneration_match:
            (Optional) See :ref:`using-if-metageneration-match`

        :type if_metageneration_not_match: long
        :param if_metageneration_not_match:
            (Optional) See :ref:`using-if-metageneration-not-match`

        :type timeout: float or tuple
        :param timeout:
            (Optional) The amount of time, in seconds, to wait
            for the server response.  See: :ref:`configuring_timeouts`

        :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
        :param retry:
            (Optional) How to retry the RPC. See: :ref:`configuring_retries`
        zStorage.ACL.savePredefinedr   Nr   )r   rY   r   )	r   rX   r   r   r   r   r   rN   r   s	            r   save_predefinedzACL.save_predefined.  s    h $@AAA 	 	11*==JJJ$7(?(?,G  
 
 
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   4AAAc                     t          d          5  |                     g |||||||           ddd           dS # 1 swxY w Y   dS )I  Remove all ACL entries.

        If :attr:`user_project` is set, bills the API request to that project.

        Note that this won't actually remove *ALL* the rules, but it
        will remove all the non-default rules.  In short, you'll still
        have access to a bucket that you created even after you clear
        ACL rules with this method.

        :type client: :class:`~google.cloud.storage.client.Client` or
                      ``NoneType``
        :param client: (Optional) The client to use.  If not passed, falls back
                       to the ``client`` stored on the ACL's parent.

        :type if_generation_match: long
        :param if_generation_match:
            (Optional) See :ref:`using-if-generation-match`

        :type if_generation_not_match: long
        :param if_generation_not_match:
            (Optional) See :ref:`using-if-generation-not-match`

        :type if_metageneration_match: long
        :param if_metageneration_match:
            (Optional) See :ref:`using-if-metageneration-match`

        :type if_metageneration_not_match: long
        :param if_metageneration_not_match:
            (Optional) See :ref:`using-if-metageneration-not-match`

        :type timeout: float or tuple
        :param timeout:
            (Optional) The amount of time, in seconds, to wait
            for the server response.  See: :ref:`configuring_timeouts`

        :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
        :param retry:
            (Optional) How to retry the RPC. See: :ref:`configuring_retries`
        zStorage.ACL.clearr   r   r   r   r   r   rN   r   N)r   r   )r   r   r   r   r   r   rN   r   s           r   r[   z	ACL.clearp  s    b $7888 
	 
	II$7(?(?,G  	 	 	
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	s   <A A r   ))r<   r=   r>   r?   r   r   rS   	frozensetrU   rO   r   r   r   r   r   rQ   classmethodrY   r\   r`   rl   ro   rr   rt   r^   rw   r|   r~   rg   rh   r   propertyr   r   r   rP   r   r   r   r   r[   r@   r   r   rB   rB   j   s       AAN- ,#.1.%=  %9	
 	
 	

 
 F KIL   &6 	) 	) 	) 	)   [   
@ @ @  @
, 
, 
,7 7 7 7", , ,   4	: 	: 	:	; 	; 	;	8 	8 	8' ' '4 4 4, , , " " X"   !*:- %> %> %> %>X ! $ $$( 7U U U Ur   $ $$( 7C C C CP   $ $$( 7@ @ @ @H   $ $$( 7; ; ; ; ; ;r   rB   c                   z     e Zd ZdZ fdZed             Zed             Zed             Zed             Z	 xZ
S )	BucketACLzAn ACL specifically for a bucket.

    :type bucket: :class:`google.cloud.storage.bucket.Bucket`
    :param bucket: The bucket to which this ACL relates.
    c                 d    t          t          |                                            || _        d S r   )superr   r   bucket)r   r   	__class__s     r   r   zBucketACL.__init__  s*    i'')))r   c                     | j         j        S )z&The client bound to this ACL's bucket.)r   r   r   s    r   r   zBucketACL.client  s     {!!r   c                 .    | j         j         d| j         S )3Compute the path for GET API requests for this ACL./)r   r   r   r   s    r   r   zBucketACL.reload_path  s      +"::T%8:::r   c                     | j         j        S z5Compute the path for PATCH API requests for this ACL.)r   r   r   s    r   r   zBucketACL.save_path  s     {r   c                     | j         j        S z?Compute the user project charged for API requests for this ACL.)r   r   r   s    r   r   zBucketACL.user_project  s     {''r   )r<   r=   r>   r?   r   r   r   r   r   r   __classcell__r   s   @r   r   r     s              " " X" ; ; X;     X  ( ( X( ( ( ( (r   r   c                       e Zd ZdZdZdZdS )DefaultObjectACLz9A class representing the default object ACL for a bucket.defaultObjectAclpredefinedDefaultObjectAclN)r<   r=   r>   r?   r   r   r@   r   r   r   r     s!        CC'N:r   r   c                        e Zd ZdZ fdZed             Zed             Zed             Zed             Z	dddddde
ef fd	Zddddde
ef fd		Zddddde
ef fd
	Z xZS )	ObjectACLzAn ACL specifically for a Cloud Storage object / blob.

    :type blob: :class:`google.cloud.storage.blob.Blob`
    :param blob: The blob that this ACL corresponds to.
    c                 d    t          t          |                                            || _        d S r   )r   r   r   blob)r   r   r   s     r   r   zObjectACL.__init__  s*    i'')))			r   c                     | j         j        S )z$The client bound to this ACL's blob.)r   r   r   s    r   r   zObjectACL.client  s     yr   c                      | j         j         dS )r   z/aclr   r   r   s    r   r   zObjectACL.reload_path  s     ).&&&&r   c                     | j         j        S r   r   r   s    r   r   zObjectACL.save_path  s     y~r   c                     | j         j        S r   )r   r   r   s    r   r   zObjectACL.user_project  s     y%%r   Nc	           
      Z    t                                          ||||||||           dS )a!  Save this ACL for the current object.

        If :attr:`user_project` is set, bills the API request to that project.

        :type acl: :class:`google.cloud.storage.acl.ACL`, or a compatible list.
        :param acl: The ACL object to save.  If left blank, this will save
                    current entries.

        :type client: :class:`~google.cloud.storage.client.Client` or
                      ``NoneType``
        :param client: (Optional) The client to use.  If not passed, falls back
                       to the ``client`` stored on the ACL's parent.

        :type if_generation_match: long
        :param if_generation_match:
            (Optional) See :ref:`using-if-generation-match`

        :type if_generation_not_match: long
        :param if_generation_not_match:
            (Optional) See :ref:`using-if-generation-not-match`

        :type if_metageneration_match: long
        :param if_metageneration_match:
            (Optional) See :ref:`using-if-metageneration-match`

        :type if_metageneration_not_match: long
        :param if_metageneration_not_match:
            (Optional) See :ref:`using-if-metageneration-not-match`

        :type timeout: float or tuple
        :param timeout:
            (Optional) The amount of time, in seconds, to wait
            for the server response.  See: :ref:`configuring_timeouts`

        :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
        :param retry:
            (Optional) How to retry the RPC. See: :ref:`configuring_retries`
        )r   r   r   r   r   r   rN   r   N)r   r   )
r   r   r   r   r   r   r   rN   r   r   s
            r   r   zObjectACL.save  sG    b 	 3$;$;(C 	 		
 		
 		
 		
 		
r   c	           
      Z    t                                          ||||||||           dS )a  Save this ACL for the current object using a predefined ACL.

        If :attr:`user_project` is set, bills the API request to that project.

        :type predefined: str
        :param predefined: An identifier for a predefined ACL.  Must be one
                           of the keys in :attr:`PREDEFINED_JSON_ACLS`
                           or :attr:`PREDEFINED_XML_ACLS` (which will be
                           aliased to the corresponding JSON name).
                           If passed, `acl` must be None.

        :type client: :class:`~google.cloud.storage.client.Client` or
                      ``NoneType``
        :param client: (Optional) The client to use.  If not passed, falls back
                       to the ``client`` stored on the ACL's parent.

        :type if_generation_match: long
        :param if_generation_match:
            (Optional) See :ref:`using-if-generation-match`

        :type if_generation_not_match: long
        :param if_generation_not_match:
            (Optional) See :ref:`using-if-generation-not-match`

        :type if_metageneration_match: long
        :param if_metageneration_match:
            (Optional) See :ref:`using-if-metageneration-match`

        :type if_metageneration_not_match: long
        :param if_metageneration_not_match:
            (Optional) See :ref:`using-if-metageneration-not-match`

        :type timeout: float or tuple
        :param timeout:
            (Optional) The amount of time, in seconds, to wait
            for the server response.  See: :ref:`configuring_timeouts`

        :type retry: google.api_core.retry.Retry or google.cloud.storage.retry.ConditionalRetryPolicy
        :param retry:
            (Optional) How to retry the RPC. See: :ref:`configuring_retries`
        )rX   r   r   r   r   r   rN   r   N)r   r   )
r   rX   r   r   r   r   r   rN   r   r   s
            r   r   zObjectACL.save_predefined0  sI    h 	! 3$;$;(C 	  		
 		
 		
 		
 		
r   c           	      X    t                                          |||||||           dS )r   r   N)r   r[   )	r   r   r   r   r   r   rN   r   r   s	           r   r[   zObjectACL.clearo  sD    b 	 3$;$;(C 	 	
 	
 	
 	
 	
r   )r<   r=   r>   r?   r   r   r   r   r   r   r   r   r   r   r[   r   r   s   @r   r   r     sR                 X  ' ' X'   X & & X&   $ $$( :
 :
 :
 :
 :
 :
~   $ $$( =
 =
 =
 =
 =
 =
B   $ $$( 9
 9
 9
 9
 9
 9
 9
 9
 9
 9
r   r   N)r?   google.cloud.storage._helpersr   +google.cloud.storage._opentelemetry_tracingr   google.cloud.storage.constantsr   google.cloud.storage.retryr   r   objectr	   rB   r   r   r   r@   r   r   <module>r      s`   , + J J J J J J I I I I I I ; ; ; ; ; ; 4 4 4 4 4 4 P P P P P PO+ O+ O+ O+ O+ O+ O+ O+dA	 A	 A	 A	 A	& A	 A	 A	H( ( ( ( ( ( ( (@; ; ; ; ;y ; ; ;S
 S
 S
 S
 S
 S
 S
 S
 S
 S
r   