
    ,Of                      d dl mZ d dlZd dlmZ d dlmZ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Z	d dl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 d dl
mZmZmZmZmZmZmZmZ d dlmZ erdd dlm Z  d d	l!m"Z" d d
l#m$Z$ d dl%m&Z& d dl'm(Z( d dl)m*Z* d dlm+Z+ d dlm,Z,m-Z-m.Z. d dlm/Z/ d dlm0Z0 d dlm1Z1 d dlm2Z2 d dlm3Z3 d dl4m5Z5 d dlm6Z6 d dlm7Z7  G d de      Z8y)    )annotationsN)datetime)TYPE_CHECKINGAny)Consts)	AttributeCompletableGithubObjectNotSetOpt
is_definedis_optionalis_optional_listis_undefined)PaginatedList)Event)Hook)Installation)Issue)Label)	Migration)	NamedUser)CustomPropertyOrganizationCustomPropertyRepositoryCustomPropertyValues)OrganizationDependabotAlert)OrganizationSecret)OrganizationVariable)Plan)Project)	PublicKey)
Repository)Teamc                     e Zd ZdZdddZdedZedfd       Zeded       Zeded       Z	edgd       Z
edhd       Zedgd	       Zedfd
       Zeded       Zeded       Zedhd       Zedgd       Zeded       Zedhd       Zedhd       Zeded       Zedid       Zedid       Zeded       Zeded       Zedhd       Zeded       Zeded       Zeded       Zedid       Zeded       Zedgd       Z edhd       Z!edjd       Z"edhd        Z#edhd!       Z$eded"       Z%edhd#       Z&eded$       Z'edhd%       Z(edid&       Z)eded'       Z*edfd(       Z+eded)       Z,e-fdkd*Z.dld+Z/e-e-f	 	 	 	 	 	 	 dmd,Z0e-e-e-f	 	 	 	 	 	 	 	 	 	 	 dnd-Z1e-e-f	 	 	 	 	 	 	 	 	 dod.Z2e-fdpd/Z3e-e-e-e-e-e-e-e-e-e-e-e-e-e-e-e-e-e-e-e-e-e-e-e-e-f	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dqd0Z4d1e-d2f	 	 	 	 	 	 	 	 	 	 	 drd3Z5dsdtd4Z6dsdud5Z7e-e-e-e-e-e-e-f	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dvd6Z8d1e-f	 	 	 	 	 	 	 	 	 dwd7Z9dxd8Z:dyd9Z;dzd:Z<e-e-e-e-e-e-e-f	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d{d;Z=e-e-f	 	 	 	 	 	 	 	 	 	 	 d|d<Z>d}d=Z?d~d>Z@dd?ZAdd@ZBddAZCe-e-e-e-e-e-f	 	 	 	 	 	 	 	 	 	 	 	 	 ddBZDe-e-f	 	 	 	 	 ddCZEe-fddDZFddEZGe-fddFZHddGZIddHZJdsddIZKddJZLe-e-e-f	 	 	 	 	 	 	 ddKZMddLZNddMZOddNZPddOZQe-e-e-e-f	 	 	 	 	 	 	 	 	 ddPZRddQZSddRZTddSZUddTZVddUZWdldVZXe-e-f	 	 	 	 	 	 	 ddWZYddXZZddYZ[e-e-e-e-e-e-e-f	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZZ\dd[Z]dd\Z^dd]Z_dd^Z`dd_Zae-f	 	 	 dd`Zb	 	 	 	 	 	 ddaZcddbZdyc)Organizationz
    This class represents Organizations.

    The reference can be found here
    https://docs.github.com/en/rest/reference/orgs

    c                H   t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _	        t         | _
        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _         t         | _!        t         | _"        t         | _#        t         | _$        t         | _%        t         | _&        y N)'r
   _archived_at_default_repository_permission_has_organization_projects_has_repository_projects
_hooks_url_issues_url _members_can_create_repositories_two_factor_requirement_enabled_avatar_url_billing_email_blog_collaborators_company_created_at_description_disk_usage_email_events_url
_followers
_following_gravatar_id	_html_url_id	_location_login_members_url_name_owned_private_repos_plan_private_gists_public_gists_public_members_url_public_repos
_repos_url_total_private_repos_type_updated_at_urlselfs    3lib/python3.12/site-packages/github/Organization.py_initAttributeszOrganization._initAttributes   s#   17>D+;A'9?%*0+1AG-@F,+1.4,2
.4(.06,2+1&,+1*0*0,2)/#))/&,,2%+
4:!&,
.4-339 -3*04:!%+
06$*	    c                P    | j                  d| j                  j                  i      S )Nlogin)get__repr__r?   valuerM   s    rO   __repr__zOrganization.__repr__   s"    $++*;*; <==rQ   c                d    | j                  | j                         | j                  j                  S r&   )_completeIfNotSetr'   rU   rM   s    rO   archived_atzOrganization.archived_at   (    t001  &&&rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r/   rU   rM   s    rO   
avatar_urlzOrganization.avatar_url   (    t//0%%%rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r0   rU   rM   s    rO   billing_emailzOrganization.billing_email   (    t223""(((rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r1   rU   rM   s    rO   blogzOrganization.blog   $    tzz*zzrQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r2   rU   rM   s    rO   collaboratorszOrganization.collaborators   r`   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r3   rU   rM   s    rO   companyzOrganization.company   s$    t}}-}}"""rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r4   rU   rM   s    rO   
created_atzOrganization.created_at   r]   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r(   rU   rM   s    rO   default_repository_permissionz*Organization.default_repository_permission   s(    tBBC22888rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r5   rU   rM   s    rO   descriptionzOrganization.description   rZ   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r6   rU   rM   s    rO   
disk_usagezOrganization.disk_usage   r]   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r7   rU   rM   s    rO   emailzOrganization.email   $    t{{+{{   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r8   rU   rM   s    rO   
events_urlzOrganization.events_url   r]   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r9   rU   rM   s    rO   	followerszOrganization.followers   $    t/$$$rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r:   rU   rM   s    rO   	followingzOrganization.following   rw   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r;   rU   rM   s    rO   gravatar_idzOrganization.gravatar_id  rZ   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r)   rU   rM   s    rO   has_organization_projectsz&Organization.has_organization_projects  s(    t>>?..444rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r*   rU   rM   s    rO   has_repository_projectsz$Organization.has_repository_projects  s(    t<<=,,222rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r+   rU   rM   s    rO   	hooks_urlzOrganization.hooks_url  rw   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r<   rU   rM   s    rO   html_urlzOrganization.html_url  $    t~~.~~###rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r=   rU   rM   s    rO   idzOrganization.id  s"    txx(xx~~rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r,   rU   rM   s    rO   
issues_urlzOrganization.issues_url!  r]   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r>   rU   rM   s    rO   locationzOrganization.location&  r   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r?   rU   rM   s    rO   rS   zOrganization.login+  rr   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r-   rU   rM   s    rO   members_can_create_repositoriesz,Organization.members_can_create_repositories0  s(    tDDE44:::rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r@   rU   rM   s    rO   members_urlzOrganization.members_url5  rZ   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   rA   rU   rM   s    rO   namezOrganization.name:  rc   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   rB   rU   rM   s    rO   owned_private_reposz Organization.owned_private_repos?  (    t889((...rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   rC   rU   rM   s    rO   planzOrganization.planD  rc   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   rD   rU   rM   s    rO   private_gistszOrganization.private_gistsI  r`   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   rE   rU   rM   s    rO   public_gistszOrganization.public_gistsN  (    t112!!'''rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   rF   rU   rM   s    rO   public_members_urlzOrganization.public_members_urlS  s(    t778''---rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   rG   rU   rM   s    rO   public_reposzOrganization.public_reposX  r   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   rH   rU   rM   s    rO   	repos_urlzOrganization.repos_url]  rw   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   rI   rU   rM   s    rO   total_private_reposz Organization.total_private_reposb  r   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   r.   rU   rM   s    rO   two_factor_requirement_enabledz+Organization.two_factor_requirement_enabledg  s(    tCCD33999rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   rJ   rU   rM   s    rO   typezOrganization.typel  rc   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   rK   rU   rM   s    rO   
updated_atzOrganization.updated_atq  r]   rQ   c                d    | j                  | j                         | j                  j                  S r&   )rX   rL   rU   rM   s    rO   urlzOrganization.urlv  s"    tyy)yyrQ   c                *   t        |t              sJ |       t        |t        j                  j                        sJ |       t        j                  d|i      }| j                  j                  d| j                   d|j                   |      \  }}y)z
        :calls: `PUT /orgs/{org}/memberships/{user} <https://docs.github.com/en/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user>`_
        rolePUT/memberships/inputN)r   str
isinstancegithubr   r
   remove_unset_items
_requesterrequestJsonAndCheckr   	_identity)rN   memberr   put_parametersheadersdatas         rO   add_to_memberszOrganization.add_to_members{  s     4%+t+%&&"2"2"<"<=EvE=22FD>B;;dhhZ}V-=-=,>?~ < 
rQ   c                    t        |t        j                  j                        sJ |       | j                  j	                  d| j
                   d|j                         \  }}y)z{
        :calls: `PUT /orgs/{org}/public_members/{user} <https://docs.github.com/en/rest/reference/orgs#members>`_
        r   /public_members/Nr   r   r   r   r   r   r   rN   public_memberr   r   s       rO   add_to_public_membersz"Organization.add_to_public_members  sY     -)9)9)C)CDSmSD;;dhhZ/0G0G/HI
rQ   c                    t        |t        j                  j                        sJ |       |j                  | ||      S )zu
        :calls: `POST /repos/{owner}/{repo}/forks <https://docs.github.com/en/rest/reference/repos#forks>`_
        )r   default_branch_only)r   r   r!   create_fork)rN   repor   r   s       rO   r   zOrganization.create_fork  sF     $ 1 1 < <=CtC= 3   
 	
