Ë
    Ö—Äj�!  ã                  ó¢   — d dl mZ d dlmZ d dlmZmZ d dlZd dlZd dlm	Z	m
Z
mZmZ erd dlmZ  G d„ dej                  j                  «      Zy)	é    )Úannotations)Údatetime)ÚTYPE_CHECKINGÚAnyN)Ú	AttributeÚNotSetÚOptÚ_NotSetType)ÚAuthorizationApplicationc                  óü   — 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eeeeef	 	 	 	 	 	 	 	 	 	 	 dd„Zdd„Zy)ÚAuthorizationz®
    This class represents Authorizations.

    The reference can be found here
    https://docs.github.com/en/enterprise-server@3.0/rest/reference/oauth-authorizations

    c                óÊ   — t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _	        y ©N)
r   Ú_appÚ_created_atÚ_idÚ_noteÚ	_note_urlÚ_scopesÚ_tokenÚ_updated_atÚ_url©Úselfs    úYC:\Users\pivot\Documents\cueki\casual-preloader\Lib\site-packages\github/Authorization.pyÚ_initAttributeszAuthorization._initAttributes>   sC   € Ü9?ˆŒ	Ü06ˆÔÜ#)ˆŒÜ,2ˆŒ
Ü06ˆŒÜ'-ˆŒÜ&,ˆŒÜ06ˆÔÜ$*ˆ�	ó    c                óP   — | j                  d| j                  j                  i«      S )NÚscopes)Úget__repr__r   Úvaluer   s    r   Ú__repr__zAuthorization.__repr__I   s"   € Ø×Ñ ¨4¯<©<×+=Ñ+=Ð >Ó?Ð?r   c                ód   — | j                  | j                  «       | j                  j                  S r   )Ú_completeIfNotSetr   r!   r   s    r   ÚappzAuthorization.appL   ó"   € à×Ñ˜tŸy™yÔ)Ø�y‰y�‰Ðr   c                ód   — | j                  | j                  «       | j                  j                  S )z*
        :type: datetime.datetime
        )r$   r   r!   r   s    r   Ú
created_atzAuthorization.created_atQ   s*   € ð
 	×Ñ˜t×/Ñ/Ô0Ø×Ñ×%Ñ%Ð%r   c                ód   — | j                  | j                  «       | j                  j                  S r   )r$   r   r!   r   s    r   ÚidzAuthorization.idY   s"   € à×Ñ˜tŸx™xÔ(Ø�x‰x�~‰~Ðr   c                ód   — | j                  | j                  «       | j                  j                  S r   )r$   r   r!   r   s    r   ÚnotezAuthorization.note^   s$   € à×Ñ˜tŸz™zÔ*Ø�z‰z×ÑÐr   c                ód   — | j                  | j                  «       | j                  j                  S r   )r$   r   r!   r   s    r   Únote_urlzAuthorization.note_urlc   s$   € à×Ñ˜tŸ~™~Ô.Ø�~‰~×#Ñ#Ð#r   c                ód   — | j                  | j                  «       | j                  j                  S r   )r$   r   r!   r   s    r   r   zAuthorization.scopesh   s$   € à×Ñ˜tŸ|™|Ô,Ø�|‰|×!Ñ!Ð!r   c                ód   — | j                  | j                  «       | j                  j                  S r   )r$   r   r!   r   s    r   ÚtokenzAuthorization.tokenm   s$   € à×Ñ˜tŸ{™{Ô+Ø�{‰{× Ñ Ð r   c                ód   — | j                  | j                  «       | j                  j                  S r   )r$   r   r!   r   s    r   Ú
updated_atzAuthorization.updated_atr   s(   € à×Ñ˜t×/Ñ/Ô0Ø×Ñ×%Ñ%Ð%r   c                ód   — | j                  | j                  «       | j                  j                  S r   )r$   r   r!   r   s    r   ÚurlzAuthorization.urlw   r&   r   c                óV   — | j                   j                  d| j                  «      \  }}y)z|
        :calls: `DELETE /authorizations/{id} <https://docs.github.com/en/developers/apps/authorizing-oauth-apps>`_
        ÚDELETEN)Ú
_requesterÚrequestJsonAndCheckr5   )r   ÚheadersÚdatas      r   ÚdeletezAuthorization.delete|   s"   € ð Ÿ™×;Ñ;¸HÀdÇhÁhÓO‰ˆ‘r   c                ó  — t        |t        «      st        d„ |D «       «      sJ |«       ‚t        |t        «      st        d„ |D «       «      sJ |«       ‚t        |t        «      st        d„ |D «       «      sJ |«       ‚t        |t        t        f«      sJ |«       ‚t        |t        t        f«      sJ |«       ‚t	        j
                  |||||dœ«      }| j                  j                  d| j                  |¬«      \  }}| j                  |«       y)aI  
        :calls: `PATCH /authorizations/{id} <https://docs.github.com/en/developers/apps/authorizing-oauth-apps>`_
        :param scopes: list of string
        :param add_scopes: list of string
        :param remove_scopes: list of string
        :param note: string
        :param note_url: string
        :rtype: None
        c              3  ó<   K  — | ]  }t        |t        «      –— Œ y ­wr   ©Ú
