o
    )=j|€  ã                   @   s”   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„ de
ƒZG d	d
„ d
e
ƒZG dd„ deƒZG dd„ deƒZG d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                   @   s~   e Zd ZdZdZdZdZddd„Zdd	„ Zd
d„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zd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').
    ZREADERZWRITERZOWNERNc                 C   s   || _ tg ƒ| _|| _d S ©N)Ú
identifierÚsetÚrolesÚtype)ÚselfÚentity_typer	   © r   úbC:\Users\psant\Downloads\Anu Raj Backend\school\venv\Lib\site-packages\google/cloud/storage/acl.pyÚ__init__*   s   

z_ACLEntity.__init__c                 C   s   | j st| jƒS dj| d�S )Nz{acl.type}-{acl.identifier})Úacl)r	   Ústrr   Úformat©r   r   r   r   Ú__str__/   s   
z_ACLEntity.__str__c                 C   s   d| › dd  | j¡› d�S )Nz<ACL Entity: z (z, z)>)Újoinr   r   r   r   r   Ú__repr__5   s   z_ACLEntity.__repr__c                 C   s   | j S )zšGet the list of roles permitted by this entity.

        :rtype: list of strings
        :returns: The list of roles associated with this entity.
        N)r   r   r   r   r   Ú	get_roles8   s   z_ACLEntity.get_rolesc                 C   s   | 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   Úroler   r   r   Úgrant@   s   z_ACLEntity.grantc                 C   s   || 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   r   r   r   ÚrevokeH   s   
ÿz_ACLEntity.revokec                 C   ó   |   tj¡ dS )z(Grant read access to the current entity.N)r   r   ÚREADER_ROLEr   r   r   r   Ú
grant_readQ   ó   z_ACLEntity.grant_readc                 C   r    )z)Grant write access to the current entity.N)r   r   ÚWRITER_ROLEr   r   r   r   Úgrant_writeU   r#   z_ACLEntity.grant_writec                 C   r    )z)Grant owner access to the current entity.N)r   r   Ú
OWNER_ROLEr   r   r   r   Úgrant_ownerY   r#   z_ACLEntity.grant_ownerc                 C   r    )z+Revoke read access from the current entity.N)r   r   r!   r   r   r   r   Úrevoke_read]   r#   z_ACLEntity.revoke_readc                 C   r    )z,Revoke write access from the current entity.N)r   r   r$   r   r   r   r   Úrevoke_writea   r#   z_ACLEntity.revoke_writec                 C   r    )z,Revoke owner access from the current entity.N)r   r   r&   r   r   r   r   Úrevoke_ownere   r#   z_ACLEntity.revoke_ownerr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r!   r$   r&   r   r   r   r   r   r   r"   r%   r'   r(   r)   r*   r   r   r   r   r      s"    
	r   c                   @   sX  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d„ Zefdd„Zedd„ ƒZdd„ Zdd„ Zdd„ Zdd„ Zd<dd„Zdd„ Zd<d d!„Zd"d#„ Zd$d%„ Zd&d'„ Zd(d)„ Zd*d+„ Zd,d-„ Zed.d/„ ƒZ d0d1„ Z!dee"fd2d3„Z#ddddee$fd4d5„Z%ddddddee$fd6d7„Z&dddddee$fd8d9„Z'dddddee$fd:d;„Z(dS )=ÚACLz7Container class representing a list of access controls.r   ZpredefinedAclÚprojectPrivateÚ
publicReadÚpublicReadWriteÚauthenticatedReadÚbucketOwnerReadÚbucketOwnerFullControl)zproject-privatezpublic-readzpublic-read-writezauthenticated-readzbucket-owner-readzbucket-owner-full-control)Úprivater0   r1   r2   r3   r4   r5   FNc                 C   s
   i | _ d S r   )Úentitiesr   r   r   r   r   ‘   s   
zACL.__init__c                 C   s   | j s| j|d� dS dS )zéLoad 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   r8   r   r   r   Ú_ensure_loaded”   s   ÿzACL._ensure_loadedc                 C   s.   | 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: N)ÚPREDEFINED_XML_ACLSÚgetÚPREDEFINED_JSON_ACLSÚ
ValueError)ÚclsÚ
predefinedr   r   r   Úvalidate_predefinedŸ   s   zACL.validate_predefinedc                 C   s   | j  ¡  d| _dS )z@Remove all entities from the ACL, and clear the ``loaded`` flag.FN)r7   Úclearr9   r   r   r   r   Úreset°   s   

z	ACL.resetc                 c   s@   � |   ¡  | j ¡ D ]}| ¡ D ]}|rt|ƒ|dœV  qq
d S )N)Úentityr   )r;   r7   Úvaluesr   r   )r   rE   r   r   r   r   Ú__iter__µ   s   €€þÿzACL.__iter__c                 C   s€   |d }|d }|dkr|   ¡ }n|dkr|  ¡ }nd|v r-| dd¡\}}| j||d�}t|tƒs9t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.
        rE   r   ÚallUsersÚallAuthenticatedUsersú-é   ©r   r	   zInvalid dictionary: N)ÚallÚall_authenticatedÚsplitrE   Ú