rQ   c                F   t        |t              sJ |       t        |t        j                  j                        sJ |       t	        |t              sJ |       t	        |t
              sJ |       t	        |t
              sJ |       t        j                  || j                  |||d      }| j                  j                  dd|j                  j                   d|j                   d|ddi      \  }}t        j                  j                  | j                  ||d	
      S )zself.name
        :calls: `POST /repos/{template_owner}/{template_repo}/generate <https://docs.github.com/en/rest/reference/repos#create-a-repository-using-a-template>`_
        )r   ownerrm   include_all_branchesprivatePOST/repos//z	/generateAcceptzapplication/vnd.github.v3+jsonr   r   T	completed)r   r   r   r!   r   boolr
   r   rS   r   r   r   r   )	rN   r   r   rm   r   r   post_parametersr   r   s	            rO   create_repo_from_templatez&Organization.create_repo_from_template  s    $$*d*$$ 1 1 < <=CtC=;,9k9,/6L8LL67D)272)*0*C*C*(<"+
 ;;djj&&'q9=!?@	 < 
   ++DOOWdVZ+[[rQ   c                   t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t	        |t
              sJ |       t        j                  ||||d      }| j                  j                  d| j                   d|      \  }}t        j                  j                  | j                  ||d      S )a  
        :calls: `POST /orgs/{owner}/hooks <https://docs.github.com/en/rest/reference/orgs#webhooks>`_
        :param name: string
        :param config: dict
        :param events: list of string
        :param active: bool
        :rtype: :class:`github.Hook.Hook`
        r   configeventsactiver   /hooksr   Tr   )r   r   dictr   r   r   r
   r   r   r   r   r   r   )rN   r   r   r   r   r   r   r   s           rO   create_hookzOrganization.create_hook  s     $$*d*$&$'//',4f4,64(0&0(*0*C*C   	+
 ;;FtxxjPVDW_n;o{{$$OOrQ   c                f   t        |t              sJ |       t        |t              sJ |       t        j                  ||d      }| j
                  j                  d| j                   d|dt        j                  i      \  }}t        j                  j                  | j
                  ||d      S )z
        :calls: `POST /orgs/{org}/projects <https://docs.github.com/en/rest/reference/projects#create-an-organization-project>`_
        )r   bodyr   	/projectsr   r   Tr   )r   r   r   r
   r   r   r   r   r   mediaTypeProjectsPreviewr   r   )rN   r   r   r   r   r   s         rO   create_projectzOrganization.create_project  s     $$*d*$4%+t+%*0*C*CT[_D`*a;;xxj	"!v>>?	 < 
 ~~%%doowPT%UUrQ   c                
   t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |	t              sJ |	       t        |
t              sJ |
       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       |ddt
        fv sJ |       |dddt
        fv sJ |       |ddt
        fv sJ |       |dddt
        fv sJ |       t        |t              sJ |       t        j                  i d|d|d	|d
|d|d|d|d|d|	d|
d|d|d|d|d|d|d||||||||||d	      }| j                  j                  d| j                   d|dt        j                  i      \  }}t        j                  j                  | j                  ||d      S )ze
        :calls: `POST /orgs/{org}/repos <https://docs.github.com/en/rest/reference/repos>`_
        PR_TITLECOMMIT_OR_PR_TITLEPR_BODYCOMMIT_MESSAGESBLANKMERGE_MESSAGEr   rm   homepager   
visibility
has_issueshas_wikihas_downloadshas_projectsteam_id	auto_initlicense_templategitignore_templateallow_squash_mergeallow_merge_commitallow_rebase_mergedelete_branch_on_merge)	allow_update_branchis_templateallow_auto_mergeuse_squash_pr_title_as_defaultsquash_merge_commit_titlesquash_merge_commit_messagemerge_commit_titlemerge_commit_messagecustom_propertiesr   /reposr   r   Tr   )r   r   r   r   intr
   r   r   r   r   r   r   repoVisibilityPreviewr   r!   )rN   r   rm   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s                                 rO   create_repozOrganization.create_repo  s   @ $$*d*$;,9k9,8S)383)7D)272):s+7Z7+:t,8j8,8T*4H4*=$/>>/<.<<.7C(1'1(9d+6Y6++S1C3CC1-s3G5GG3-t4H6HH4-t4H6HH4-t4H6HH4148P:PP8.5J7JJ5;-:{:-+T2D4DD294@`B``@(Z9Mv,VVqXqqV*	/
 
 	'
 '	' 
 "j/6%JJ^L^^J#
Iw'OOeQeeO,d3F5FF3 33{ H 7	
 j j H    7 Y #$4 %&8 %&8 %&8  %&8!" )*@#$ (;*$42P-F/J&8(<%65
> ;;xxj!v;;<	 < 
   ++DOOWdVZ+[[rQ   allactionsc                N   t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t        j                  j                        sJ |       |dv sJ d       |dk(  r)t        |t
              rt        d |D              sJ |       |t        u sJ | j                  |      }|j                  |      }|j                  ||d}t        |      rM|dk(  r|D 	cg c]  }	|	j                   c}	|d<   |d	k(  r&|D 	cg c]  }	t        |	j                         c}	|d<   | j                  j                  d
