
    ,OfX                     z    d dl mZ d dlmZ d dlmZ d dlZd dlZd dlZd dl	Zd dl
Zd dlmZmZmZ  G d de      Zy)    )annotations)datetime)AnyN)	AttributeCompletableGithubObjectNotSetc                      e Zd ZdZddZddZedd       Zedd       Zedd       Z	edd       Z
edd       Zedd	       Zedd
       Zedd       Zedd       ZddZddZddZddZddZy)Notificationz
    This class represents Notifications.

    The reference can be found here
    https://docs.github.com/en/rest/reference/activity#notifications

    c                    t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _	        y N)
r   _id_last_read_at_repository_subject_reason_subscription_url_unread_updated_at_urlselfs    3lib/python3.12/site-packages/github/Notification.py_initAttributeszNotification._initAttributesB   sE    #)28DJSY'-17(.06$*	    c                z    | j                  | j                  j                  | j                  j                  d      S )N)idsubject)get__repr__r   valuer   r   s    r   __repr__zNotification.__repr__M   s*    txx~~$--BUBU VWWr   c                d    | j                  | j                         | j                  j                  S r   )_completeIfNotSetr   r   r   s    r   r   zNotification.idP   s"    txx(xx~~r   c                d    | j                  | j                         | j                  j                  S r   )r"   r   r   r   s    r   last_read_atzNotification.last_read_atU   s(    t112!!'''r   c                d    | j                  | j                         | j                  j                  S r   )r"   r   r   r   s    r   
repositoryzNotification.repositoryZ   (    t//0%%%r   c                d    | j                  | j                         | j                  j                  S r   )r"   r   r   r   s    r   r   zNotification.subject_   s$    t}}-}}"""r   c                d    | j                  | j                         | j                  j                  S r   )r"   r   r   r   s    r   reasonzNotification.reasond   $    t||,||!!!r   c                d    | j                  | j                         | j                  j                  S r   )r"   r   r   r   s    r   subscription_urlzNotification.subscription_urli   s(    t556%%+++r   c                d    | j                  | j                         | j                  j                  S r   )r"   r   r   r   s    r   unreadzNotification.unreadn   r+   r   c                d    | j                  | j                         | j                  j                  S r   )r"   r   r   r   s    r   
updated_atzNotification.updated_ats   r'   r   c                d    | j                  | j                         | j                  j                  S r   )r"   r   r   r   s    r   urlzNotification.urlx   s"    tyy)yyr   c                V    | j                   j                  d| j                        \  }}y)z
        :calls: `PATCH /notifications/threads/{id} <https://docs.github.com/en/rest/reference/activity#notifications>`_
        PATCHN
_requesterrequestJsonAndCheckr3   r   headersdatas      r   mark_as_readzNotification.mark_as_read}   s&     ;;HH
r   c                V    | j                   j                  d| j                        \  }}y)z
        :calls: `DELETE /notifications/threads/{id} <https://docs.github.com/en/rest/reference/activity#notifications>`_
        DELETENr6   r9   s      r   mark_as_donezNotification.mark_as_done   s&     ;;HH
r   c                    | j                   j                  d| j                  j                        \  }}t        j
                  j                  | j                   ||d      S NGETT)	completed)r7   r8   r   r3   githubPullRequestr9   s      r   get_pull_requestzNotification.get_pull_request   sK    ;;E4<<CSCST!!--doowX\-]]r   c                    | j                   j                  d| j                  j                        \  }}t        j
                  j                  | j                   ||d      S rA   )r7   r8   r   r3   rD   Issuer9   s      r   	get_issuezNotification.get_issue   sH    ;;E4<<CSCST||!!$//7DD!QQr   c                t   d|v r| j                  |d         | _        d|v r| j                  |d         | _        d|v r2| j	                  t
        j                  j                  |d         | _        d|v r2| j	                  t
        j                  j                  |d         | _	        d|v r| j                  |d         | _
        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   r*   r-   r/   r1   r3   )_makeStringAttributer   _makeDatetimeAttributer   _makeClassAttributerD   
Repositoryr   NotificationSubjectr   r   r   _makeBoolAttributer   r   r   )r   
attributess     r   _useAttributeszNotification._useAttributes   sF   :00D1ABDHZ'!%!<!<Z=W!XD:%#778I8I8T8TV`amVnoD
" 44**>>
9@UDM z!44Z5IJDL+%)%>%>zJ\?]%^D"z!22:h3GHDL:%#:::l;STDJ11*U2CDDI r   N)returnNone)rS   str)rS   r   )rS   zgithub.Repository.Repository)rS   z.github.NotificationSubject.NotificationSubject)rS   bool)rS   zgithub.PullRequest.PullRequest)rS   zgithub.Issue.Issue)rQ   zdict[str, Any]rS   rT   )__name__
__module____qualname____doc__r   r    propertyr   r$   r&   r   r*   r-   r/   r1   r3   r<   r?   rF   rI   rR    r   r   r
   r
   9   s    	+X   ( ( & & # # " " , , " " & &  

^REr   r
   )
__future__r   r   typingr   github.GithubObjectrD   github.Issuegithub.NotificationSubjectgithub.PullRequestgithub.Repositoryr   r   r   r
   r\   r   r   <module>rd      s7   X #     !   J JrE* rEr   