
    ,Of                    x    d dl mZ d dlmZ d dlmZmZmZmZm	Z	  G d d      Z
 G d de      Z G d d	e      Zy
)    )annotations)Any)	AttributeNonCompletableGithubObjectNotSetOptis_optionalc                  F    e Zd ZdZeeeeef	 	 	 	 	 	 	 	 	 	 	 	 	 ddZddZy)CustomPropertya  
    This class represents a CustomProperty for an Organization. Use this class to create a new post parameter object.

    The reference can be found here
    https://docs.github.com/en/rest/orgs/custom-properties#create-or-update-custom-properties-for-an-organization

    c                F   t        |t              sJ |       t        |t              sJ |       |dv sJ |       t        |t              sJ |       t        |t	        d       t        t
        f      sJ |       t        |t        t	        d       f      sJ |       t        |t
        t	        d       f      sJ |       t        |t        t	        d       f      sJ |       |t        ur|dv sJ |       || _        || _        || _	        || _
        || _        || _        || _        y )N)stringsingle_select)
org_actorsorg_and_repo_actors)
isinstancestrr	   booltypelistr   property_name
value_typerequireddefault_valuedescriptionallowed_valuesvalues_editable_by)selfr   r   r   r   r   r   r   s           Alib/python3.12/site-packages/github/OrganizationCustomProperty.py__init__zCustomProperty.__init__'   s&    --<}<-*c*6J6*88D*D88T*4H4*=4:sD*ABQMQB;d4j(9:GKG:>D$t*+=>NN>-T$Z/@AUCUUAV+%)NNbPbbN*$ *&,"4    c                @    t        j                  | j                        S N)r   remove_unset_items__dict__r   s    r   to_dictzCustomProperty.to_dictD   s    ((77r    N)r   r   r   r   r   z	Opt[bool]r   zOpt[None | str | list[str]]r   Opt[str | None]r   Opt[list[str] | None]r   r'   )returndict[str, Any])__name__
__module____qualname____doc__r   r   r&    r    r   r   r      sf     %5;'-06.455 5 	5
 35 %5 .5 ,5:8r    r   c                      e Zd Z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dd
Zy)OrganizationCustomPropertyz
    This class represents a CustomProperty for an Organization.

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

    c                .    | j                   j                  S r"   )_property_namevaluer%   s    r   r   z(OrganizationCustomProperty.property_nameQ       ""(((r    c                .    | j                   j                  S r"   )_value_typer4   r%   s    r   r   z%OrganizationCustomProperty.value_typeU       %%%r    c                .    | j                   j                  S r"   )	_requiredr4   r%   s    r   r   z#OrganizationCustomProperty.requiredY   s    ~~###r    c                .    | j                   j                  S r"   )_default_valuer4   r%   s    r   r   z(OrganizationCustomProperty.default_value]   r5   r    c                .    | j                   j                  S r"   )_descriptionr4   r%   s    r   r   z&OrganizationCustomProperty.descriptiona   s      &&&r    c                .    | j                   j                  S r"   )_allowed_valuesr4   r%   s    r   r   z)OrganizationCustomProperty.allowed_valuese   s    ##)))r    c                .    | j                   j                  S r"   )_values_editable_byr4   r%   s    r   r   z-OrganizationCustomProperty.values_editable_byi   s    ''---r    c                    t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        y r"   )r   r3   r7   r:   r<   r>   r@   rB   r%   s    r   _initAttributesz*OrganizationCustomProperty._initAttributesm   s9    .4+1*0:@,25;39 r    c                   | 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         | _	        y y )Nr   r   r   r   r   r   r   )
_makeStringAttributer3   r7   _makeBoolAttributer:   r<   r>   _makeListOfStringsAttributer@   rB   )r   
attributess     r   _useAttributesz)OrganizationCustomProperty._useAttributesv   s    "77
?8ST44Z5MN#!44Z
5KLDNj("&";";J<W"XDJ& $ 9 9*]:S TDz)#'#C#CJO_D`#aD :-'+'@'@L`Aa'bD$ .r    Nr)   r   )r)   zOpt[bool | None])r)   zOpt[str | list[str] | None])r)   r'   )r)   r(   r)   NonerI   r*   r)   rM   )r+   r,   r-   r.   propertyr   r   r   r   r   r   r   rD   rJ   r/   r    r   r1   r1   H   s     ) ) & & $ $ ) ) ' ' * * . .:cr    r1   c                  h    e Zd ZdZed	d       Zed
d       Zed
d       Zedd       ZddZ	ddZ
y)RepositoryCustomPropertyValuesz
    This class represents CustomPropertyValues for a Repository.

    The reference can be found here
    https://docs.github.com/en/rest/orgs/custom-properties#list-custom-property-values-for-organization-repositories

    c                .    | j                   j                  S r"   )_repository_idr4   r%   s    r   respository_idz-RepositoryCustomPropertyValues.respository_id   r5   r    c                .    | j                   j                  S r"   )_repository_namer4   r%   s    r   repository_namez.RepositoryCustomPropertyValues.repository_name   s    $$***r    c                .    | j                   j                  S r"   )_repository_full_namer4   r%   s    r   repository_full_namez3RepositoryCustomPropertyValues.repository_full_name   s    ))///r    c                .    | j                   j                  S r"   )_propertiesr4   r%   s    r   
propertiesz)RepositoryCustomPropertyValues.properties   r8   r    c                \    t         | _        t         | _        t         | _        t         | _        y r"   )r   rS   rV   rY   r\   r%   s    r   rD   z.RepositoryCustomPropertyValues._initAttributes   s"    .4065;"6<r    c                   | j                  |d         | _        | j                  |d         | _        | j                  |d         | _        |d   D ci c]  }|d   |d    }}| j                  |      | _        y c c}w )Nrepository_idrW   rZ   r]   r   r4   )_makeIntAttributerS   rF   rV   rY   _makeDictAttributer\   )r   rI   pr]   s       r   rJ   z-RepositoryCustomPropertyValues._useAttributes   s    "44Z5PQ $ 9 9*EV:W X%)%>%>zJ`?a%b">H>VWa(!G*4W
W22:> Xs   A<N)r)   intrK   )r)   zdict[str, str]rL   rN   )r+   r,   r-   r.   rO   rT   rW   rZ   r]   rD   rJ   r/   r    r   rQ   rQ      sa     ) ) + + 0 0 & &=?r    rQ   N)
__future__r   typingr   github.GithubObjectr   r   r   r   r	   r   r1   rQ   r/   r    r   <module>rh      s;   . #  _ _'8 '8T:c!; :cz$?%? $?r    