| j                   d| dt         j"                  j%                  |       |       t        j&                  j'                  | j                  i ||| j                   d| dt         j"                  j%                  |       d| j                   d| dt         j"                  j%                  |       dd      S c c}	w c c}	w )a  
        :param secret_name: string name of the secret
        :param unencrypted_value: string plain text value of the secret
        :param visibility: string options all or selected
        :param selected_repositories: list of repositrories that the secret will be available in
        :param secret_type: string options actions or dependabot

        :calls: `PUT /orgs/{org}/{secret_type}/secrets/{secret_name} <https://docs.github.com/en/rest/actions/secrets#create-or-update-an-organization-secret>`_
        r  
dependabot+secret_type should be actions or dependabotselectedc              3  d   K   | ](  }t        |t        j                  j                         * y wr&   r   r   r!   .0elements     rO   	<genexpr>z-Organization.create_secret.<locals>.<genexpr>m  *      CFM
7F$5$5$@$@AC   .0)secret_type)key_idencrypted_valuer   r  selected_repository_idsr	  r   r   	/secrets/r   /repositories)r   r   selected_repositories_urlr   F	requesterr   
attributesr   )r   r   r   r   r!   listr  r
   get_public_keyencryptr  r   r   r   r   r   urllibparsequoter   )
rN   secret_nameunencrypted_valuer   selected_repositoriesr  
public_keypayloadr   r  s
             rO   create_secretzOrganization.create_secretU  s7   " +s+8[8++S1D3DD1*c*6J6* 5v7H7H7S7STkVkkT77f9ff7#3T:s CQfC @ %$%  )F222(([(A
$$%67 ''&$*

 +, i'Wl<mGWZZ<m89l*\q<rQXS_<r89++dhhZqYv||7I7I+7V6WX`n 	, 	
 ((;;oo#(04z;-yQWQ]Q]QcQcdoQpPqq~-((1[M6<<;M;Mk;Z:[\	  < 

 
	
 =n<rs   ;HH"c                    |dv sJ d       t        t        j                  j                  | j                  | j                   d| ddd      S )z
        Gets all organization secrets :param secret_type: string options actions or dependabot :rtype:

        :class:`PaginatedList` of :class:`github.OrganizationSecret.OrganizationSecret`

        r  r
  r   z/secretsNsecrets	list_item)r   r   r   r   r   )rN   r  s     rO   get_secretszOrganization.get_secrets  sV     77f9ff7%%88OOxxj+h/
 	
rQ   c                   t        |t              sJ |       |dv sJ d       t        j                  j                  | j                  i d| j
                   d| dt        j                  j                  |       id      S )a>  
        :calls: 'GET /orgs/{org}/{secret_type}/secrets/{secret_name} <https://docs.github.com/en/rest/actions/secrets#get-an-organization-secret>`_
        :param secret_name: string
        :param secret_type: string options actions or dependabot
        :rtype: github.OrganizationSecret.OrganizationSecret
        r  r
  r   r   r  Fr  )	r   r   r   r   r   r   r!  r"  r#  )rN   r$  r  s      rO   
get_secretzOrganization.get_secret  s     +s+8[8+77f9ff7((;;oo$((1[M6<<CUCUVaCbBcde	 < 
 	
rQ   c	           
        t        |t              sJ |       t        |t        j                  j                        sJ |       t        |t
              sJ |       t        |t
              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       |ddt        fv sJ |       t        j                  |||||||d      }	t        |      r|D 
cg c]  }
|
j                   c}
|	d<   | j                  j                  d| j                   d|	      \  }}t        j                  j                  | j                  ||d	      S c c}
w )
a  
        :calls: `POST /orgs/{org}/teams <https://docs.github.com/en/rest/reference/teams#list-teams>`_
        :param name: string
        :param repo_names: list of :class:`github.Repository.Repository`
        :param permission: string
        :param privacy: string
        :param description: string
        :param parent_team_id: integer
        :param maintainers: list of: integer
        :param notification_setting: string
        :rtype: :class:`github.Team.Team`
        notifications_enablednotifications_disabled)r   
permissionprivacyrm   parent_team_idmaintainersnotification_setting
repo_namesr   /teamsr   Tr   )r   r   r   r   r!   r  r   r
   r   r   r   r   r   r   r"   )rN   r   r9  r4  r5  rm   r6  r7  r8  r   r  r   r   s                rO   create_teamzOrganization.create_team  sd   . $$*d*$
F,=,=,H,HIU:UIS1>;>1>3/??/:s+7Z7+7C(1'1(;,9k9,#(?AY[a'bbxdxxb*0*C*C("*"0*(<
+
 j!NX,Y7W->->,YOL);;FtxxjPVDW_n;o{{$$OO -Zs   4E(c                   t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       |dk(  r)t        |t              rt        d |D              sJ |       |t        u sJ |||d}t        |      r|D cg c]  }|j                   c}|d<   | j                  j                  d| j                   d|       t        j                  j                  | j                  i |||| j                   dt        j                  j                  |       d	| j                  d
d      S c c}w )a  
        :calls: `POST /orgs/{org}/actions/variables/ <https://docs.github.com/en/rest/actions/variables#create-an-organization-variable>`_
        :param variable_name: string
        :param value: string
        :param visibility: string
        :param selected_repositories: list of :class:`github.Repository.Repository`
        :rtype: github.OrganizationVariable.OrganizationVariable
        r  c              3  d   K   | ](  }t        |t        j                  j                         * y wr&   r  r  s     rO   r  z/Organization.create_variable.<locals>.<genexpr>  r  r  )r   rU   r   r  r   /actions/variablesr   /actions/variables/r  )r   r   rU   r  r   Fr  )r   r   r  r  r
   r   r   r   r   r   r   r   r!  r"  r#  )rN   variable_namerU   r   r&  r   r  s          rO   create_variablezOrganization.create_variable  s\    --<}<-%%,u,%*c*6J6*#3T:s CQfC @ %$%  )F222 "$+

 +,Ti9j'**9jO56++Ftxxj@R4S[j+k**??oo%(04z9LV\\M_M_`mMnLoo|-}xx  @ 
 	
	 :ks   Ec                    t        t        j                  j                  | j                  | j                   ddd      S )z
        Gets all organization variables :rtype: :class:`PaginatedList` of
        :class:`github.OrganizationVariable.OrganizationVariable`
        r>  N	variablesr,  )r   r   r   r   r   rM   s    rO   get_variableszOrganization.get_variables  s<    
 ''<<OOxxj*+!
 	
rQ   c           
         t        |t              sJ |       t        j                  j                  | j                  i d| j
                   dt        j                  j                  |       id      S )a  
        :calls: 'GET /orgs/{org}/actions/variables/{variable_name} <https://docs.github.com/en/rest/actions/variables#get-an-organization-variable>`_
        :param variable_name: string
        :rtype: github.OrganizationVariable.OrganizationVariable
        r   r?  Fr  )	r   r   r   r   r   r   r!  r"  r#  )rN   r@  s     rO   get_variablezOrganization.get_variable  sn     --<}<-**??oo$((+>v||?Q?QR_?`>abc	 @ 
 	
