Ë
    8ø»jB#  ã                  óä   — d dl mZ d dlmZmZ d dlmZ d dlmZ d dl	m
Z
mZmZmZmZmZmZmZ d dlmZmZ d dlmZ erd dlmZ  ed	«       G d
„ de«      «       Z ed	«       G d„ de«      «       Zy)é    )Úannotations)ÚTYPE_CHECKINGÚAny)ÚValidationError)Ú
docs_group)ÚAccountLimitsÚLimitsResponseÚMonthlyUsageÚMonthlyUsageResponseÚPrivateUserDataResponseÚPublicUserDataResponseÚUserPrivateInfoÚUserPublicInfo)ÚResourceClientÚResourceClientAsync)Úresponse_to_dict)ÚTimeoutzResource clientsc                  ó„   ‡ — e Zd ZdZdddœ	 	 	 	 	 	 	 dˆ fd„Zddœdd„Zddœdd	„Zddœdd
„Zddddœ	 	 	 	 	 	 	 dd„Zˆ xZ	S )Ú
UserClientzâSub-client for managing user account information.

    Provides methods to manage user account information, e.g. get user data or monthly usage. Obtain an instance via
    an appropriate method on the `ApifyClient` class.
    NÚusers©Úresource_idÚresource_pathc               ó2   •— t        ‰| �  d|xs d|dœ|¤Ž y ©NÚmer   © ©ÚsuperÚ__init__©Úselfr   r   ÚkwargsÚ	__class__s       €úZ/var/www/html/GAP/venv/lib/python3.12/site-packages/apify_client/_resource_clients/user.pyr    zUserClient.__init__!   ó,   ø€ ô 	‰Ñð 	
Ø#Ò+ tØ'ñ	
ð ó	
ó    Úshort©Útimeoutc               óÈ   — | j                  |¬«      }|€y	 t        j                  |«      j                  S # t        $ r" t        j                  |«      j                  cY S w xY w©aV  Return information about user account.

        You receive all or only public info based on your token permissions.

        https://docs.apify.com/api/v2#/reference/users

        Args:
            timeout: Timeout for the API HTTP request.

        Returns:
            The retrieved user data, or None if the user does not exist.
        r)   N©Ú_getr   Úmodel_validateÚdatar   r   ©r"   r*   Úresults      r%   ÚgetzUserClient.get.   sa   € ð —‘ 7�Ó+ˆØˆ>Øð	FÜ*×9Ñ9¸&ÓA×FÑFÐFøÜò 	FÜ)×8Ñ8¸Ó@×EÑEÒEð	Fús   —6 ¶(A!Á A!c               óÎ   — | j                   j                  | j                  d«      d| j                  «       |¬«      }t	        |«      }t        j                  |«      j                  S )át  Return monthly usage of the user account.

        This includes a complete usage summary for the current usage cycle, an overall sum, as well as a daily breakdown
        of usage. It is the same information which is available on the account's Billing page. The information includes
        use of storage, data transfer, and request queue usage.

        https://docs.apify.com/api/v2/#/reference/users/monthly-usage

        Args:
            timeout: Timeout for the API HTTP request.

        Returns:
            The retrieved monthly usage.

        Raises:
            NotFoundError: If the user does not exist.
        úusage/monthlyÚGET©ÚurlÚmethodÚparamsr*   ©Ú_http_clientÚcallÚ
