
    osj                     v    d dl Z d dlZ ej                  e      Z G d de j
                        Z G d d      Zy)    Nc                        e Zd ZdZdZ	 dZ	 dZy)
StatusCodez@Represents the canonical set of status codes of a finished Span.r         N)__name__
__module____qualname____doc__UNSETOKERROR     M/root/.hermes/venv/lib/python3.12/site-packages/opentelemetry/trace/status.pyr   r   
   s    JE	
BrE*r   r   c                       e Zd ZdZej
                  dfdededz  fdZedefd       Z	ededz  fd       Z
edefd	       Zedefd
       Zy)StatuszRepresents the status of a finished Span.

    Args:
        status_code: The canonical status code that describes the result
            status of the operation.
        description: An optional description of the status.
    Nstatus_codedescriptionc                     || _         d | _        |rNt        |t              st        j                  d       y |t        j                  urt        j                  d       y || _        y )Nz-Invalid status description type, expected strzJdescription should only be set when status_code is set to StatusCode.ERROR)_status_code_description
isinstancestrloggerwarningr   r   )selfr   r   s      r   __init__zStatus.__init__    s[    
 ( k3/NO*"2"22` 'r   returnc                     | j                   S )z8Represents the canonical status code of a finished Span.)r   r   s    r   r   zStatus.status_code4           r   c                     | j                   S )zStatus description)r   r    s    r   r   zStatus.description9   r!   r   c                 V    | j                   xs | j                  t        j                  u S )z:Returns false if this represents an error, true otherwise.)is_unsetr   r   r   r    s    r   is_okzStatus.is_ok>   s"     }}B 1 1Z]] BBr   c                 :    | j                   t        j                  u S )z'Returns true if unset, false otherwise.)r   r   r   r    s    r   r$   zStatus.is_unsetC   s       J$4$444r   )r   r   r	   r
   r   r   r   r   propertyr   r   boolr%   r$   r   r   r   r   r      s     #-"2"2"&(( 4Z(( !Z ! ! !S4Z ! ! Ct C C 5$ 5 5r   r   )enumlogging	getLoggerr   r   Enumr   r   r   r   r   <module>r-      s9     			8	$
+ 
+/5 /5r   