rQ   c                    t        |t              sJ |       | j                  j                  d| j                   d|       \  }}y)z
        :calls: `DELETE /orgs/{owner}/hooks/{id} <https://docs.github.com/en/rest/reference/orgs#webhooks>`_
        :param id: integer
        :rtype: None`
        DELETE/hooks/N)r   r  r   r   r   rN   r   r   r   s       rO   delete_hookzOrganization.delete_hook-  sE     "c"&B&";;H
RYZ\Y]F^_rQ   c           
        t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        j                  |||||||d      }| j                  j                  d| j                  |      \  }	}
| j                  |
       y)z_
        :calls: `PATCH /orgs/{org} <https://docs.github.com/en/rest/reference/orgs>`_
        )r_   rb   rg   rm   rq   r   r   PATCHr   N)r   r   r
   r   r   r   r   _useAttributes)rN   r_   rb   rg   rm   rq   r   r   r   r   r   s              rO   editzOrganization.edit6  s     =#.==.4%+t+%7C(1'1(;,9k9,5#&--&8S)383)4%+t+% 33!."*$

 ;;GTXXUd;eD!rQ   c                   t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t	        |t              sJ |       t        |t              sJ |       t        j                  ||||d      }| j                  j                  d| j                   d| |      \  }}t        j                  j                  | j                  ||d      S )zu
        :calls: `PATCH /orgs/{owner}/hooks/{id} <https://docs.github.com/en/rest/reference/orgs#webhooks>`_
        r   rM  rI  r   Tr   )r   r  r   r   r   r   r   r
   r   r   r   r   r   r   )	rN   r   r   r   r   r   r   r   r   s	            rO   	edit_hookzOrganization.edit_hookY  s     "c"&B&"$$*d*$&$'//',4f4,64(0&0(*0*C*CVvP+
 ;;GzQXY[X\E]et;u{{$$OOrQ   c                |    t        t        j                  j                  | j                  | j                   dd      S )z
        :calls: `GET /orgs/{org}/events <https://docs.github.com/en/rest/reference/activity#events>`_
        :rtype: :class:`PaginatedList` of :class:`github.Event.Event`
        z/eventsN)r   r   r   r   r   rM   s    rO   
get_eventszOrganization.get_eventsp  s/    
 V\\//TXXJgBVX\]]rQ   c                    t        |t              sJ |       | j                  j                  d| j                   d|       \  }}t
        j                  j                  | j                  ||d      S )zs
        :calls: `GET /orgs/{owner}/hooks/{id} <https://docs.github.com/en/rest/reference/orgs#webhooks>`_
        GETrI  Tr   )r   r  r   r   r   r   r   rJ  s       rO   get_hookzOrganization.get_hookw  sf     "c"&B&";;EdhhZwWYVZC[\{{$$OOrQ   c                |    t        t        j                  j                  | j                  | j                   dd      S )zn
        :calls: `GET /orgs/{owner}/hooks <https://docs.github.com/en/rest/reference/orgs#webhooks>`_
        r   N)r   r   r   r   r   rM   s    rO   	get_hookszOrganization.get_hooks  /     V[[--t488*F@SUYZZrQ   c                   t        |t              sJ |       t        |t              sJ |       | j                  j                  d| j                   d| d|       \  }}t
        j                  j                  | j                  ||d      S )a9  
        :calls: `GET /orgs/{owner}/hooks/{hook_id}/deliveries/{delivery_id} <https://docs.github.com/en/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook>`_
        :param hook_id: integer
        :param delivery_id: integer
        :rtype: :class:`github.HookDelivery.HookDelivery`
        rU  rI  z/deliveries/Tr   )r   r  r   r   r   r   HookDelivery)rN   hook_iddelivery_idr   r   s        rO   get_hook_deliveryzOrganization.get_hook_delivery  s     '3'00'+s+8[8+;;dhhZwwi|K=I
 ""//$Z^/__rQ   c                    t        |t              sJ |       t        t        j                  j
                  | j                  | j                   d| dd      S )a!  
        :calls: `GET /orgs/{owner}/hooks/{hook_id}/deliveries <https://docs.github.com/en/rest/reference/orgs#list-deliveries-for-an-organization-webhook>`_
        :param hook_id: integer
        :rtype: :class:`PaginatedList` of :class:`github.HookDelivery.HookDeliverySummary`
        rI  z/deliveriesN)r   r  r   r   r[  HookDeliverySummaryr   r   )rN   r\  s     rO   get_hook_deliveriesz Organization.get_hook_deliveries  sS     '3'00'33OOxxjy4	
 	
rQ   c                v   t        |t              sJ |       t        |t              sJ |       t        |t        j                  j                        sJ |       t        |t              sJ |       t        |t              sJ |       t        |t
              sJ |       t        j                  ||||d      }t        |      rdj                  d |D              |d<   t        |      r|j                  d      |d<   t        t        j                  j                  | j                  | j                   d|      S )a  
        :calls: `GET /orgs/{org}/issues <https://docs.github.com/en/rest/reference/issues>`_
        :rtype: :class:`PaginatedList` of :class:`github.Issue.Issue`
        :param filter: string
        :param state: string
        :param labels: list of :class:`github.Label.Label`
        :param sort: string
        :param direction: string
        :param since: datetime
        :rtype: :class:`PaginatedList` of :class:`github.Issue.Issue`
        )filterstatesort	direction,c              3  4   K   | ]  }|j                     y wr&   )r   )r  labels     rO   r  z*Organization.get_issues.<locals>.<genexpr>  s     /Ou

/Os   labelsz%Y-%m-%dT%H:%M:%SZsincez/issues)r   r   r   r   r   r   r
   r   r   joinstrftimer   r   r   r   )rN   rc  rd  rj  re  rf  rk  url_parameterss           rO   
get_issueszOrganization.get_issues  s   ( 63'//'5#&--&(:(:;CVC;4%+t+%9c*5I5*5(+2U2+)/)B)Bt)T*
 f'*xx/O/O'ON8$e&+nn5I&JN7#V\\//TXXJgBVXfggrQ   c                   t        |t              sJ |       t        |t              sJ |       t        j                  ||d      }t	        t
        j                  j                  | j                  | j                   d|      S )zm
        :calls: `GET /orgs/{org}/members <https://docs.github.com/en/rest/reference/orgs#members>`_
        )rc  r   z/members	r   r   r
   r   r   r   r   r   r   )rN   filter_r   rn  s       rO   get_memberszOrganization.get_members  sw     7C(1'1(4%+t+%22gt3TU&&OOxxj!	
 	
rQ   c                    t        j                  d|i      }t        t        j                  j                  | j
                  | j                   d|dt        j                  i      S )z
        :calls: `GET /orgs/{org}/projects <https://docs.github.com/en/rest/reference/projects#list-organization-projects>`_
        rd  r   r   )	r
   r   r   r   r   r   r   r   r   )rN   rd  rn  s      rO   get_projectszOrganization.get_projects  sY    
  22GU3CDNN""OOxxj	"v667
 	
