
    ,Of                     J    d dl m Z  d dlmZmZ d dlmZmZmZ  G d de      Zy)    )datetime)AnyDict)	AttributeNonCompletableGithubObjectNotSetc                       e Zd ZdZddZdefdZedefd       Z	edefd       Z
edefd       Zedefd	       Zd
eeef   ddfdZy)Ratez
    This class represents Rates.

    The reference can be found here
    https://docs.github.com/en/rest/reference/rate-limit

    returnNc                 \    t         | _        t         | _        t         | _        t         | _        y N)r   _limit
_remaining_reset_usedselfs    +lib/python3.12/site-packages/github/Rate.py_initAttributeszRate._initAttributes8   s    &,*0+1%+
    c                     | j                  | j                  j                  | j                  j                  | j                  j                  d      S )N)limit	remainingreset)get__repr__r   valuer   r   r   s    r   __repr__zRate.__repr__>   sA    **!__22**
 	
r   c                 .    | j                   j                  S r   )r   r   r   s    r   r   z
Rate.limitG       {{   r   c                 .    | j                   j                  S r   )r   r   r   s    r   r   zRate.remainingK   s    $$$r   c                 .    | j                   j                  S r   )r   r   r   s    r   r   z
Rate.resetO   r   r   c                 .    | j                   j                  S r   )r   r   r   s    r   usedz	Rate.usedS   s    zzr   
attributesc                     d|v r| j                  |d         | _        d|v r| j                  |d         | _        d|v r| j                  |d         | _        d|v r| j                  |d         | _        y y )Nr   r   r   r#   )_makeIntAttributer   r   _makeTimestampAttributer   r   )r   r$   s     r   _useAttributeszRate._useAttributesW   s    j 00G1DEDK*$"44Z5LMDOj 66z'7JKDKZ//
60BCDJ  r   )r   N)__name__
__module____qualname____doc__r   strr   propertyintr   r   r   r   r#   r   r   r(    r   r   r
   r
   /   s    ,
# 
 !s ! ! %3 % % !x ! !  c    Dc3h DD Dr   r
   N)	r   typingr   r   github.GithubObjectr   r   r   r
   r0   r   r   <module>r3      s#   R   M M0D% 0Dr   