isinstanceÚstr©Ú.0Úelements     r   Ú	<genexpr>z%Authorization.edit.<locals>.<genexpr>“   s   è ø€ Ð5eÑ^dÐSZ´jÀÌ#×6NÑ^dùó   ‚c              3  ó<   K  — | ]  }t        |t        «      –— Œ y ­wr   r?   rB   s     r   rE   z%Authorization.edit.<locals>.<genexpr>”   s   è ø€ ð :
Ù4>¨ŒJ�w¤×$±JùrF   c              3  ó<   K  — | ]  }t        |t        «      –— Œ y ­wr   r?   rB   s     r   rE   z%Authorization.edit.<locals>.<genexpr>—   s   è ø€ ð =
Ù4A¨ŒJ�w¤×$±MùrF   )r   Ú
add_scopesÚremove_scopesr,   r.   ÚPATCH)ÚinputN)
r@   r
   ÚallrA   r   Úremove_unset_itemsr8   r9   r5   Ú_useAttributes)	r   r   rI   rJ   r,   r.   Úpost_parametersr:   r;   s	            r   ÚeditzAuthorization.edit‚   s  € ô" ˜&¤+Ô.´#Ñ5eÑ^dÓ5eÔ2eÐmÐgmÓmÐeÜ˜*¤kÔ2´cñ :
Ù4>ó:
ô 7
ð 	àó	ð 
ô ˜-¬Ô5¼ñ =
Ù4Aó=
ô :
ð 	àó	ð 
ô ˜$¤¬cÐ 2Ô3Ð9°TÓ9Ð3Ü˜(¤[´#Ð$6Ô7ÐA¸ÓAÐ7ä ×3Ñ3à Ø(Ø!.ØØ$ñó
ˆð Ÿ™×;Ñ;¸GÀTÇXÁXÐUdÐ;Óe‰ˆ�Ø×Ñ˜DÕ!r   c                óB  — 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   «      | _        d|v r| j                  |d   «      | _        d|v r| j	                  |d   «      | _        d	|v r| j                  |d	   «      | _        y y )
Nr%   r(   r*   r,   r.   r   r1   r3   r5   )Ú_makeClassAttributeÚgithubr   r   Ú_makeDatetimeAttributer   Ú_makeIntAttributer   Ú_makeStringAttributer   r   Ú_makeListOfStringsAttributer   r   r   r   )r   Ú
attributess     r   rO   zAuthorization._useAttributesª   s4  € Ø�JÑØ×0Ñ0Ü×/Ñ/×HÑHØ˜5Ñ!óˆDŒIð ˜:Ñ%Ø#×:Ñ:¸:ÀlÑ;SÓTˆDÔØ�:ÑØ×-Ñ-¨j¸Ñ.>Ó?ˆDŒHØ�ZÑØ×2Ñ2°:¸fÑ3EÓFˆDŒJØ˜Ñ#Ø!×6Ñ6°zÀ*Ñ7MÓNˆDŒNØ�zÑ!Ø×;Ñ;¸JÀxÑ<PÓQˆDŒLØ�jÑ Ø×3Ñ3°J¸wÑ4GÓHˆDŒKØ˜:Ñ%Ø#×:Ñ:¸:ÀlÑ;SÓTˆDÔØ�JÑØ×1Ñ1°*¸UÑ2CÓDˆD�Ið r   N)ÚreturnÚNone)rZ   rA   )rZ   r   )rZ   r   )rZ   Úint)rZ   z
str | None)r   úOpt[list[str]]rI   r]   rJ   r]   r,   úOpt[str]r.   r^   rZ   r[   )rY   zdict[str, Any]rZ   r[   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r"   Úpropertyr%   r(   r*   r,   r.   r   r1   r3   r5   r<   r   rQ   rO   © r   r   r   r   5   s#  „ ñó	+ó@ð òó ðð ò&ó ð&ð òó ðð ò ó ð ð ò$ó ð$ð ò"ó ð"ð ò!ó ð!ð ò&ó ð&ð òó ðóPð "(Ø%+Ø(.ØØ#ð&"àð&"ð #ð&"ð &ð	&"ð
 ð&"ð ð&"ð 
ó&"ôPEr   r   )Ú
__future__r   r   Útypingr   r   Úgithub.AuthorizationApplicationrT   Úgithub.GithubObjectr   r   r	   r
   r   ÚGithubObjectÚCompletableGithubObjectr   rd   r   r   Ú<module>rk      s?   ðõP #å ß %ã &Û ß CÓ CáÝHôJE�F×'Ñ'×?Ñ?õ JEr   