rQ   c                |    t        t        j                  j                  | j                  | j                   dd      S )z
        :calls: `GET /orgs/{org}/public_members <https://docs.github.com/en/rest/reference/orgs#members>`_
        :rtype: :class:`PaginatedList` of :class:`github.NamedUser.NamedUser`
        z/public_membersN)r   r   r   r   r   rM   s    rO   get_public_memberszOrganization.get_public_members  s8    
 &&OOxxj(	
 	
rQ   c                    t        |t              sJ |       t        j                  d|i      }t	        t
        j                  j                  | j                  | j                   d|      S )z
        :calls: `GET /orgs/{org}/outside_collaborators <https://docs.github.com/en/rest/reference/orgs#outside-collaborators>`_
        rc  z/outside_collaboratorsrq  )rN   rr  rn  s      rO   get_outside_collaboratorsz&Organization.get_outside_collaborators  sc     7C(1'1(22Hg3FG&&OOxxj./	
 	
rQ   c                    t        |t        j                  j                        sJ |       | j                  j	                  d| j
                   d|j                         \  }}y)z
        :calls: `DELETE /orgs/{org}/outside_collaborators/{username} <https://docs.github.com/en/rest/reference/orgs#outside-collaborators>`_
        :param collaborator: :class:`github.NamedUser.NamedUser`
        :rtype: None
        rH  /outside_collaborators/Nr   )rN   collaboratorr   r   s       rO   remove_outside_collaboratorz(Organization.remove_outside_collaborator  sY     ,(8(8(B(BCQ\QC;;
"9,:P:P9QR
rQ   c                    t        |t        j                  j                        sJ |       | j                  j	                  d| j
                   d|j                         \  }}y)z
        :calls: `PUT /orgs/{org}/outside_collaborators/{username} <https://docs.github.com/en/rest/reference/orgs#outside-collaborators>`_
        :param member: :class:`github.NamedUser.NamedUser`
        :rtype: None
        r   r{  Nr   rN   r   r   r   s       rO   convert_to_outside_collaboratorz,Organization.convert_to_outside_collaborator  sY     &&"2"2"<"<=EvE=;;dhhZ6v7G7G6HI
rQ   c                    | j                   j                  d| j                   d| d      \  }}t        j                  j	                  | j                   ||d      S )a  
        :calls: `GET /orgs/{org}/{secret_type}/secrets/public-key <https://docs.github.com/en/rest/reference/actions#get-an-organization-public-key>`_
        :param secret_type: string options actions or dependabot
        :rtype: :class:`github.PublicKey.PublicKey`
        rU  r   z/secrets/public-keyTr   )r   r   r   r   r    )rN   r  r   r   s       rO   r  zOrganization.get_public_key  sW     ;;EdhhZqQ\P]]pCqr))$//7DTX)YYrQ   c                J   t        |t              sJ |       t        j                  j	                  |      }| j
                  j                  dd| j                   d| dt        j                  i      \  }}t        j                  j                  | j
                  ||d      S )z
        :calls: `GET /repos/{owner}/{repo} <https://docs.github.com/en/rest/reference/repos>`_
        :param name: string
        :rtype: :class:`github.Repository.Repository`
        rU  r   r   r   r   Tr   )r   r   r!  r"  r#  r   r   rS   r   r  r   r!   )rN   r   r   r   s       rO   get_repozOrganization.get_repo   s     $$*d*$||!!$';;djj\4&)v;;< < 

   ++DOOWdVZ+[[rQ   c                \   t        |t              sJ |       t        |t              sJ |       t        |t              sJ |       t        j                  |||d      }t	        t
        j                  j                  | j                  | j                   d|dt        j                  i      S )a5  
        :calls: `GET /orgs/{org}/repos <https://docs.github.com/en/rest/reference/repos>`_
        :param type: string ('all', 'public', 'private', 'forks', 'sources', 'member')
        :param sort: string ('created', 'updated', 'pushed', 'full_name')
        :param direction: string ('asc', desc')
        )r   re  rf  r  r   r  )r   r   r
   r   r   r   r!   r   r   r   r  )rN   r   re  rf  rn  s        rO   	get_reposzOrganization.get_repos/  s     4%+t+%4%+t+%9c*5I5*22D$]f3gh((OOxxjv;;<
 	
rQ   c                    t        |t              sJ |       | j                  j                  dd|       \  }}t        j
                  j                  | j                  ||d      S )z^
        :calls: `GET /teams/{id} <https://docs.github.com/en/rest/reference/teams>`_
        rU  /teams/Tr   )r   r  r   r   r   r"   rJ  s       rO   get_teamzOrganization.get_teamI  s[     "c"&B&";;EWRD>R{{$$OOrQ   c                $   t        |t              sJ |       t        j                  j	                  |      }| j
                  j                  d| j                   d|       \  }}t        j                  j                  | j
                  ||d      S )z
        :calls: `GET /orgs/{org}/teams/{team_slug} <https://docs.github.com/en/rest/reference/teams#get-a-team-by-name>`_
        rU  r  Tr   )
r   r   r!  r"  r#  r   r   r   r   r"   )rN   slugr   r   s       rO   get_team_by_slugzOrganization.get_team_by_slugQ  sz     $$*d*$||!!$';;EdhhZwW[V\C]^{{$$OOrQ   c                |    t        t        j                  j                  | j                  | j                   dd      S )zo
        :calls: `GET /orgs/{org}/teams <https://docs.github.com/en/rest/reference/teams#list-teams>`_
        r:  N)r   r   r"   r   r   rM   s    rO   	get_teamszOrganization.get_teamsZ  rY  rQ   c                    t        t        j                  j                  | j                  | j                   dddt
        j                  i      S )zq
        :calls: `GET /orgs/{org}/invitations <https://docs.github.com/en/rest/reference/orgs#members>`_
        /invitationsNr   r  )r   r   r   r   r   r   &mediaTypeOrganizationInvitationPreviewrM   s    rO   invitationszOrganization.invitations`  sF     &&OOxxj%vLLM
 	
rQ   c                   t        |t        j                  j                        sJ |       t        |t              sJ |       t	        |      t	        |      k7  sJ d       t        |      s|dv sJ |       t        |t        j                  j                        sJ |       t        j                  ||d      }t	        |      r|j                  |d<   t	        |      r|D cg c]  }|j                   c}|d<   | j                  j                  d| j                   ddt        j                  i|	      \  }}y
c c}w )a2  
        :calls: `POST /orgs/{org}/invitations <https://docs.github.com/en/rest/reference/orgs#members>`_
        :param user: :class:`github.NamedUser.NamedUser`
        :param email: string
        :param role: string
        :param teams: array of :class:`github.Team.Team`
        :rtype: None
        z!specify only one of email or user)admindirect_memberbilling_manager)rq   r   
invitee_idteam_idsr   r  r   )r   r   N)r   r   r   r   r   r   r   r"   r
   r   r   r   r   r   r   r  )	rN   userrq   r   teams