_build_urlÚ_build_paramsr   r   r/   r0   ©r"   r*   Úresponser2   s       r%   Úmonthly_usagezUserClient.monthly_usageC   s`   € ð$ ×$Ñ$×)Ñ)Ø—‘ Ó0ØØ×%Ñ%Ó'Øð	 *ó 
ˆô " (Ó+ˆÜ#×2Ñ2°6Ó:×?Ñ?Ð?r'   c               óÎ   — | j                   j                  | j                  d«      d| j                  «       |¬«      }t	        |«      }t        j                  |«      j                  S )á%  Return a complete summary of the user account's limits.

        It is the same information which is available on the account's Limits page. The returned data includes
        the current usage cycle, a summary of the account's limits, and the current usage.

        https://docs.apify.com/api/v2#/reference/users/account-limits/get-account-limits

        Args:
            timeout: Timeout for the API HTTP request.

        Returns:
            The account limits.

        Raises:
            NotFoundError: If the user does not exist.
        Úlimitsr7   r8   ©r=   r>   r?   r@   r   r	   r/   r0   rA   s       r%   rF   zUserClient.limits^   s`   € ð" ×$Ñ$×)Ñ)Ø—‘ Ó)ØØ×%Ñ%Ó'Øð	 *ó 
ˆô " (Ó+ˆÜ×,Ñ,¨VÓ4×9Ñ9Ð9r'   ©Úmax_monthly_usage_usdÚdata_retention_daysr*   c          
     ó¢   — | j                   j                  | j                  d«      d| j                  «       | j	                  ||dœ«      |¬«       y©a  Update the account's limits manageable on your account's Limits page.

        Args:
            max_monthly_usage_usd: Maximum monthly usage in USD.
            data_retention_days: Data retention period in days.
            timeout: Timeout for the API HTTP request.
        rF   ÚPUT)ÚmaxMonthlyUsageUsdÚdataRetentionDays)r9   r:   r;   Újsonr*   N©r=   r>   r?   r@   Ú_clean_json_payload©r"   rI   rJ   r*   s       r%   Úupdate_limitszUserClient.update_limitsx   sV   € ð 	×Ñ×ÑØ—‘ Ó)ØØ×%Ñ%Ó'Ø×)Ñ)à*?Ø)<ñóð ð 	õ 	
r'   ©r   z
str | Noner   Ústrr#   r   ÚreturnÚNone©r*   r   rW   z'UserPublicInfo | UserPrivateInfo | None©r*   r   rW   r
   ©r*   r   rW   r   ©rI   ú
int | NonerJ   r]   r*   r   rW   rX   ©
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r    r3   rC   rF   rT   Ú__classcell__©r$   s   @r%   r   r      s•   ø„ ñð #'Ø$ñ	
ð  ð
ð ð	
ð
 ð
ð 
õ
ð )0õ Fð* 3:õ @ð6 ,3õ :ð: -1Ø*.Ø"ñ
ð  *ð
ð (ð	
ð
 ð
ð 
÷
r'   r   c                  ó„   ‡ — e Zd ZdZdddœ	 	 	 	 	 	 	 dˆ fd„Zddœdd„Zddœdd	„Zddœdd
„Zddddœ	 	 	 	 	 	 	 dd„Zˆ xZ	S )ÚUserClientAsynczçSub-client for managing user account information.

    Provides methods to manage user account information, e.g. get user data or monthly usage. Obtain an instance via
    an appropriate method on the `ApifyClientAsync` class.
    Nr   r   c               ó2   •— t        ‰| �  d|xs d|dœ|¤Ž y r   r   r!   s       €r%   r    zUserClientAsync.__init__œ   r&   r'   r(   r)   c             ƒ  óä   K  — | j                  |¬«      ƒ d{  –—† }|€y	 t        j                  |«      j                  S 7 Œ'# t        $ r" t        j                  |«      j                  cY S w xY w­wr,   r-   r1   s      r%   r3   zUserClientAsync.get©   sn   è ø€ ð —y‘y¨�yÓ1×1ˆØˆ>Øð	FÜ*×9Ñ9¸&ÓA×FÑFÐFð	 2ùô
 ò 	FÜ)×8Ñ8¸Ó@×EÑEÒEð	Füs1   ‚A0˜A ™A0¡A ¿A0Á(A-Á*A0Á,A-Á-A0c             ƒ  óê   K  — | j                   j                  | j                  d«      d| j                  «       |¬«      ƒ d{  –—† }t	        |«      }t        j                  |«      j                  S 7 Œ.­w)r5   r6   r7   r8   Nr<   rA   s       r%   rC   zUserClientAsync.monthly_usage¾   sn   è ø€ ð$ ×*Ñ*×/Ñ/Ø—‘ Ó0ØØ×%Ñ%Ó'Øð	 0ó 
÷ 
ˆô " (Ó+ˆÜ#×2Ñ2°6Ó:×?Ñ?Ð?ð
úó   ‚A A3ÁA1Á/A3c             ƒ  óê   K  — | j                   j                  | j                  d«      d| j                  «       |¬«      ƒ d{  –—† }t	        |«      }t        j                  |«      j                  S 7 Œ.­w)rE   rF   r7   r8   NrG   rA   s       r%   rF   zUserClientAsync.limitsÙ   sn   è ø€ ð" ×*Ñ*×/Ñ/Ø—‘ Ó)ØØ×%Ñ%Ó'Øð	 0ó 
÷ 
ˆô " (Ó+ˆÜ×,Ñ,¨VÓ4×9Ñ9Ð9ð
úrj   rH   c          
   ƒ  ó¾   K  — | j                   j                  | j                  d«      d| j                  «       | j	                  ||dœ«      |¬«      ƒ d{  –—†  y7 Œ­wrL   rQ   rS   s       r%   rT   zUserClientAsync.update_limitsó   sd   è ø€ ð ×Ñ×$Ñ$Ø—‘ Ó)ØØ×%Ñ%Ó'Ø×)Ñ)à*?Ø)<ñóð ð %ó 
÷ 	
ò 	
ús   ‚AAÁAÁArU   rY   rZ   r[   r\   r^   rd   s   @r%   rf   rf   ”   s–   ø„ ñð #'Ø$ñ	
ð  ð
ð ð	
ð
 ð
ð 
õ
ð /6õ Fð* 9@õ @ð6 29õ :ð: -1Ø*.Ø"ñ
ð  *ð
ð (ð	
ð
 ð
ð 
÷
r'   rf   N)Ú
__future__r   Útypingr   r   Úpydanticr   Úapify_client._docsr   Úapify_client._modelsr   r	   r
   r   r   r   r   r   Ú/apify_client._resource_clients._resource_clientr   r   Úapify_client._utils.httpr   Úapify_client.typesr   r   rf   r   r'   r%   ú<module>ru      sy   ðÝ "ç %å $å )÷	÷ 	ó 	÷ `Ý 5áÝ*ñ ÐÓôw
�ó w
ó  ðw
ñt ÐÓôw
Ð)ó w
ó  ñw
r'   