isinstancer   r?   r   )r   Zentity_dictrE   r   r   r	   r   r   r   Úentity_from_dict½   s   



zACL.entity_from_dictc                 C   s   |   ¡  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.
        N)r;   r   r7   ©r   rE   r   r   r   Ú
has_entityÝ   s   	zACL.has_entityc                 C   s   |   ¡  | 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``.
        N)r;   r7   r=   r   )r   rE   Údefaultr   r   r   Ú
get_entityé   s   zACL.get_entityc                 C   s   |   ¡  || jt|ƒ< dS )zƒAdd an entity to the ACL.

        :type entity: :class:`_ACLEntity`
        :param entity: The entity to add to this ACL.
        N)r;   r7   r   rR   r   r   r   Ú
add_entityú   s   zACL.add_entityc                 C   s2   t ||d�}|  |¡r|  |¡}|S |  |¡ |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.
        rL   N)r   rS   rU   rV   )r   r   r	   rE   r   r   r   rE     s   


ÿz
ACL.entityc                 C   ó   | j d|d�S )zëFactory 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	   N©rE   ©r   r	   r   r   r   rX     ó   	zACL.userc                 C   rW   )zîFactory 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.
        ÚgrouprY   NrZ   r[   r   r   r   r]   (  r\   z	ACL.groupc                 C   rW   )zÙFactory 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.
        ÚdomainrY   NrZ   )r   r^   r   r   r   r^   3  r\   z
ACL.domainc                 C   ó
   |   d¡S )z–Factory method for an Entity representing all users.

        :rtype: :class:`_ACLEntity`
        :returns: An entity representing all users.
        rH   NrZ   r   r   r   r   rM   >  ó   
zACL.allc                 C   r_   )z²Factory method for an Entity representing all authenticated users.

        :rtype: :class:`_ACLEntity`
        :returns: An entity representing all authenticated users.
        rI   NrZ   r   r   r   r   rN   F  r`   zACL.all_authenticatedc                 C   s   |   ¡  t| j ¡ ƒS )z�Get a list of all Entity objects.

        :rtype: list of :class:`_ACLEntity` objects
        :returns: A list of all Entity objects.
        N)r;   Úlistr7   rF   r   r   r   r   Úget_entitiesN  s   zACL.get_entitiesc                 C   s   t ‚)z&Abstract getter for the object client.N)ÚNotImplementedErrorr   r   r   r   ÚclientW  s   z
ACL.clientc                 C   s   |du r| 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.
        N)rd   )r   rd   r   r   r   Ú_require_client\  s   zACL._require_clientc                 C   sœ   t dd��? | j}|  |¡}i }| jdur| j|d< | j ¡  |j||||d�}d| _| dd¡D ]
}|  	|  
|¡¡ q1W d  ƒ dS 1 sGw   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_paramsr8   ÚretryTÚitemsr   )r   Úreload_pathre   Úuser_projectr7   rC   Z_get_resourcer9   r=   rV   rQ   )r   rd   r8   rk   Úpathrj   ÚfoundÚentryr   r   r   r:   k  s$   



üÿ"îz
ACL.reloadc
                 C   sª   |   |¡}ddi}
|durg }||
| j< | jdur| j|
d< t|
||||d� | j}|j|| jt|ƒi|
||	d�}| j 	¡  | 
| jd¡D ]
}|  |  |¡¡ qEd| _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`
        Z
projectionÚfullNrh   )Úif_generation_matchÚif_generation_not_matchÚif_metageneration_matchÚif_metageneration_not_matchri   r   T)re   Ú_PREDEFINED_QUERY_PARAMrn   r   Ú	save_pathZ_patch_resourceÚ_URL_PATH_ELEMra   r7   rC   r=   rV   rQ   r9   )r   r   rA   rd   rs   rt   ru   rv   r8   rk   rj   ro   Úresultrq   r   r   r   Ú_save’  s4   
4


ûû

z	ACL._savec	           
      C   sx   t dd��- |du r| }|j}	nd}	|	r*| j|d|||||||d�	 W d  ƒ dS W d  ƒ dS 1 s5w   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.saverf   NT©rs   rt   ru   rv   r8   rk   )r   r9   r{   )