parameterstr   r   s	            rO   invite_userzOrganization.invite_userl  s$    4!1!1!;!;<BdB<5#&--&% Jt$44Y6YY4D!T-Z%Z`\``Zv{{'7'78?%?8%+%>%>X\?]%^
d'+wwJ|$e49%:qadd%:Jz";;xxj%vLLM	 < 
 &;s   #D<c                    t        |t        j                  j                        sJ |       | j                  j	                  d| j
                   d|j                         \  }}}|dk(  S )z
        :calls: `DELETE /orgs/{org}/invitations/{invitation_id} <https://docs.github.com/en/rest/reference/orgs#cancel-an-organization-invitation>`_
        :param invitee: :class:`github.NamedUser.NamedUser`
        :rtype: None
        rH  z/invitations/   )r   r   r   r   requestJsonr   r   )rN   inviteestatusr   r   s        rO   cancel_invitationzOrganization.cancel_invitation  sd     '6#3#3#=#=>GG> $ ; ;H
R_`g`j`j_kFl m}rQ   c                $   t        |t        j                  j                        sJ |       | j                  j	                  d| j
                   d|j                         \  }}}|dk(  r#| j                  j	                  d|d         \  }}}|dk(  S )z
        :calls: `GET /orgs/{org}/members/{user} <https://docs.github.com/en/rest/reference/orgs#members>`_
        :param member: :class:`github.NamedUser.NamedUser`
        :rtype: bool
        rU  	/members/i.  r   r  r   r   r   r   r  r   r   )rN   r   r  r   r   s        rO   has_in_memberszOrganization.has_in_members  s     &&"2"2"<"<=EvE= $ ; ;EdhhZyY_YiYiXjCk lS=$(OO$?$?wzGZ$[!FGT}rQ   c                    t        |t        j                  j                        sJ |       | j                  j	                  d| j
                   d|j                         \  }}}|dk(  S )z
        :calls: `GET /orgs/{org}/public_members/{user} <https://docs.github.com/en/rest/reference/orgs#members>`_
        :param public_member: :class:`github.NamedUser.NamedUser`
        :rtype: bool
        rU  r   r  r  )rN   r   r  r   r   s        rO   has_in_public_membersz"Organization.has_in_public_members  sh     -)9)9)C)CDSmSD $ ; ;dhhZ/0G0G/HI!
 }rQ   c                    t        |t        j                  j                        sJ |       | j                  j	                  d| j
                   d|j                         \  }}y)z
        :calls: `DELETE /orgs/{org}/memberships/{user} <https://docs.github.com/en/rest/reference/orgs#remove-an-organization-member>`_
        :param member: :class:`github.NamedUser.NamedUser`
        :rtype: None
        rH  r   Nr   r  s       rO   remove_from_membershipz#Organization.remove_from_membership  sW     &&"2"2"<"<=EvE=;;H
R_`f`p`p_qFrsrQ   c                    t        |t        j                  j                        sJ |       | j                  j	                  d| j
                   d|j                         \  }}y)z
        :calls: `DELETE /orgs/{org}/members/{user} <https://docs.github.com/en/rest/reference/orgs#members>`_
        :param member: :class:`github.NamedUser.NamedUser`
        :rtype: None
        rH  r  Nr   r  s       rO   remove_from_membersz Organization.remove_from_members  sW     &&"2"2"<"<=EvE=;;H
R[\b\l\l[mFnorQ   c                    t        |t        j                  j                        sJ |       | j                  j	                  d| j
                   d|j                         \  }}y)z
        :calls: `DELETE /orgs/{org}/public_members/{user} <https://docs.github.com/en/rest/reference/orgs#members>`_
        :param public_member: :class:`github.NamedUser.NamedUser`
        :rtype: None
        rH  r   Nr   r   s       rO   remove_from_public_membersz'Organization.remove_from_public_members  sY     -)9)9)C)CDSmSD;;
"2=3J3J2KL
rQ   c                   t        |t        t        f      sJ |       t        d |D              sJ |       t	        |t
              sJ |       t	        |t
              sJ |       t        j                  |||d      }| j                  j                  dd| j                   d|dt        j                  i      \  }}t        j                  j                  | j                  ||d	      S )
a;  
        :calls: `POST /orgs/{org}/migrations <https://docs.github.com/en/rest/reference/migrations#list-organization-migrations>`_
        :param repos: list or tuple of str
        :param lock_repositories: bool
        :param exclude_attachments: bool
        :rtype: :class:`github.Migration.Migration`
        c              3  <   K   | ]  }t        |t                y wr&   r   r   r  r   s     rO   r  z0Organization.create_migration.<locals>.<genexpr>  s     ;T:dC(;   )repositorieslock_repositoriesexclude_attachmentsr   /orgs//migrationsr   r   Tr   )r   r  tupler  r   r   r
   r   r   r   rS   r   mediaTypeMigrationPreviewr   r   )rN   reposr  r  r   r   r   s          rO   create_migrationzOrganization.create_migration  s     %$/66/;U;;BUB;,d3F5FF3.5J7JJ5 33 %%6':
 ;;TZZL,!v??@	 < 
 ))$//7DTX)YYrQ   c                    t        t        j                  j                  | j                  d| j                   dddt
        j                  i      S )z
        :calls: `GET /orgs/{org}/migrations <https://docs.github.com/en/rest/reference/migrations#list-organization-migrations>`_
        :rtype: :class:`PaginatedList` of :class:`github.Migration.Migration`
        r  r  Nr   r  )r   r   r   r   rS   r   r  rM   s    rO   get_migrationszOrganization.get_migrations  sH    
 &&OOTZZL,v??@
 	
rQ   c                    t        t        j                  j                  | j                  | j                   dddd      S )z
        :calls: `GET /orgs/{org}/installations <https://docs.github.com/en/rest/reference/orgs#list-app-installations-for-an-organization>`_
        :rtype: :class:`PaginatedList` of :class:`github.Installation.Installation`
        z/installationsNinstallationsr,  )r   r   r   r   r   rM   s    rO   get_installationszOrganization.get_installations  s>     ,,OOxxj'%
 	
rQ   c           
        g d}g d}	g d}
ddg}ddg}dd	g}||t         gz   v sJ d
dj                  |              ||	t         gz   v sJ ddj                  |	              ||
t         gz   v sJ ddj                  |
              ||t         gz   v sJ ddj                  |              ||t         gz   v sJ ddj                  |              ||t         gz   v sJ ddj                  |              t        j                  |||||||d      }t        t        j
                  j
                  | j                  | j                   d|      S )a  
        :calls: `GET /orgs/{org}/dependabot/alerts <https://docs.github.com/en/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization>`_
        :param state: Optional string
        :param severity: Optional string
        :param ecosystem: Optional string
        :param package: Optional string
        :param scope: Optional string
        :param sort: Optional string
        :param direction: Optional string
        :rtype: :class:`PaginatedList` of :class:`github.DependabotAlert.DependabotAlert`
        )auto_dismissed	dismissedfixedopen)lowmediumhighcritical)	composergomavennpmnugetpippubrubygemsrustdevelopmentruntimecreatedupdatedascdesczState can be one of z, zSeverity can be one of zEcosystem can be one of zScope can be one of zSort can be one of zDirection can be one of )rd  severity	ecosystempackagescopere  rf  z/dependabot/alerts)r
   rl  r   r   r   r   r   r   )rN   rd  r  r  r  r  re  rf  allowed_statesallowed_severitiesallowed_ecosystemsallowed_scopesallowed_sortsallowed_directionsrn  s                  rO   get_dependabot_alertsz"Organization.get_dependabot_alerts  s   * JBj'3"I.#V_&11e5I$))TbJcId3ee1-88s<STXT]T]^pTqSr:ss8.&99u=UVZV_V_`rVsUt;uu9&11e5I$))TbJcId3ee1}x//a3FtyyQ^G_F`1aa/.&99u=UVZV_V_`rVsUt;uu922$&"&

 ..JJOOxxj*+	
 	
