Ë
    Ö—Äj<  ã                  ón   — d dl mZ d dlmZmZ d dlZd dlmZm	Z	m
Z
 d dlmZ erd dlmZ  G d„ de	«      Zy)	é    )Úannotations)ÚTYPE_CHECKINGÚAnyN)Ú	AttributeÚ,CompletableGithubObjectWithPaginatedPropertyÚNotSet)ÚPaginatedList)ÚNamedEnterpriseUserc                  óŠ   ‡ — e Zd ZdZd
ˆ fd„Zdd„Zedd„«       Zedd„«       Zedd„«       Z	edd„«       Z
ddd„Zdˆ fd	„Zˆ xZS )ÚEnterpriseConsumedLicensesaÖ  
    This class represents license consumed by enterprises.

    The reference can be found here
    https://docs.github.com/en/enterprise-cloud@latest/rest/enterprise-admin/license#list-enterprise-consumed-licenses

    This class has a `paginated property <https://pygithub.readthedocs.io/en/stable/utilities.html#classes-with-paginated-properties>`_.
    For details, see :meth:`EnterpriseConsumedLicenses.users` or :meth:`EnterpriseConsumedLicenses.get_users`.

    c                ód   •— t         ‰| �  «        t        | _        t        | _        t        | _        y ©N)ÚsuperÚ_initAttributesr   Ú_enterpriseÚ_total_seats_consumedÚ_total_seats_purchased)ÚselfÚ	__class__s    €úfC:\Users\pivot\Documents\cueki\casual-preloader\Lib\site-packages\github/EnterpriseConsumedLicenses.pyr   z*EnterpriseConsumedLicenses._initAttributesB   s&   ø€ Ü‰ÑÔ!Ü+1ˆÔÜ5;ˆÔ"Ü6<ˆÕ#ó    c                óP   — | j                  d| j                  j                  i«      S )NÚ
enterprise)Úget__repr__r   Úvalue©r   s    r   Ú__repr__z#EnterpriseConsumedLicenses.__repr__H   s$   € Ø×Ñ ¨t×/?Ñ/?×/EÑ/EÐ FÓGÐGr   c                ód   — | j                  | j                  «       | j                  j                  S r   )Ú_completeIfNotSetr   r   r   s    r   r   z%EnterpriseConsumedLicenses.enterpriseK   s(   € à×Ñ˜t×/Ñ/Ô0Ø×Ñ×%Ñ%Ð%r   c                ó.   — | j                   j                  S r   )r   r   r   s    r   Útotal_seats_consumedz/EnterpriseConsumedLicenses.total_seats_consumedP   s   € à×)Ñ)×/Ñ/Ð/r   c                ó.   — | j                   j                  S r   )r   r   r   s    r   Útotal_seats_purchasedz0EnterpriseConsumedLicenses.total_seats_purchasedT   s   € à×*Ñ*×0Ñ0Ð0r   c           
     ó¼   — t        t        j                  j                  | j                  | j                  | j
                  dd| j                  | j                  ¬«      S )u2  
        This is a `paginated property <https://pygithub.readthedocs.io/en/stable/utilities.html#classes-with-paginated-properties>`_.

        Iterating over this paginated list may fetch multiple pages. The size of these pages can be controlled via
        the ``â€¦_per_page`` parameter of :meth:`github.Enterprise.Enterprise.get_consumed_licenses`,
        :meth:`github.EnterpriseConsumedLicenses.EnterpriseConsumedLicenses.get_users`, or :meth:`github.Github`.

        If no ``per_page`` is given, the default page size is 30. The maximum is 100.
        NÚusers)ÚheadersÚ	list_itemÚ	firstDataÚfirstHeaders)r	   Úgithubr
   Ú
_requesterÚurlÚ_pagination_parametersÚraw_dataÚraw_headersr   s    r   r%   z EnterpriseConsumedLicenses.usersX   sM   € ô Ü×&Ñ&×:Ñ:Ø�O‰OØ�H‰HØ×'Ñ'ØØØ—m‘mØ×)Ñ)ô	
ð 		
r   c           	     óž   — t        t        j                  j                  | j                  | j                  | j                  d|¬«      dd¬«      S )a’  
        :calls: `GET /enterprises/{enterprise}/consumed-licenses <https://docs.github.com/en/enterprise-cloud@latest/rest/enterprise-admin/license#list-enterprise-consumed-licenses>`_

        Identical to calling :meth:`github.EnterpriseConsumedLicenses.EnterpriseConsumedLicenses.users`, except that this uses the given ``per_page`` value.

        For more details, see :meth:`github.EnterpriseConsumedLicenses.EnterpriseConsumedLicenses.users`.

        :param licence_users_per_page: int Number of users retrieved per page.
               Iterating over the users will fetch pages of this size. The default page size is 30, the maximum is 100.
        é   )ÚpageÚper_pageNr%   )r&   r'   )r	   r*   r
   r+   r,   Ú_pagination_parameters_with)r   Úlicence_users_per_pages     r   Ú	get_usersz$EnterpriseConsumedLicenses.get_usersn   sH   € ô Ü×&Ñ&×:Ñ:Ø�O‰OØ�H‰HØ×,Ñ,°!Ð>TÐ,ÓUØØô
ð 	
r   c                óÔ   •— t         ‰| �  |«       d|v r| j                  |d   «      | _        d|v r| j	                  |d   «      | _        d|v r| j	                  |d   «      | _        y y )Nr   r!   r#   )r   Ú_useAttributesÚ_makeStringAttributer   Ú_makeIntAttributer   r   )r   Ú
attributesr   s     €r   r8   z)EnterpriseConsumedLicenses._useAttributes‚   sw   ø€ Ü‰Ñ˜zÔ*Ø˜:Ñ%Ø#×8Ñ8¸ÀLÑ9QÓRˆDÔØ! ZÑ/Ø)-×)?Ñ)?À
ÐKaÑ@bÓ)cˆDÔ&Ø" jÑ0Ø*.×*@Ñ*@ÀÐLcÑAdÓ*eˆDÕ'ð 1r   )ÚreturnÚNone)r<   Ústr)r<   Úint)r<   ú"PaginatedList[NamedEnterpriseUser]r   )r5   z
int | Noner<   r@   )r;   zdict[str, Any]r<   r=   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úpropertyr   r!   r#   r%   r6   r8   Ú__classcell__)r   s   @r   r   r   6   st   ø„ ñ	õ=óHð ò&ó ð&ð ò0ó ð0ð ò1ó ð1ð ò
ó ð
ô*
÷(fñ fr   r   )Ú
__future__r   Útypingr   r   Úgithub.NamedEnterpriseUserr*   Úgithub.GithubObjectr   r   r   Úgithub.PaginatedListr	   r
   r   © r   r   Ú<module>rM      s1   ðõT #ç %ã !ß _Ñ _Ý .áÝ>ôSfÐ!Mõ Sfr   