
    ,Of                        d dl mZ d dlmZ d dl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	mZmZmZ d dlmZ  G d de      Zy)	    )annotations)datetime)AnyN)	AttributeNonCompletableGithubObjectNotSet)PaginatedListc                     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edd       Zedd       Zedd       ZddZddZy)CodeScanAlertz
    This class represents alerts from code scanning.

    The reference can be found here
    https://docs.github.com/en/rest/reference/code-scanning.

    c                   t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _        t         | _	        t         | _
        t         | _        t         | _        y N)r   _number_rule_tool_created_at_dismissed_at_dismissed_by_dismissed_reason_url	_html_url_instances_url_most_recent_instance_stateselfs    4lib/python3.12/site-packages/github/CodeScanAlert.py_initAttributeszCodeScanAlert._initAttributes3   s\    '-BH
BH
069?KQ8>$*	)/.4dj"&,    c                <    | j                  d| j                  i      S )Nnumber)get__repr__r    r   s    r   __repr__zCodeScanAlert.__repr__A   s    4;; 788r   c                .    | j                   j                  S r   )r   valuer   s    r   r    zCodeScanAlert.numberD   s    ||!!!r   c                .    | j                   j                  S r   )r   r$   r   s    r   rulezCodeScanAlert.ruleH       zzr   c                .    | j                   j                  S r   )r   r$   r   s    r   toolzCodeScanAlert.toolL   r'   r   c                .    | j                   j                  S r   )r   r$   r   s    r   
created_atzCodeScanAlert.created_atP   s    %%%r   c                .    | j                   j                  S r   )r   r$   r   s    r   dismissed_atzCodeScanAlert.dismissed_atT       !!'''r   c                .    | j                   j                  S r   )r   r$   r   s    r   dismissed_byzCodeScanAlert.dismissed_byX   r.   r   c                .    | j                   j                  S r   )r   r$   r   s    r   dismissed_reasonzCodeScanAlert.dismissed_reason\   s    %%+++r   c                .    | j                   j                  S r   )r   r$   r   s    r   urlzCodeScanAlert.url`   s    yyr   c                .    | j                   j                  S r   )r   r$   r   s    r   html_urlzCodeScanAlert.html_urld   s    ~~###r   c                .    | j                   j                  S r   )r   r$   r   s    r   instances_urlzCodeScanAlert.instances_urlh   s    ""(((r   c                .    | j                   j                  S r   )r   r$   r   s    r   most_recent_instancez"CodeScanAlert.most_recent_instancel   s    ))///r   c                .    | j                   j                  S r   )r   r$   r   s    r   statezCodeScanAlert.statep   s    {{   r   c                v    t        t        j                  j                  | j                  | j                  d      S )zh
        Get instances.

        :calls: `GET` on the URL for instances as provided by Github.

        N)r	   githubCodeScanAlertInstance
_requesterr8   r   s    r   get_instanceszCodeScanAlert.get_instancest   s3     ((>>OO	
 	
r   c                   d|v r| j                  |d         | _        d|v r2| j                  t        j                  j                  |d         | _        d|v r2| j                  t        j                  j                  |d         | _        d|v r| j                  |d         | _	        d|v r| j                  |d         | _
        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 r2| j                  t        j$                  j$                  |d         | _        d|v r| j                  |d         | _        y y )Nr    r&   r)   r+   r-   r0   r2   r4   r6   r8   r:   r<   )_makeIntAttributer   _makeClassAttributer>   CodeScanRuler   CodeScanToolr   _makeDatetimeAttributer   r   	NamedUserr   _makeStringAttributer   r   r   r   r?   r   r   )r   
attributess     r   _useAttributeszCodeScanAlert._useAttributes   s   z!11*X2FGDLZ11&2E2E2R2RT^_eTfgDJZ11&2E2E2R2RT^_eTfgDJ:%#:::l;STDZ'!%!<!<Z=W!XDZ'!%!9!9&:J:J:T:TV`aoVp!qD+%)%>%>zJ\?]%^D"J11*U2CDDI#!66z*7MNDNj("&";";J<W"XD!Z/)-)A)A,,BB12*D& j 33Jw4GHDK !r   N)returnNone)rL   str)rL   int)rL   z github.CodeScanRule.CodeScanRule)rL   z github.CodeScanTool.CodeScanTool)rL   r   )rL   zdatetime | None)rL   z!github.NamedUser.NamedUser | None)rL   z
str | None)rL   z2github.CodeScanAlertInstance.CodeScanAlertInstance)rL   zAPaginatedList[github.CodeScanAlertInstance.CodeScanAlertInstance])rJ   zdict[str, Any]rL   rM   )__name__
__module____qualname____doc__r   r"   propertyr    r&   r)   r+   r-   r0   r2   r4   r6   r8   r:   r<   rA   rK    r   r   r   r   *   s   -9 " "         & & ( ( ( ( , ,   $ $ ) ) 0 0 ! !
Ir   r   )
__future__r   r   typingr   github.CodeScanAlertInstancer>   github.CodeScanRulegithub.CodeScanToolgithub.GithubObjectgithub.NamedUserr   r   r   github.PaginatedListr	   r   rU   r   r   <module>r^      s9   8 #   #     M M .vI. vIr   