rQ   c                ~    t        t        j                  j                  | j                  | j                   dd      S )a  
        :calls: `GET /orgs/{org}/properties/schema <https://docs.github.com/en/rest/orgs/custom-properties#get-all-custom-properties-for-an-organization>`_
        :rtype: :class:`PaginatedList` of :class:`github.OrganizationCustomProperty.OrganizationCustomProperty`
        /properties/schemaNcontentClassr  firstUrlfirstParams)r   r   r   r   r   rM   s    rO   get_custom_propertiesz"Organization.get_custom_properties?  s9    
 ::UUooz!34	
 	
rQ   c                    t        |t              sJ |       | j                  j                  d| j                   dt
        j                  j                  |             \  }}t        j                  j                  | j                  ||d      S )a,  
        :calls: `GET /orgs/{org}/properties/schema/{property_name} <https://docs.github.com/en/rest/orgs/custom-properties#get-a-custom-property-for-an-organization>`_
        :param property_name: string
        :rtype: :class:`github.OrganizationCustomProperty.OrganizationCustomProperty`
        rU  /properties/schema/Fr  )
r   r   r   r   r   r!  r"  r#  r   r   )rN   property_namer   r   s       rO   get_custom_propertyz Organization.get_custom_propertyK  s     --<}<-;;dhhZ26<<3E3Em3T2UV
 00KKoo	 L 
 	
rQ   c           	        t        |t              sJ |       t        d |D              sJ |       d|D cg c]  }|j                          c}i}| j                  j                  d| j                   d|      \  }}|D cg c]/  }t        j                  j                  | j                  ||d      1 c}S c c}w c c}w )a  
        Create or update custom properties for an organization
        :calls: `PATCH /orgs/{org}/properties/schema <https://docs.github.com/en/rest/orgs/custom-properties#create-or-update-custom-properties-for-an-organization>`_
        :param properties: list of :class:`github.OrganizationCustomProperty.CustomProperty`
        :rtype: list of :class:`github.OrganizationCustomProperty.OrganizationCustomProperty`
        c              3  d   K   | ](  }t        |t        j                  j                         * y wr&   )r   r   r   r   )r  ps     rO   r  z8Organization.create_custom_properties.<locals>.<genexpr>d  s$     gWX:a!B!B!Q!QRgr  
propertiesrM  r  r   Tr  )	r   r  r  to_dictr   r   r   r   r   )rN   r  r  patch_parametersr   r   propertys          rO   create_custom_propertiesz%Organization.create_custom_properties\  s     *d+7Z7+g\fggsissg(
*K1199;*KL;;z!34<L < 
 !	
  --HH//7x[_ I 
 	
	 +L
s   B:4B?c                |   t        |t        j                  j                        sJ |       |j                  t
        u sJ |j                         }|j                  d      }| j                  j                  d| j                   d| |      \  }}t        j                  j                  | j                  ||d      S )a  
        Create or update a custom property for an organization
        :calls: `PUT /orgs/{org}/properties/schema/{property_name} <https://docs.github.com/en/rest/orgs/custom-properties#create-or-update-a-custom-property-for-an-organization>`_
        :param property: :class:`github.OrganizationCustomProperty.CustomProperty`
        :rtype: :class:`github.OrganizationCustomProperty.OrganizationCustomProperty`
        r  r   r  r   Tr  )r   r   r   r   values_editable_byr
   r  popr   r   r   )rN   r  r   r  r   r   s         rO   create_custom_propertyz#Organization.create_custom_propertyp  s     (F$E$E$T$TU_W__U**f444"**,'++O<;;dhhZ2=/B/ < 
 00KKoow4SW L 
 	
rQ   c                    t        |t              sJ |       | j                  j                  d| j                   d|        y)z
        :calls: `DELETE /orgs/{org}/properties/schema/{property_name} <https://docs.github.com/en/rest/orgs/custom-properties#remove-a-custom-property-for-an-organization>`_
        :param property_name: string
        :rtype: None
        rH  r  N)r   r   r   r   r   )rN   r  s     rO   remove_custom_propertyz#Organization.remove_custom_property  s?     --<}<-++H
BUVcUd6efrQ   c           	         t        t        j                  j                  | j                  | j
                   dt        j                  d|i            S )z
        :calls: `GET /orgs/{org}/properties <https://docs.github.com/en/rest/orgs/custom-properties#list-custom-property-values-for-an-organization>`_
        :rtype: :class:`PaginatedList` of dict
        /properties/valuesrepository_queryr  )r   r   r   r   r   r   r
   r   )rN   r  s     rO   list_custom_property_valuesz(Organization.list_custom_property_values  sK     ::YYooz!34113EGW2XY	
 	
rQ   c                   t        |t              sJ |       t        d |D              sJ |       t        |t              sJ |       t        d |j	                         D              sJ |       ||j                         D cg c]
  \  }}||d c}}d}| j                  j                  d| j                   d|       yc c}}w )	a  
        Create or update custom property values for organization repositories
        :calls: `PATCH /orgs/{org}/properties <https://docs.github.com/en/rest/orgs/custom-properties#create-or-update-custom-property-values-for-organization-repositories>`_
        :param repository_names: list of strings
        :param properties: dict of string to string, list or None
        :rtype: None
        c              3  <   K   | ]  }t        |t                y wr&   r  r  s     rO   r  z=Organization.create_custom_property_values.<locals>.<genexpr>  s     FT:dC(Fr  c           	   3  \   K   | ]$  }t        |t        t        t        d       f       & y wr&   )r   r   r  r   )r  rU   s     rO   r  z=Organization.create_custom_property_values.<locals>.<genexpr>  s"     _%:ec4d%<=_s   *,)r  rU   )repository_namesr  rM  r   r   N)	r   r  r  r   valuesitemsr   r   r   )rN   r  r  kvr  s         rO   create_custom_property_valuesz*Organization.create_custom_property_values  s     *D1C3CC1F5EFFXHXXF*d+7Z7+_:K\K\K^__kakk_ 0HRHXHXHZ[1Q;[
 	++GzAS5T\l+m \s   Cc                	   d|v r;|d   t        |d   t              s
