
    #Iic%                     R    S SK rS SKr " S S\R                  R                  5      rg)    Nc                      \ rS rSrSrS r\S 5       r\S 5       r\S 5       r	\S 5       r
\S 5       r\S	 5       r\S
 5       r\S 5       r\S 5       r\S 5       r\S 5       rS r\R(                  R*                  \R(                  R*                  \R(                  R*                  \R(                  R*                  4S jrS rS rS rS rSrg)Hook$   zw
This class represents Hooks. The reference can be found here https://docs.github.com/en/rest/reference/repos#webhooks
c                 z    U R                  U R                  R                  U R                  R                  S.5      $ )N)idurl)get__repr___idvalue_urlselfs    1/venv/lib/python3.13/site-packages/github/Hook.py__repr__Hook.__repr__)   s(    txx~~diioo NOO    c                 d    U R                  U R                  5        U R                  R                  $ )z
:type: bool
)_completeIfNotSet_activer   r   s    r   activeHook.active,   &    
 	t||,||!!!r   c                 d    U R                  U R                  5        U R                  R                  $ )z
:type: dict
)r   _configr   r   s    r   configHook.config4   r   r   c                 d    U R                  U R                  5        U R                  R                  $ z
:type: datetime.datetime
)r   _created_atr   r   s    r   
created_atHook.created_at<   *    
 	t//0%%%r   c                 d    U R                  U R                  5        U R                  R                  $ )z
:type: list of string
)r   _eventsr   r   s    r   eventsHook.eventsD   r   r   c                 d    U R                  U R                  5        U R                  R                  $ )z
:type: integer
)r   r
   r   r   s    r   r   Hook.idL   s$    
 	txx(xx~~r   c                 d    U R                  U R                  5        U R                  R                  $ )z2
:type: :class:`github.HookResponse.HookResponse`
)r   _last_responser   r   s    r   last_responseHook.last_responseT   s*    
 	t223""(((r   c                 d    U R                  U R                  5        U R                  R                  $ z
:type: string
)r   _namer   r   s    r   name	Hook.name\   s&    
 	tzz*zzr   c                 d    U R                  U R                  5        U R                  R                  $ r.   )r   	_test_urlr   r   s    r   test_urlHook.test_urld   &    
 	t~~.~~###r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   _updated_atr   r   s    r   
updated_atHook.updated_atl   r"   r   c                 d    U R                  U R                  5        U R                  R                  $ r.   )r   r   r   r   s    r   r   Hook.urlt   s$    
 	tyy)yyr   c                 d    U R                  U R                  5        U R                  R                  $ r.   )r   	_ping_urlr   r   s    r   ping_urlHook.ping_url|   r6   r   c                 T    U R                   R                  SU R                  5      u  pg)z|
:calls: `DELETE /repos/{owner}/{repo}/hooks/{id} <https://docs.github.com/en/rest/reference/repos#webhooks>`_
:rtype: None
DELETEN
_requesterrequestJsonAndCheckr   r   headersdatas      r   deleteHook.delete   s"    
 ;;HdhhOr   c                    [        U[        5      (       d   U5       e[        U[        5      (       d   U5       eU[        R                  R
                  L d  [        S U 5       5      (       d   U5       eU[        R                  R
                  L d  [        S U 5       5      (       d   U5       eU[        R                  R
                  L d  [        S U 5       5      (       d   U5       eU[        R                  R
                  L d  [        U[        5      (       d   U5       eUUS.nU[        R                  R
                  La  X7S'   U[        R                  R
                  La  XGS'   U[        R                  R
                  La  XWS'   U[        R                  R
                  La  XgS'   U R                  R                  S	U R                  US
9u  pU R                  U	5        g)a  
:calls: `PATCH /repos/{owner}/{repo}/hooks/{id} <https://docs.github.com/en/rest/reference/repos#webhooks>`_
:param name: string
:param config: dict
:param events: list of string
:param add_events: list of string
:param remove_events: list of string
:param active: bool
:rtype: None
c              3   B   #    U  H  n[        U[        5      v   M     g 7fN
isinstancestr.0elements     r   	<genexpr>Hook.edit.<locals>.<genexpr>   s      ;
4:Jw$$F   c              3   B   #    U  H  n[        U[        5      v   M     g 7frM   rN   rQ   s     r   rT   rU      s      ?
4>Jw$$JrV   c              3   B   #    U  H  n[        U[        5      v   M     g 7frM   rN   rQ   s     r   rT   rU      s      B
4AJw$$MrV   )r0   r   r%   
add_eventsremove_eventsr   PATCH)inputN)rO   rP   dictgithubGithubObjectNotSetallboolrD   rE   r   _useAttributes)
r   r0   r   r%   rY   rZ   r   post_parametersrG   rH   s
             r   edit	Hook.edit   s   & $$$*d*$&$''//',,333s ;
4:;
 8
 8
 		 
 V007773 ?
4>?
 <
 <
 		 
  3 3 : ::c B
4AB
 ?
 ?
 		 
 ,,333z&$7O7OWQWWO
 ,,333(.H%V00777,6L) 3 3 : ::/<O,,,333(.H%;;TXX_ < 
 	D!r   c                 Z    U R                   R                  SU R                   S35      u  pg)z
:calls: `POST /repos/{owner}/{repo}/hooks/{id}/tests <https://docs.github.com/en/rest/reference/repos#webhooks>`_
:rtype: None
POSTz/testsNrC   rF   s      r   test	Hook.test   *    
 ;;FtxxjPVDWXr   c                 Z    U R                   R                  SU R                   S35      u  pg)z
:calls: `POST /repos/{owner}/{repo}/hooks/{id}/pings <https://docs.github.com/en/rest/reference/repos#webhooks>`_
:rtype: None
rh   z/pingsNrC   rF   s      r   ping	Hook.ping   rk   r   c                    [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l	        [         R                  R                  U l
        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        g rM   )r^   r_   r`   r   r   r   r$   r
   r*   r/   r3   r8   r   r>   r   s    r   _initAttributesHook._initAttributes   s    **11**11!..55**11&&--$1188((//
,,33!..55''..	,,33r   c                    SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R	                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l	        SU;   a2  U R                  [        R                  R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        S	U;   a  U R	                  US	   5      U l        S
U;   a  U R                  US
   5      U l        SU;   a  U R                  US   5      U l        g g )Nr   r   r    r%   r   r+   r0   r4   r9   r   r?   )_makeBoolAttributer   _makeDictAttributer   _makeDatetimeAttributer   _makeListOfStringsAttributer$   _makeIntAttributer
   _makeClassAttributer^   HookResponser*   _makeStringAttributer/   r3   r8   r   r>   )r   
attributess     r   rc   Hook._useAttributes   sr   z!22:h3GHDLz!22:h3GHDL:%#:::l;STDz!;;Jx<PQDL:--j.>?DHj("&":":##00*_2M#D Z22:f3EFDJ#!66z*7MNDN:%#:::l;STDJ11*U2CDDI#!66z*7MNDN $r   )r   r   r   r$   r
   r*   r/   r>   r3   r8   r   N)__name__
__module____qualname____firstlineno____doc__r   propertyr   r   r    r%   r   r+   r0   r4   r9   r   r?   rI   r^   r_   r`   re   ri   rm   rp   rc   __static_attributes__ r   r   r   r   $   sJ   P " " " " & & " "   ) )     $ $ & &   $ $P ""))&&--))00""))."`YY4Or   r   )github.GithubObjectr^   github.HookResponser_   CompletableGithubObjectr   r   r   r   <module>r      s*   @  JO666 JOr   