r   r   rd   rs   rt   ru   rv   r8   rk   Zsave_to_backendr   r   r   Úsaveé  s(   1÷ø"ùzACL.savec	           	      C   sV   t dd�� |  |¡}| jd||||||||d�	 W d  ƒ dS 1 s$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.savePredefinedrf   Nr|   )r   rB   r{   ©	r   rA   rd   rs   rt   ru   rv   r8   rk   r   r   r   Úsave_predefined.  s   4
÷"þzACL.save_predefinedc                 C   sJ   t dd�� | jg |||||||d� W d  ƒ dS 1 s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.clearrf   ©rd   rs   rt   ru   rv   r8   rk   N)r   r}   ©r   rd   rs   rt   ru   rv   r8   rk   r   r   r   rC   p  s   1ø"ÿz	ACL.clearr   ))r+   r,   r-   r.   ry   rw   r<   Ú	frozensetr>   r9   rm   rx   rn   r   r   r;   ÚclassmethodrB   rD   rG   rQ   rS   rU   rV   rE   rX   r]   r^   rM   rN   rb   Úpropertyrd   re   r   r:   r   r{   r}   r   rC   r   r   r   r   r/   j   s�    ù
ÿ
 

		
,
öY
÷H
÷Dør/   c                       sP   e Zd ZdZ‡ fdd„Zedd„ ƒZedd„ ƒZedd	„ ƒZed
d„ ƒZ	‡  Z
S )Ú	BucketACLzžAn ACL specifically for a bucket.

    :type bucket: :class:`google.cloud.storage.bucket.Bucket`
    :param bucket: The bucket to which this ACL relates.
    c                    ó   t t| ƒ ¡  || _d S r   )Úsuperr†   r   Úbucket)r   r‰   ©Ú	__class__r   r   r   µ  ó   
zBucketACL.__init__c                 C   ó   | j jS )z&The client bound to this ACL's bucket.N)r‰   rd   r   r   r   r   rd   ¹  ó   zBucketACL.clientc                 C   s   | j j› d| j› �S )ú3Compute the path for GET API requests for this ACL.ú/N)r‰   ro   ry   r   r   r   r   rm   ¾  s   zBucketACL.reload_pathc                 C   r�   ©z5Compute the path for PATCH API requests for this ACL.N)r‰   ro   r   r   r   r   rx   Ã  rŽ   zBucketACL.save_pathc                 C   r�   ©z?Compute the user project charged for API requests for this ACL.N)r‰   rn   r   r   r   r   rn   È  rŽ   zBucketACL.user_project)r+   r,   r-   r.   r   r…   rd   rm   rx   rn   Ú__classcell__r   r   rŠ   r   r†   ®  s    


r†   c                   @   s   e Zd ZdZdZdZdS )ÚDefaultObjectACLz9A class representing the default object ACL for a bucket.ZdefaultObjectAclZpredefinedDefaultObjectAclN)r+   r,   r-   r.   ry   rw   r   r   r   r   r”   Î  s    r”   c                       s¦   e Zd ZdZ‡ fdd„Zedd„ ƒZedd„ ƒZedd	„ ƒZed
d„ ƒZ	dddddde
ef‡ fdd„	Zddddde
ef‡ fdd„	Zddddde
ef‡ fdd„	Z‡  ZS )Ú	ObjectACLz¬An 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                    r‡   r   )rˆ   r•   r   Úblob)r   r–   rŠ   r   r   r   Ü  rŒ   zObjectACL.__init__c                 C   r�   )z$The client bound to this ACL's blob.N)r–   rd   r   r   r   r   rd   à  rŽ   zObjectACL.clientc                 C   s   | j j› d�S )r�   z/aclN©r–   ro   r   r   r   r   rm   å  s   zObjectACL.reload_pathc                 C   r�   r‘   r—   r   r   r   r   rx   ê  rŽ   zObjectACL.save_pathc                 C   r�   r’   )r–   rn   r   r   r   r   rn   ï  rŽ   zObjectACL.user_projectNc	           	   
      ó    t ƒ j||||||||d� 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   rd   rs   rt   ru   rv   r8   rk   N)rˆ   r}   )	r   r   rd   rs   rt   ru   rv   r8   rk   rŠ   r   r   r}   ô  s   1
øzObjectACL.savec	           	   
      r˜   )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`
        )rA   rd   rs   rt   ru   rv   r8   rk   N)rˆ   r   r~   rŠ   r   r   r   0  s   4
øzObjectACL.save_predefinedc              	      s   t ƒ j|||||||d� dS )r€   r�   N)rˆ   rC   r‚   rŠ   r   r   rC   o  s   1
ùzObjectACL.clear)r+   r,   r-   r.   r   r…   rd   rm   rx   rn   r   r   r}   r   rC   r“   r   r   rŠ   r   r•   Õ  sH    



÷?÷Aør•   N)r.   Zgoogle.cloud.storage._helpersr   Z+google.cloud.storage._opentelemetry_tracingr   Zgoogle.cloud.storage.constantsr   Zgoogle.cloud.storage.retryr   r   Úobjectr   r/   r†   r”   r•   r   r   r   r   Ú<module>   s   R    H 