J |d          | 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	         | _        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         | _        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         | _        d|v r| j	                  |d         | _        d|v r| j                  |d         | _         d|v r2| jC                  tD        jF                  jF                  |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$         | _,        d%|v r| j                  |d%         | _-        d&|v r| j	                  |d&         | _.        y y )'NrY   r\   r_   rb   re   rg   ri   rk   rm   ro   rq   rt   rv   ry   r{   r}   r   r   r   r   r   r   rS   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )/r   r   _makeDatetimeAttributer'   _makeStringAttributer/   r0   r1   _makeIntAttributer2   r3   r4   r(   r5   r6   r7   r8   r9   r:   r;   _makeBoolAttributer)   r*   r+   r<   r=   r,   r>   r?   r-   r@   rA   rB   _makeClassAttributer   r   rC   rD   rE   rF   rG   rH   rI   r.   rJ   rK   rL   )rN   r  s     rO   rN  zOrganization._useAttributes  s   J&m,4
:mC\^a8b dne b !% ; ;J}<U VD:%#88L9QRDj("&";";J<W"XDZ22:f3EFDJj("&"8"8O9T"UD
" 55j6KLDM:%#:::l;STD*j8262K2KJWvLw2xD/J& $ 9 9*]:S TD:%#55j6NODj 33Jw4GHDK:%#88L9QRD*$"44Z5LMDO*$"44Z5LMDOJ& $ 9 9*]:S TD&*4.2.E.EjQlFm.nD+$
2,0,C,CJOhDi,jD)*$"77
;8OPDO#!66z*7MNDN:--j.>?DH:%#88L9QRD#!66z*7MNDNj 33Jw4GHDK,
:484K4K<=5D1 J& $ 9 9*]:S TDZ22:f3EFDJ J.(,(>(>zJ_?`(aD%Z11&++2B2BJvDVWDJj("&"8"8O9T"UDZ'!%!7!7
>8R!SD:-'+'@'@L`Aa'bD$Z'!%!7!7
>8R!SD*$"77
;8OPDO J.(,(>(>zJ_?`(aD%+z9373J3J:VvKw3xD0Z22:f3EFDJ:%#:::l;STDJ11*U2CDDI rQ   N)returnNone)r  r   )r  r   )r  z
str | None)r  r  )r  r   )r  r   )r   r   r   Opt[str]r  r  )r   r   r  r  )r   r!   r   r  r   	Opt[bool]r  r!   )r   r   r   r!   rm   r  r   r  r   r  r  r!   )
r   r   r   dict[str, str]r   Opt[list[str]]r   r  r  r   )r   r   r   r  r  zgithub.Project.Project)6r   r   rm   r  r   r  r   r  r   r  r   r  r   r  r   r  r   r  r   Opt[int]r   r  r   r  r   r  r   r  r   r  r   r  r   r  r   r  r   r  r   r  r   r  r   r  r   r  r   r  r   r  r   zOpt[dict[str, Any]]r  zgithub.Repository.Repository)r$  r   r%  r   r   r   r&  z'Opt[list[github.Repository.Repository]]r  r   r  z,github.OrganizationSecret.OrganizationSecret)r  )r  r   r  z!PaginatedList[OrganizationSecret])r$  r   r  r   r  r   )r   r   r9  zOpt[list[Repository]]r4  r  r5  r  rm   r  r6  r  r7  zOpt[list[int]]r8  r  r  r"   )
r@  r   rU   r   r   r   r&  z;github.GithubObject.Opt[list[github.Repository.Repository]]r  z0github.OrganizationVariable.OrganizationVariable)r  z#PaginatedList[OrganizationVariable])r@  r   r  r   )r   r  r  r  )r_   r  rb   r  rg   r  rm   r  rq   r  r   r  r   r  r  r  )r   r  r   r   r   r  r   r  r   r  r  r   )r  zPaginatedList[Event])r   r  r  zgithub.Hook.Hook)r  zPaginatedList[Hook])r\  r  r]  r  r  z github.HookDelivery.HookDelivery)r\  r  r  z6PaginatedList[github.HookDelivery.HookDeliverySummary])rc  r  rd  r  rj  zOpt[list[Label]]re  r  rf  r  rk  zOpt[datetime]r  zPaginatedList[Issue])rr  r  r   r  r  PaginatedList[NamedUser])rd  r  r  zPaginatedList[Project])r  r  )rr  r  r  r  )r|  r   r  r  )r   r   r  r  )r  r   r  r    )r   r   r  r!   )r   r  re  r  rf  r  r  zPaginatedList[Repository])r   r  r  r"   )r  r   r  r"   )r  zPaginatedList[Team])
r  zOpt[NamedUser]rq   r  r   r  r  zOpt[list[Team]]r  r  )r  r   r  r   )r   r   r  r   )r   r   r  r   )r  	list[str]r  r  r  r  r  r   )r  zPaginatedList[Migration])r  zPaginatedList[Installation])rd  r  r  r  r  r  r  r  r  r  re  r  rf  r  r  z*PaginatedList[OrganizationDependabotAlert])r  z)PaginatedList[OrganizationCustomProperty])r  r   r  r   )r  zlist[CustomProperty]r  z list[OrganizationCustomProperty])r  r   r  r   )r  r   r  r  )r  r  r  z-PaginatedList[RepositoryCustomPropertyValues])r  r  r  zdict[str, str | list | None]r  r  )r  zdict[str, Any]r  r  )e__name__
__module____qualname____doc__rP   rV   r  rY   r\   r_   rb   re   rg   ri   rk   rm   ro   rq   rt   rv   ry   r{   r}   r   r   r   r   r   r   rS   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
   r   r   r   r   r   r   r  r)  r.  r0  r;  rA  rD  rF  rK  rO  rQ  rS  rV  rX  r^  ra  ro  rs  ru  rw  ry  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rN   rQ   rO   r$   r$      s	   &+P> ' ' & & ) )     ) ) # # & & 9 9 ' ' & & ! ! & & % % % % ' ' 5 5 3 3 % % $ $   & & $ $ ! ! ; ; ' '     / /     ) ) ( ( . . ( ( % % / / : :     & &   BH 	

  )/	

 
 '	

 

( !'*0# \ \  \ 	 \
 ( \  \ 
 \L "("PP P 	P
 P 
P< :@ V& !'##% &$#)"("%%+'-(.(.(.,2)/!'&,4:.406'-)/177d\d\ d\ 	d\
 d\ d\ d\ d\ !d\  d\ d\ d\ #d\ %d\ &d\  &!d\" &#d\$ !*%d\& ''d\( )d\* $+d\, )2-d\. $,/d\0 &.1d\2 %3d\4 '5d\6 /7d\8 
&9d\T  IO$<
<
 <
 	<

  G<
 <
 
6<
|
 
& -3%" &#)&,)/-P-P *-P 	-P
 -P -P !-P $-P '-P 
-Pf  ]c.
.
 .
 	.

  [.
 
:.
`

` #)" & #!"!" !" 	!"
 !" !" !" !" 
!"P "("PP P 	P
 P P 
P.^P[`
  " #)$%!h!h !h !	!h
 !h !h !h 
!hJ #

 
 
"	
( .4 


 =C 
	
	
Z\"  $	

 
 	

 
#
4PP[

  & !'"
"
 "
 	"

 "
 
"
H

tp	
 (.)/	ZZ %Z '	Z
 
ZB

" !#$" $1
1
 1
 	1

 1
 1
 1
 1
 
41
f


"
(
&g ,2
 (
	6
n )n7Sn	n(QErQ   r$   )9
__future__r   urllib.parser!  r   typingr   r   github.Eventr   github.GithubObjectgithub.HookDeliverygithub.NamedUser!github.OrganizationCustomProperty"github.OrganizationDependabotAlertgithub.OrganizationSecretgithub.OrganizationVariablegithub.Plangithub.Projectgithub.Repositorygithub.Teamr   r   r	   r
   r   r   r   r   r   github.PaginatedListr   r   github.Hookr   github.Installationr   github.Issuer   github.Labelr   github.Migrationr   r   r   r   r   r   r   r   r   r   github.PublicKeyr    r!   r"   r$   r  rQ   rO   <module>r6     s   f #   %     ( )   "     	 	 	 /" 0""** 
 O<@ &*, vE* vErQ   