
    ,Of                     ^    d dl Zd dlmZmZ d dlmZ d dlmZm	Z	m
Z
 d dlmZ  G d de	      Zy)    N)AnyDict)EnterpriseConsumedLicenses)	AttributeNonCompletableGithubObjectNotSet)	Requesterc                        e Zd ZdZdedef fdZddZdefdZe	defd	       Z
e	defd
       ZdefdZdeeef   ddfdZ xZS )
EnterpriseaP  
    This class represents Enterprises.

    Such objects do not exist in the Github API, so this class merely collects all endpoints the start with
    /enterprises/{enterprise}/. See methods below for specific endpoints and docs.
    https://docs.github.com/en/enterprise-cloud@latest/rest/enterprise-admin?apiVersion=2022-11-28

    	requester
enterprisec                 t    t         j                  j                  |      }t        |   |i |d| dd       y )Nz/enterprises/)r   urlT)urllibparsequotesuper__init__)selfr   r   	__class__s      1lib/python3.12/site-packages/github/Enterprise.pyr   zEnterprise.__init__:   s;    
 \\''
3
BzMZdYeJf(gimn    returnNc                 0    t         | _        t         | _        y N)r   _enterprise_urlr   s    r   _initAttributeszEnterprise._initAttributesB   s    +1$*	r   c                 P    | j                  d| j                  j                  i      S )Nr   )get__repr__r   valuer   s    r   __repr__zEnterprise.__repr__F   s$    t/?/?/E/E FGGr   c                 .    | j                   j                  S r   )r   r"   r   s    r   r   zEnterprise.enterpriseI   s    %%%r   c                 .    | j                   j                  S r   )r   r"   r   s    r   r   zEnterprise.urlM   s    yyr   c                     | j                   j                  d| j                  dz         \  }}d|vr| j                  dz   |d<   t        | j                   ||d      S )z
        :calls: `GET /enterprises/{enterprise}/consumed-licenses <https://docs.github.com/en/enterprise-cloud@latest/rest/enterprise-admin/license#list-enterprise-consumed-licenses>`_
        GETz/consumed-licensesr   T)	completed)
_requesterrequestJsonAndCheckr   r   )r   headersdatas      r   get_consumed_licensesz Enterprise.get_consumed_licensesQ   sY     ;;E488NbCbc((%99DK)$//7DTXYYr   
attributesc                 z    d|v r| j                  |d         | _        d|v r| j                  |d         | _        y y )Nr   r   )_makeStringAttributer   r   )r   r.   s     r   _useAttributeszEnterprise._useAttributes[   sF    :%#88L9QRDJ11*U2CDDI r   )r   N)__name__
__module____qualname____doc__r	   strr   r   r#   propertyr   r   r   r-   r   r   r1   __classcell__)r   s   @r   r   r   0   s    oo o+H# H &C & & S  Z'A ZEc3h ED Er   r   )urllib.parser   typingr   r   !github.EnterpriseConsumedLicensesr   github.GithubObjectr   r   r   github.Requesterr	   r    r   r   <module>r?      s)   P   H M M &/E+ /Er   